@jskit-ai/agent-docs 0.1.16 → 0.1.17

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 (35) hide show
  1. package/guide/agent/app-extras/assistant.md +2 -2
  2. package/guide/agent/app-setup/initial-scaffolding.md +1 -3
  3. package/guide/agent/app-setup/multi-homing.md +21 -0
  4. package/guide/agent/generators/advanced-cruds.md +206 -112
  5. package/guide/agent/generators/crud-generators.md +4 -0
  6. package/guide/agent/index.md +1 -1
  7. package/package.json +1 -1
  8. package/patterns/INDEX.md +1 -1
  9. package/patterns/client-requests.md +3 -0
  10. package/patterns/crud-repository-mapping.md +36 -35
  11. package/patterns/filters.md +8 -8
  12. package/reference/autogen/KERNEL_MAP.md +94 -40
  13. package/reference/autogen/README.md +3 -0
  14. package/reference/autogen/packages/assistant-core.md +0 -12
  15. package/reference/autogen/packages/assistant-runtime.md +11 -3
  16. package/reference/autogen/packages/auth-core.md +34 -23
  17. package/reference/autogen/packages/auth-provider-supabase-core.md +4 -7
  18. package/reference/autogen/packages/auth-web.md +3 -0
  19. package/reference/autogen/packages/console-core.md +6 -29
  20. package/reference/autogen/packages/crud-core.md +34 -30
  21. package/reference/autogen/packages/crud-server-generator.md +28 -83
  22. package/reference/autogen/packages/crud-ui-generator.md +12 -7
  23. package/reference/autogen/packages/http-runtime.md +171 -21
  24. package/reference/autogen/packages/json-rest-api-core.md +54 -0
  25. package/reference/autogen/packages/kernel.md +118 -55
  26. package/reference/autogen/packages/realtime.md +1 -0
  27. package/reference/autogen/packages/resource-core.md +35 -0
  28. package/reference/autogen/packages/resource-crud-core.md +51 -0
  29. package/reference/autogen/packages/shell-web.md +31 -0
  30. package/reference/autogen/packages/users-core.md +34 -77
  31. package/reference/autogen/packages/users-web.md +29 -20
  32. package/reference/autogen/packages/workspaces-core.md +44 -76
  33. package/reference/autogen/packages/workspaces-web.md +1 -3
  34. package/reference/autogen/tooling/jskit-cli.md +5 -4
  35. package/workflow/feature-delivery.md +2 -1
@@ -7,60 +7,61 @@ Use when:
7
7
 
8
8
  Default JSKIT pattern:
9
9
  1. Treat the schema as the API contract only.
10
- 2. Put persistence mapping in `resource.fieldMeta`.
11
- 3. Use `repository.column` for explicit DB column overrides.
10
+ 2. Put persistence mapping on the field definitions themselves.
11
+ 3. Use `actualField` for explicit DB column overrides.
12
12
  4. Let generic CRUD runtime handle standard writable `date-time` fields automatically at the DB write seam.
13
- 5. Use `repository.writeSerializer` only for non-default write serialization.
14
- 6. Use `repository.storage: "virtual"` for computed output fields.
13
+ 5. Use `storage.writeSerializer` only for non-default write serialization.
14
+ 6. Use `storage: { virtual: true }` for computed output fields.
15
15
  7. Register computed SQL projections once in the repository runtime with `virtualFields`.
16
16
  8. Let generic CRUD read paths apply those projections automatically.
17
17
 
18
- Field meta rules:
18
+ Field metadata rules:
19
19
  - for a normal override, write:
20
20
 
21
21
  ```js
22
- RESOURCE_FIELD_META.push({
23
- key: "createdAt",
24
- repository: {
25
- column: "created_at"
26
- }
27
- });
22
+ createdAt: {
23
+ type: "dateTime",
24
+ required: true,
25
+ actualField: "created_at"
26
+ }
28
27
  ```
29
28
 
30
- - for a computed output field, write:
29
+ - for a non-default write serializer override, write:
31
30
 
32
31
  ```js
33
- RESOURCE_FIELD_META.push({
34
- key: "remainingBatchWeight",
35
- repository: {
36
- storage: "virtual"
32
+ arrivalDatetime: {
33
+ type: "dateTime",
34
+ required: true,
35
+ storage: {
36
+ writeSerializer: "datetime-utc"
37
37
  }
38
- });
38
+ }
39
39
  ```
40
40
 
41
- - for a non-default write serializer override, write:
41
+ - for a computed output field, write:
42
42
 
43
43
  ```js
44
- RESOURCE_FIELD_META.push({
45
- key: "arrivalDatetime",
46
- repository: {
47
- writeSerializer: "datetime-utc"
44
+ remainingBatchWeight: {
45
+ type: "number",
46
+ required: true,
47
+ storage: {
48
+ virtual: true
48
49
  }
49
- });
50
+ }
50
51
  ```
51
52
 
52
- - omit `repository` entirely when the field is column-backed and the default snake_case mapping is correct
53
- - standard writable `format: "date-time"` fields do not need explicit `repository.writeSerializer`
54
- - use `repository.writeSerializer` only for non-default DB write behavior; keep `bodyValidator.normalize(...)` in API shape
55
- - `repository.storage: "virtual"` cannot also define `repository.column`
56
- - `repository.storage: "virtual"` cannot also define `repository.writeSerializer`
57
- - `repository.storage: "virtual"` fields must not appear in create/patch write schemas
53
+ - omit `actualField`/`storage` when the field is column-backed and the default snake_case mapping is correct
54
+ - standard writable `format: "date-time"` fields do not need explicit `storage.writeSerializer`
55
+ - use `storage.writeSerializer` only for non-default DB write behavior
56
+ - `storage: { virtual: true }` cannot also define `actualField` or `storage.column`
57
+ - `storage: { virtual: true }` cannot also define `storage.writeSerializer`
58
+ - `storage: { virtual: true }` fields must not appear in create/patch write schemas
58
59
 
59
60
  Repository pattern:
60
61
  - build the runtime with `createCrudResourceRuntime(resource, { ... })`
61
62
  - register computed projections in `virtualFields`
62
63
  - keep SQL in the repository, not in shared metadata
63
- - let generic CRUD runtime apply `repository.writeSerializer` during create/update writes
64
+ - let generic CRUD runtime apply `storage.writeSerializer` during create/update writes
64
65
 
65
66
  Example:
66
67
 
@@ -89,14 +90,14 @@ What CRUD core now does for you:
89
90
 
90
91
  Avoid:
91
92
  - manual `clearSelect()` / re-select hacks in individual repository methods just to add computed fields
92
- - putting SQL fragments or joins into shared `fieldMeta`
93
- - inventing `repository.storage` modes beyond the documented `virtual` contract
93
+ - putting SQL fragments or joins into shared field metadata
94
+ - inventing `storage` modes beyond the documented `virtual` contract
94
95
 
95
96
  Review checks:
96
97
  - schema defines contract, not storage
97
- - `fieldMeta.repository` owns mapping
98
+ - field definitions own mapping
98
99
  - standard datetime DB write serialization stays automatic and runtime-owned
99
- - any non-default DB write serialization lives in `repository.writeSerializer`, not in per-repository hooks
100
- - computed fields use `repository.storage: "virtual"`
100
+ - any non-default DB write serialization lives in `storage.writeSerializer`, not in per-repository hooks
101
+ - computed fields use `storage: { virtual: true }`
101
102
  - repository runtime registers matching `virtualFields`
102
103
  - no per-method projection duplication when generic CRUD reads already cover the field
@@ -17,25 +17,25 @@ Default JSKIT pattern:
17
17
  1. Put shared filter definitions in the CRUD package.
18
18
  Example path: `packages/<crud>/src/shared/<crud>ListFilters.js`
19
19
  2. Build the server runtime from that module with `createCrudListFilters(...)`.
20
- 3. Build route/action validators explicitly with `createQueryValidator({ invalidValues: "reject" | "discard" })`, and use `applyQuery(...)` in the repository. There is no default validator mode and no `runtime.queryValidator` alias.
20
+ 3. Build route/action validators explicitly with `createCrudListFilterQueryField(...)` plus `createCrudListFilterQuerySchema(...)`, and use `applyQuery(...)` in the repository. There is no default validator mode or route-runtime alias.
21
21
  4. Build the client runtime from the same shared definitions with `useCrudListFilters(...)`. Presets can use static `values` or dynamic `resolveValues({ values, filters, presetKey, preset })`.
22
22
  5. Pass `listFilters.queryParams` into `useCrudList(...)`.
23
23
  6. For lookup-backed filters, use `useCrudListFilterLookups(...)` instead of hand-rolling `useList()` in each page.
24
24
 
25
25
  Exact file checklist:
26
26
  - create `packages/<crud>/src/shared/<crud>ListFilters.js`
27
- - update `packages/<crud>/src/server/registerRoutes.js` and `packages/<crud>/src/server/actions.js` so the list query validator includes an explicit `createQueryValidator({ invalidValues: ... })` choice, or update `packages/<crud>/src/server/listQueryValidators.js` if that package already extracts list-query composition there
27
+ - update `packages/<crud>/src/server/registerRoutes.js` and `packages/<crud>/src/server/actions.js` so the list query validator lists structured filter params explicitly with `createCrudListFilterQueryField(...)` inside `createCrudListFilterQuerySchema(...)`, or update `packages/<crud>/src/server/listQueryValidators.js` if that package already extracts list-query composition there
28
28
  - update `packages/<crud>/src/server/repository.js` so list queries call the runtime's `applyQuery(...)`
29
29
  - update the app-owned list page or list-runtime composable under `src/pages/...` or `src/composables/...` so it builds `useCrudListFilters(...)`, passes `queryParams` into `useCrudList(...)`, and binds chips / reset behavior
30
30
  - for lookup-backed filters, update that same client file to build `useCrudListFilterLookups(...)` and bind the lookup control from `resolveLookup(...)`
31
31
 
32
32
  Validation mode is part of the contract:
33
- - there is no default mode and no fallback alias, so every route/action boundary that validates structured filters must call `createQueryValidator({ invalidValues: ... })` explicitly
33
+ - there is no default mode and no fallback alias, so every explicit structured filter field must choose `invalidValues: "reject"` or `invalidValues: "discard"` deliberately
34
34
  - use `invalidValues: "reject"` when malformed filter values should fail validation and return a 400-style contract error
35
35
  - use `invalidValues: "discard"` when malformed filter values should be ignored and normalization should drop them
36
36
  - route query validation runs before auth, so this choice affects whether malformed unauthenticated requests fail at validation or fall through to auth
37
- - for normal HTTP CRUD handlers, route-level `discard` means the action layer receives already-normalized query input; do not assume route `discard` plus action `reject` will still reject malformed HTTP query strings later
38
- - `jskit doctor` flags `createQueryValidator(...)` calls that do not spell out `invalidValues` directly at the call site
37
+ - for normal HTTP CRUD handlers, route-level `discard` means the action layer receives already-parsed values for those explicit filter fields; do not assume route `discard` plus action `reject` will still reject malformed HTTP query strings later
38
+ - CRUD list filters are still a deliberate two-phase exception: schema parsing owns query-field values, then the server runtime reprojects those parsed values through filter keys and `applyQuery(...)`
39
39
 
40
40
  Keep separate:
41
41
  - free-text search uses `records.searchQuery` and `q`
@@ -65,7 +65,7 @@ Put unusual SQL semantics on the server:
65
65
  Avoid:
66
66
  - local filter composables that duplicate the same keys the server already knows about
67
67
  - a custom validator shape that does not match the page state
68
- - assuming a default `runtime.queryValidator` exists; always create the validator explicitly with `createQueryValidator({ invalidValues: ... })`
68
+ - hiding accepted structured filter params behind whole-query validator generation when the route/action contract can list them directly
69
69
  - hand-rolled preset apply/reset/active-state helpers when `useCrudListFilters(..., { presets })`, `applyPreset(...)`, and `matchesPreset(...)` fit
70
70
  - per-screen `useList()` wrappers for lookup-backed filters when `useCrudListFilterLookups(...)` fits
71
71
  - a second page-local filter-definition file when `packages/<crud>/src/shared/<crud>ListFilters.js` should be the source of truth
@@ -86,7 +86,7 @@ Preset contract notes:
86
86
 
87
87
  Review checks:
88
88
  - one shared filter definition source of truth
89
- - server validator/repository logic derived from that source
89
+ - server validator/repository logic derived from that source, with route/action query params still listed explicitly
90
90
  - client query params/chips/reset logic derived from that source
91
91
  - lookup-backed filters use the shared lookup helper, not a page-local mini-framework
92
- - `jskit doctor` stays clean for filter ownership and explicit validator policy
92
+ - the two-phase server exception is intentional and documented, not accidental drift
@@ -25,6 +25,23 @@ For the full repo inventory, read `reference/autogen/README.md` and the package
25
25
  Exports
26
26
  - `isContainerToken(value)`
27
27
 
28
+ ### `support/crudFieldContract.js`
29
+ Exports
30
+ - `CRUD_FIELD_STORAGE_COLUMN`
31
+ - `CRUD_FIELD_STORAGE_VIRTUAL`
32
+ - `CRUD_FIELD_WRITE_SERIALIZER_DATETIME_UTC`
33
+ - `CRUD_LOOKUP_FORM_CONTROL_AUTOCOMPLETE`
34
+ - `CRUD_LOOKUP_FORM_CONTROL_SELECT`
35
+ - `checkCrudLookupFormControl(value, { context = "crud field ui.formControl", defaultValue = CRUD_LOOKUP_FORM_CONTROL_AUTOCOMPLETE } = {})`
36
+ - `resolveCrudFieldSchemaProperties(value, { context = "crud resource field definitions" } = {})`
37
+ - `normalizeCrudFieldStorageConfig(fieldDefinition = {}, { context = "crud field storage", fieldKey = "" } = {})`
38
+ - `buildCrudOperationSchemaFields(fields = {}, operationName = "")`
39
+ - `buildCrudFieldContractMap(resource = {}, { context = "crud resource field contract" } = {})`
40
+ - `resolveCrudFieldContractEntry(resource = {}, fieldKey = "", options = {})`
41
+ Local functions
42
+ - `cloneStructuredFieldMetadata(value = {})`
43
+ - `mergeFieldContractEntry(target, source, { context = "crud field contract", fieldKey = "" } = {})`
44
+
28
45
  ### `support/crudListFilters.js`
29
46
  Exports
30
47
  - `CRUD_LIST_FILTER_TYPE_FLAG`
@@ -40,10 +57,41 @@ Exports
40
57
  - `CRUD_LIST_FILTER_PRESENCE_PRESENT`
41
58
  - `CRUD_LIST_FILTER_PRESENCE_MISSING`
42
59
  - `CRUD_LIST_FILTER_PRESENCE_OPTIONS`
60
+ - `CRUD_LIST_FILTER_INVALID_VALUES_REJECT`
61
+ - `CRUD_LIST_FILTER_INVALID_VALUES_DISCARD`
62
+ - `INVALID_CRUD_LIST_FILTER_QUERY_VALUE`
63
+ - `normalizeCrudListFilterInvalidValues(value = "")`
64
+ - `parseCrudListRangeQueryExpression(value = null)`
65
+ - `formatCrudListRangeQueryExpression(startValue = "", endValue = "", { collapseExact = false } = {})`
43
66
  - `defineCrudListFilters(definitions = {})`
67
+ - `createCrudListFilterInitialValue(filter = {})`
68
+ - `isCrudListFilterMultiValue(filter = {})`
69
+ - `isCrudListFilterStructuredValue(filter = {})`
70
+ - `normalizeCrudListFilterUiValue(filter = {}, rawValue)`
71
+ - `areCrudListFilterUiValuesEqual(filter = {}, currentValue, expectedValue)`
72
+ - `hasCrudListFilterUiValue(filter = {}, rawValue)`
73
+ - `listCrudListFilterChipValues(filter = {}, rawValue)`
74
+ - `formatCrudListFilterDefaultChipLabel(filter = {}, rawValue, { resolveAtomicValue = null } = {})`
75
+ - `formatCrudListFilterQueryValue(filter = {}, value)`
76
+ - `parseCrudListFilterQueryValue(filter = {}, value, { invalidValues = CRUD_LIST_FILTER_INVALID_VALUES_REJECT } = {})`
44
77
  - `resolveCrudListFilterQueryKeys(definition = {})`
45
78
  - `resolveCrudListFilterOptionLabel(definition = {}, value = "", { fallback = "" } = {})`
46
79
  Local functions
80
+ - `firstCrudListFilterValue(value)`
81
+ - `isPrimitiveCrudListFilterInput(value)`
82
+ - `isPrimitiveOrPrimitiveArrayCrudListFilterInput(value)`
83
+ - `normalizeDateFilterText(value)`
84
+ - `normalizeCanonicalRecordIdList(value)`
85
+ - `normalizeFiniteFilterNumber(value)`
86
+ - `normalizeAllowedFilterTextValue(value, allowedValues = new Set())`
87
+ - `normalizeAllowedFilterTextValues(value, allowedValues = new Set())`
88
+ - `resolveCrudListFilterAllowedValues(filter = {})`
89
+ - `normalizeCrudListDateRangeUiValue(rawValue)`
90
+ - `normalizeCrudListNumberRangeUiValue(rawValue)`
91
+ - `matchCrudListFilterValues(currentValue, expectedValue)`
92
+ - `rejectInvalidCrudListFilterValue({ invalidValues = CRUD_LIST_FILTER_INVALID_VALUES_REJECT } = {})`
93
+ - `normalizeCrudListDateRangeQueryValue(value)`
94
+ - `normalizeCrudListNumberRangeQueryValue(value)`
47
95
  - `normalizeCrudListFilterType(value = "")`
48
96
  - `normalizeCrudListFilterOption(rawOption = null, { context = "filter option" } = {})`
49
97
  - `normalizeCrudListFilterOptions(rawOptions = [], { context = "filter options" } = {})`
@@ -291,6 +339,10 @@ Local functions
291
339
 
292
340
  ### validators
293
341
 
342
+ ### `validators/composeSchemaDefinitions.js`
343
+ Exports
344
+ - `composeSchemaDefinitions(definitions, { mode, context = "schema definitions" } = {})`
345
+
294
346
  ### `validators/createCursorListValidator.js`
295
347
  Exports
296
348
  - `createCursorListValidator(itemValidator)`
@@ -298,8 +350,6 @@ Exports
298
350
  ### `validators/cursorPaginationQueryValidator.js`
299
351
  Exports
300
352
  - `cursorPaginationQueryValidator`
301
- Local functions
302
- - `normalizeCursorPaginationQuery(input = {})`
303
353
 
304
354
  ### `validators/htmlTimeSchemas.js`
305
355
  Exports
@@ -308,25 +358,28 @@ Exports
308
358
 
309
359
  ### `validators/index.js`
310
360
  Exports
361
+ - `createSchema`
311
362
  - `normalizeObjectInput`
363
+ - `composeSchemaDefinitions`
312
364
  - `createCursorListValidator`
313
365
  - `cursorPaginationQueryValidator`
314
366
  - `HTML_TIME_STRING_SCHEMA`
315
367
  - `NULLABLE_HTML_TIME_STRING_SCHEMA`
316
368
  - `mergeObjectSchemas`
317
- - `mergeValidators`
318
- - `nestValidator`
369
+ - `hasJsonRestSchemaDefinition`
370
+ - `normalizeSingleSchemaDefinition`
371
+ - `normalizeSchemaDefinition`
372
+ - `resolveSchemaTransportSchemaDefinition`
373
+ - `resolveStructuredSchemaTransportSchema`
374
+ - `executeJsonRestSchemaDefinition`
375
+ - `buildSchemaValidationError`
376
+ - `validateSchemaPayload`
319
377
  - `RECORD_ID_PATTERN`
320
378
  - `recordIdSchema`
321
379
  - `recordIdInputSchema`
322
380
  - `nullableRecordIdSchema`
323
381
  - `nullableRecordIdInputSchema`
324
- - `recordIdValidator`
325
- - `nullableRecordIdValidator`
326
382
  - `recordIdParamsValidator`
327
- - `positiveIntegerValidator`
328
- - `normalizeSettingsFieldInput`
329
- - `normalizeSettingsFieldOutput`
330
383
  - `normalizeRequiredFieldList`
331
384
  - `deriveRequiredFieldsFromSchema`
332
385
  - `deriveResourceRequiredMetadata`
@@ -335,22 +388,24 @@ Exports
335
388
  Exports
336
389
  - `normalizeObjectInput(value)`
337
390
 
338
- ### `validators/mergeObjectSchemas.js`
339
- Exports
340
- - `mergeObjectSchemas(schemas)`
341
-
342
- ### `validators/mergeValidators.js`
391
+ ### `validators/jsonRestSchemaSupport.js`
343
392
  Exports
344
- - `mergeValidators(validators = [], options = {})`
393
+ - `isJsonRestSchemaInstance(value)`
394
+ - `resolveSchemaDefinitionMode(schemaDefinition = null, { defaultMode = "create", context = "schema definition.mode" } = {})`
395
+ - `resolveSchemaDefinitionTransportSchema(schemaDefinition = null, options = {})`
396
+ - `executeSchemaDefinition(schemaDefinition = null, payload, options = {})`
397
+ - `normalizeJsonRestSchemaFieldErrors(errors = {}, schemaDefinition = null)`
345
398
  Local functions
346
- - `isPromiseLike(value)`
347
- - `createErrorFactory(createError)`
399
+ - `requireJsonRestSchemaInstance(schemaDefinition = null, { context = "schema definition.schema" } = {})`
400
+ - `resolveJsonRestSchemaFieldMessages(schemaDefinition = null, fieldName = "")`
401
+ - `resolveJsonRestSchemaFieldErrorMessage(fieldName, entry, schemaDefinition = null)`
348
402
 
349
- ### `validators/nestValidator.js`
403
+ ### `validators/mergeObjectSchemas.js`
350
404
  Exports
351
- - `nestValidator(key, validator, { required = true } = {})`
405
+ - `mergeObjectSchemas(schemas)`
352
406
  Local functions
353
- - `normalizeValidator(validator)`
407
+ - `cloneSchemaValue(value)`
408
+ - `assertMergeableObjectSchema(schema)`
354
409
 
355
410
  ### `validators/recordIdParamsValidator.js`
356
411
  Exports
@@ -359,10 +414,7 @@ Exports
359
414
  - `recordIdInputSchema`
360
415
  - `nullableRecordIdSchema`
361
416
  - `nullableRecordIdInputSchema`
362
- - `recordIdValidator`
363
- - `nullableRecordIdValidator`
364
417
  - `recordIdParamsValidator`
365
- - `positiveIntegerValidator`
366
418
 
367
419
  ### `validators/resourceRequiredMetadata.js`
368
420
  Exports
@@ -370,10 +422,22 @@ Exports
370
422
  - `deriveRequiredFieldsFromSchema(schema)`
371
423
  - `deriveResourceRequiredMetadata(resourceSchema)`
372
424
 
373
- ### `validators/settingsFieldNormalization.js`
425
+ ### `validators/schemaDefinitions.js`
426
+ Exports
427
+ - `hasJsonRestSchemaDefinition(value)`
428
+ - `normalizeSingleSchemaDefinition(value, { context = "schema definition", defaultMode = "" } = {})`
429
+ - `normalizeSchemaDefinition(value, { context = "schema definition", defaultMode = "" } = {})`
430
+ - `resolveSchemaTransportSchemaDefinition(value, { context = "schema definition", defaultMode = "" } = {})`
431
+ - `resolveStructuredSchemaTransportSchema(value, { context = "schema definition", defaultMode = "" } = {})`
432
+ - `executeJsonRestSchemaDefinition(value, payload, { context = "schema definition", defaultMode = "" } = {})`
433
+ - `normalizeJsonRestSchemaFieldErrors`
434
+ Local functions
435
+ - `isSchemaDefinitionObject(value)`
436
+
437
+ ### `validators/schemaPayloadValidation.js`
374
438
  Exports
375
- - `normalizeSettingsFieldInput(payload = {}, fields = [])`
376
- - `normalizeSettingsFieldOutput(payload = {}, fields = [])`
439
+ - `buildSchemaValidationError({ message = "Schema validation failed.", fieldErrors = null, errors = null, cause, statusCode = null } = {})`
440
+ - `validateSchemaPayload(schemaDefinition, payload, { phase = "input", context = "schema definition", statusCode = null } = {})`
377
441
 
378
442
  ### actions
379
443
 
@@ -384,8 +448,7 @@ Exports
384
448
  - `requireServiceMethod(service, methodName, contributorId, { serviceLabel } = {})`
385
449
  - `resolveRequest(context)`
386
450
  - `hasPermission`
387
- - `EMPTY_INPUT_VALIDATOR`
388
- - `OBJECT_INPUT_VALIDATOR`
451
+ - `emptyInputValidator`
389
452
 
390
453
  ### `actions/actionDefinitions.js`
391
454
  Exports
@@ -399,12 +462,9 @@ Exports
399
462
  - `__testables`
400
463
  Local functions
401
464
  - `normalizeStringArray(value, { fieldName, allowedSet, allowEmpty = false } = {})`
402
- - `normalizeSingleActionValidator(value, fieldName, { required = false } = {})`
403
- - `isActionValidatorShape(value)`
404
- - `normalizeSectionActionValidatorMap(value, fieldName)`
405
- - `mergeNormalizedActionValidators(validators, fieldName)`
406
- - `normalizeActionValidators(value, fieldName, { required = false } = {})`
407
- - `normalizeActionOutputValidator(value, fieldName, { required = false } = {})`
465
+ - `normalizeSingleActionSchema(value, fieldName, { required = false, defaultMode = "" } = {})`
466
+ - `normalizeActionInputDefinition(value, fieldName, { required = false } = {})`
467
+ - `normalizeActionOutputDefinition(value, fieldName, { required = false } = {})`
408
468
  - `normalizeActionPermission(permission, actionId)`
409
469
  - `normalizeAuditConfig(audit, { actionId })`
410
470
  - `normalizeObservabilityConfig(observability)`
@@ -461,12 +521,6 @@ Exports
461
521
  - `__testables`
462
522
  Local functions
463
523
  - `createActionValidationError({ status = 400, message = "Validation failed.", code = "ACTION_VALIDATION_FAILED", details, cause } = {})`
464
- - `normalizeSchemaValidationErrors(schema)`
465
- - `buildSchemaValidatorError({ phase, definition } = {})`
466
- - `normalizeTypeBoxValidationErrors(schema, payload)`
467
- - `normalizeFunctionSchemaResult(result, payload, { phase, definition } = {})`
468
- - `normalizeValidatorPayload(validator, payload, { phase, definition, context })`
469
- - `validateSchemaPayload(schema, payload, { phase, definition })`
470
524
 
471
525
  ### `actions/registry.js`
472
526
  Exports
@@ -23,8 +23,11 @@ Startup navigation stays in `KERNEL_MAP.md`.
23
23
  - [database-runtime-mysql](/packages/agent-docs/reference/autogen/packages/database-runtime-mysql.md)
24
24
  - [database-runtime-postgres](/packages/agent-docs/reference/autogen/packages/database-runtime-postgres.md)
25
25
  - [http-runtime](/packages/agent-docs/reference/autogen/packages/http-runtime.md)
26
+ - [json-rest-api-core](/packages/agent-docs/reference/autogen/packages/json-rest-api-core.md)
26
27
  - [kernel](/packages/agent-docs/reference/autogen/packages/kernel.md)
27
28
  - [realtime](/packages/agent-docs/reference/autogen/packages/realtime.md)
29
+ - [resource-core](/packages/agent-docs/reference/autogen/packages/resource-core.md)
30
+ - [resource-crud-core](/packages/agent-docs/reference/autogen/packages/resource-crud-core.md)
28
31
  - [shell-web](/packages/agent-docs/reference/autogen/packages/shell-web.md)
29
32
  - [storage-runtime](/packages/agent-docs/reference/autogen/packages/storage-runtime.md)
30
33
  - [ui-generator](/packages/agent-docs/reference/autogen/packages/ui-generator.md)
@@ -216,23 +216,11 @@ Exports
216
216
  - `MAX_INPUT_CHARS`
217
217
  - `MAX_HISTORY_MESSAGES`
218
218
  - `assistantResource`
219
- Local functions
220
- - `normalizePaginationValue(value, fallback, max)`
221
- - `normalizeChatStreamBody(payload = {})`
222
- - `normalizeConversationsListQuery(payload = {})`
223
- - `normalizeConversationMessagesQuery(payload = {})`
224
- - `normalizeConversationMessagesParams(payload = {})`
225
- - `createOptionalPositiveIntegerQuerySchema(max = null)`
226
- - `normalizeConversationRecord(payload = {})`
227
- - `normalizeConversationMessageRecord(payload = {})`
228
219
 
229
220
  ### `src/shared/assistantSettingsResource.js`
230
221
  Exports
231
222
  - `MAX_SYSTEM_PROMPT_CHARS`
232
223
  - `assistantConfigResource`
233
- Local functions
234
- - `normalizeConfigPatch(payload = {})`
235
- - `normalizeConfigRecord(payload = {})`
236
224
 
237
225
  ### `src/shared/index.js`
238
226
  Exports
@@ -55,6 +55,12 @@ Exports
55
55
  Exports
56
56
  - `AssistantClientProvider`
57
57
 
58
+ ### `src/client/support/composerInputSupport.js`
59
+ Exports
60
+ - `insertTextAtSelection(source = "", selectionStart, selectionEnd, text = "")`
61
+ Local functions
62
+ - `normalizeSelectionBoundary(value, fallback, max)`
63
+
58
64
  ### `src/client/support/workspaceScopeSupport.js`
59
65
  Exports
60
66
  - `EMPTY_WORKSPACE_WEB_SCOPE_SUPPORT`
@@ -77,7 +83,7 @@ Local functions
77
83
  - `resolveGlobalAssistantConfig(scope)`
78
84
  - `createAssistantAiClientFactory(config = {})`
79
85
 
80
- ### `src/server/inputValidators.js`
86
+ ### `src/server/inputSchemas.js`
81
87
  Exports
82
88
  - `assistantSurfaceRouteParamsValidator`
83
89
  - `assistantTargetSurfaceInputValidator`
@@ -86,14 +92,14 @@ Exports
86
92
  Exports
87
93
  - `registerRoutes(app)`
88
94
  Local functions
89
- - `buildRouteParamsValidator(requiresWorkspace, workspaceScopeSupport = null)`
90
- - `buildConversationMessagesRouteParamsValidator(requiresWorkspace, workspaceScopeSupport = null)`
95
+ - `requireWorkspaceAssistantRouteParams(workspaceScopeSupport = null)`
91
96
  - `readWorkspaceInput(request, requiresWorkspace, workspaceScopeSupport = null)`
92
97
  - `requireAssistantSurface(appConfig = {}, targetSurfaceId = "")`
93
98
  - `requireHostSurfaceId(request)`
94
99
  - `shouldExposeAppErrorDetails(errorCode = "")`
95
100
  - `sendPreStreamErrorResponse(reply, error)`
96
101
  - `resolveRouteRequestState(request, { resolveCurrentAppConfig = () => ({}), kind = "runtime", requiresWorkspace = false, workspaceScopeSupport = null } = {})`
102
+ - `buildChatStreamActionInput(routeInput = {}, requestBody = {})`
97
103
  - `registerSettingsRoutes(router, resolveCurrentAppConfig, { requiresWorkspace = false, workspaceScopeSupport = null } = {})`
98
104
  - `registerRuntimeRoutes(router, resolveCurrentAppConfig, { requiresWorkspace = false, workspaceScopeSupport = null } = {})`
99
105
 
@@ -195,6 +201,8 @@ Exports
195
201
  - `WORKSPACES_SERVER_SCOPE_SUPPORT_TOKEN`
196
202
  - `isWorkspaceServerScopeSupport(value)`
197
203
  - `resolveWorkspaceServerScopeSupport(scope = null, { required = false, caller = "assistant-runtime" } = {})`
204
+ Local functions
205
+ - `hasWorkspaceRouteParamsDefinition(value)`
198
206
 
199
207
  ### `src/shared/assistantRuntimeConfig.js`
200
208
  Exports
@@ -40,6 +40,7 @@ Exports
40
40
  - `AUTH_POLICY_CONTEXT_RESOLVER_TAG`
41
41
  - `registerAuthPolicyContextResolver(app, token, factory)`
42
42
  - `resolveAuthPolicyContextResolvers(scope)`
43
+ - `resolveComposedAuthPolicyContextResolver(scope)`
43
44
  - `mergeAuthPolicyContexts(contexts = [])`
44
45
  - `composeAuthPolicyContextResolvers(resolvers = [])`
45
46
  Local functions
@@ -204,6 +205,16 @@ Exports
204
205
 
205
206
  ### `src/shared/commands/authCommandValidators.js`
206
207
  Exports
208
+ - `authEmailFieldDefinition`
209
+ - `authPasswordFieldDefinition`
210
+ - `authLoginPasswordFieldDefinition`
211
+ - `authRecoveryTokenFieldDefinition`
212
+ - `authAccessTokenFieldDefinition`
213
+ - `authRefreshTokenFieldDefinition`
214
+ - `oauthProviderFieldDefinition`
215
+ - `authMethodIdFieldDefinition`
216
+ - `authMethodKindFieldDefinition`
217
+ - `oauthReturnToFieldDefinition`
207
218
  - `authEmailValidator`
208
219
  - `authPasswordValidator`
209
220
  - `authLoginPasswordValidator`
@@ -214,17 +225,17 @@ Exports
214
225
  - `authMethodIdValidator`
215
226
  - `authMethodKindValidator`
216
227
  - `oauthReturnToValidator`
217
- - `okResponseValidator`
218
- - `okMessageResponseValidator`
219
- - `registerResponseValidator`
220
- - `loginResponseValidator`
221
- - `otpVerifyResponseValidator`
222
- - `oauthCompleteResponseValidator`
223
- - `devLoginAsResponseValidator`
224
- - `logoutResponseValidator`
225
- - `oauthProviderCatalogEntryValidator`
226
- - `sessionResponseValidator`
227
- - `sessionUnavailableResponseValidator`
228
+ - `okOutputValidator`
229
+ - `okMessageOutputValidator`
230
+ - `registerOutputValidator`
231
+ - `loginOutputValidator`
232
+ - `otpVerifyOutputValidator`
233
+ - `oauthCompleteOutputValidator`
234
+ - `devLoginAsOutputValidator`
235
+ - `logoutOutputValidator`
236
+ - `oauthProviderCatalogEntryOutputValidator`
237
+ - `sessionOutputValidator`
238
+ - `sessionUnavailableOutputValidator`
228
239
  - `createCommandMessages({ fields = {}, defaultMessage = "Invalid value." } = {})`
229
240
 
230
241
  ### `src/shared/commands/authDevLoginAsCommand.js`
@@ -236,7 +247,7 @@ Exports
236
247
  ### `src/shared/commands/authLoginOAuthCompleteCommand.js`
237
248
  Exports
238
249
  - `authLoginOAuthCompleteBodyValidator`
239
- - `oauthCompleteResponseValidator`
250
+ - `oauthCompleteOutputValidator`
240
251
  - `AUTH_LOGIN_OAUTH_COMPLETE_MESSAGES`
241
252
  - `authLoginOAuthCompleteCommand`
242
253
 
@@ -244,62 +255,62 @@ Exports
244
255
  Exports
245
256
  - `authLoginOAuthStartParamsValidator`
246
257
  - `authLoginOAuthStartQueryValidator`
247
- - `authLoginOAuthStartResponseValidator`
258
+ - `authLoginOAuthStartOutputValidator`
248
259
  - `AUTH_LOGIN_OAUTH_START_MESSAGES`
249
260
  - `authLoginOAuthStartCommand`
250
261
 
251
262
  ### `src/shared/commands/authLoginOtpRequestCommand.js`
252
263
  Exports
253
264
  - `authLoginOtpRequestBodyValidator`
254
- - `okMessageResponseValidator`
265
+ - `okMessageOutputValidator`
255
266
  - `AUTH_LOGIN_OTP_REQUEST_MESSAGES`
256
267
  - `authLoginOtpRequestCommand`
257
268
 
258
269
  ### `src/shared/commands/authLoginOtpVerifyCommand.js`
259
270
  Exports
260
271
  - `authLoginOtpVerifyBodyValidator`
261
- - `otpVerifyResponseValidator`
272
+ - `otpVerifyOutputValidator`
262
273
  - `AUTH_LOGIN_OTP_VERIFY_MESSAGES`
263
274
  - `authLoginOtpVerifyCommand`
264
275
 
265
276
  ### `src/shared/commands/authLoginPasswordCommand.js`
266
277
  Exports
267
278
  - `authLoginPasswordBodyValidator`
268
- - `loginResponseValidator`
279
+ - `loginOutputValidator`
269
280
  - `AUTH_LOGIN_PASSWORD_MESSAGES`
270
281
  - `authLoginPasswordCommand`
271
282
 
272
283
  ### `src/shared/commands/authLogoutCommand.js`
273
284
  Exports
274
- - `logoutResponseValidator`
285
+ - `logoutOutputValidator`
275
286
  - `AUTH_LOGOUT_MESSAGES`
276
287
  - `authLogoutCommand`
277
288
 
278
289
  ### `src/shared/commands/authPasswordRecoveryCompleteCommand.js`
279
290
  Exports
280
291
  - `authPasswordRecoveryCompleteBodyValidator`
281
- - `okResponseValidator`
292
+ - `okOutputValidator`
282
293
  - `AUTH_PASSWORD_RECOVERY_COMPLETE_MESSAGES`
283
294
  - `authPasswordRecoveryCompleteCommand`
284
295
 
285
296
  ### `src/shared/commands/authPasswordResetCommand.js`
286
297
  Exports
287
298
  - `authPasswordResetBodyValidator`
288
- - `okMessageResponseValidator`
299
+ - `okMessageOutputValidator`
289
300
  - `AUTH_PASSWORD_RESET_MESSAGES`
290
301
  - `authPasswordResetCommand`
291
302
 
292
303
  ### `src/shared/commands/authPasswordResetRequestCommand.js`
293
304
  Exports
294
305
  - `authPasswordResetRequestBodyValidator`
295
- - `okMessageResponseValidator`
306
+ - `okMessageOutputValidator`
296
307
  - `AUTH_PASSWORD_RESET_REQUEST_MESSAGES`
297
308
  - `authPasswordResetRequestCommand`
298
309
 
299
310
  ### `src/shared/commands/authRegisterCommand.js`
300
311
  Exports
301
312
  - `authRegisterBodyValidator`
302
- - `registerResponseValidator`
313
+ - `registerOutputValidator`
303
314
  - `AUTH_REGISTER_MESSAGES`
304
315
  - `authRegisterCommand`
305
316
 
@@ -311,8 +322,8 @@ Exports
311
322
 
312
323
  ### `src/shared/commands/authSessionReadCommand.js`
313
324
  Exports
314
- - `sessionResponseValidator`
315
- - `sessionUnavailableResponseValidator`
325
+ - `sessionOutputValidator`
326
+ - `sessionUnavailableOutputValidator`
316
327
  - `AUTH_SESSION_READ_MESSAGES`
317
328
  - `authSessionReadCommand`
318
329
 
@@ -37,6 +37,10 @@ Exports
37
37
  - `safeRequestCookies(request)`
38
38
  - `cookieOptions(isProduction, maxAge)`
39
39
 
40
+ ### `src/server/lib/authenticatedProfile.js`
41
+ Exports
42
+ - `requireAuthenticatedProfile(profileLike, { context = "authenticated profile" } = {})`
43
+
40
44
  ### `src/server/lib/authErrorMappers.js`
41
45
  Exports
42
46
  - `isTransientAuthMessage(message)`
@@ -54,12 +58,8 @@ Exports
54
58
  ### `src/server/lib/authInputParsers.js`
55
59
  Exports
56
60
  - `normalizeOAuthProviderInput(value, options = {})`
57
- - `validatePasswordRecoveryPayload(payload)`
58
- - `parseOAuthCompletePayload(payload = {}, options = {})`
59
- - `parseOtpLoginVerifyPayload(payload = {})`
60
61
  - `mapOAuthCallbackError(errorCode)`
61
62
  Local functions
62
- - `applySessionPairValidation(accessToken, refreshToken, fieldErrors)`
63
63
  - `resolveConfiguredOAuthProviders(options = {})`
64
64
 
65
65
  ### `src/server/lib/authJwt.js`
@@ -212,10 +212,7 @@ Exports
212
212
  - `buildOAuthLoginRedirectUrl`
213
213
  - `buildOAuthLinkRedirectUrl`
214
214
  - `normalizeOAuthProviderInput`
215
- - `parseOAuthCompletePayload`
216
- - `parseOtpLoginVerifyPayload`
217
215
  - `mapOAuthCallbackError`
218
- - `validatePasswordRecoveryPayload`
219
216
  - `resolveSupabaseOAuthProviderCatalog`
220
217
  - `resolveOAuthProviderQueryParams`
221
218
  - `buildOAuthProviderCatalogResponse`