@jskit-ai/agent-docs 0.1.269 → 0.1.271
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-extras/assistant-conversation.md +3 -2
- package/guide/agent/app-extras/assistant.md +35 -0
- package/guide/agent/app-setup/database-layer.md +4 -0
- package/guide/agent/app-setup/existing-application-migration.md +3 -0
- package/guide/agent/app-setup/initial-scaffolding.md +76 -0
- package/guide/agent/framework/typed-features.md +41 -0
- package/package.json +1 -1
- package/patterns/feature-package/example/booking-engine/package.json +1 -1
- package/patterns/minimal-foundation/PATTERN.md +3 -1
- package/patterns/minimal-foundation/example/package.json +4 -4
- package/patterns/minimal-foundation/example/server.js +9 -6
- package/patterns/minimal-foundation/example/tests/server/smoke.test.js +3 -4
- package/patterns/shell-foundation/example/package.json +5 -5
- package/patterns/shell-foundation/example/packages/main/package.json +1 -1
- package/patterns/shell-foundation/example/server.js +9 -6
- package/patterns/shell-foundation/example/tests/server/smoke.test.js +3 -4
- package/reference/autogen/PATTERN_INDEX.md +37 -37
- package/reference/autogen/packages/agent.md +1 -1
- package/reference/autogen/packages/assistant-runtime.md +1 -0
- package/reference/autogen/packages/crud-core.md +3 -2
- package/reference/autogen/packages/json-rest-api-core.md +1 -0
- package/reference/autogen/packages/kernel.md +24 -1
- package/skills/jskit/references/existing-application-migration.md +3 -0
- package/skills/jskit/references/heuristics/INDEX.md +1 -1
- package/skills/jskit/references/heuristics/typed-features.md +2 -0
- package/skills/jskit/references/pattern-index.md +37 -37
- package/skills/jskit/references/patterns/app/minimal-foundation/PATTERN.md +3 -1
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +4 -4
- package/skills/jskit/references/patterns/app/minimal-foundation/example/server.js +9 -6
- package/skills/jskit/references/patterns/app/minimal-foundation/example/tests/server/smoke.test.js +3 -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/app/shell-foundation/example/server.js +9 -6
- package/skills/jskit/references/patterns/app/shell-foundation/example/tests/server/smoke.test.js +3 -4
- package/skills/jskit/references/patterns/assistant/assistant-surface/PATTERN.md +5 -0
- package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +2 -2
- package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
- 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/PATTERN.md +11 -0
- 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/typed-features.md +41 -0
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"./shared": "./src/shared/index.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@jskit-ai/crud-core": "0.2.
|
|
14
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
13
|
+
"@jskit-ai/crud-core": "0.2.9",
|
|
14
|
+
"@jskit-ai/resource-crud-core": "0.1.199"
|
|
15
15
|
},
|
|
16
16
|
"jskit": {
|
|
17
17
|
"kind": "runtime",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"./shared": "./src/shared/index.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@jskit-ai/crud-core": "0.2.
|
|
14
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
15
|
-
"@jskit-ai/workspaces-core": "0.2.
|
|
13
|
+
"@jskit-ai/crud-core": "0.2.9",
|
|
14
|
+
"@jskit-ai/resource-crud-core": "0.1.199",
|
|
15
|
+
"@jskit-ai/workspaces-core": "0.2.10"
|
|
16
16
|
},
|
|
17
17
|
"jskit": {
|
|
18
18
|
"kind": "runtime",
|
|
@@ -678,6 +678,47 @@ const trx = resolveTransaction(options);
|
|
|
678
678
|
const trx = options?.trx || options?.transaction || null;
|
|
679
679
|
```
|
|
680
680
|
|
|
681
|
+
### Every row
|
|
682
|
+
|
|
683
|
+
**A server-side resource query that needs every row it matches reads them
|
|
684
|
+
with `queryAllJsonRestCollectionRows(resource, params, context)`
|
|
685
|
+
(`@jskit-ai/json-rest-api-core/server/jsonRestApiHost`). A query without a
|
|
686
|
+
page means "the first 20 rows".**
|
|
687
|
+
|
|
688
|
+
- json-rest-api answers a query that names no page with the resource's
|
|
689
|
+
default page, 20 rows, and says nothing about the rest. The CRUD
|
|
690
|
+
repository's `queryDocuments(query)` without a `limit` is the same first
|
|
691
|
+
page.
|
|
692
|
+
- The helper reads cursor pages of the resource's maximum size
|
|
693
|
+
(`queryMaxLimit`, 100 unless the resource sets it) in id order until none
|
|
694
|
+
follows, keeping the call's transaction and context, so no row is skipped
|
|
695
|
+
or repeated. It sets the page and sort itself; sort the rows it returns.
|
|
696
|
+
- A lookup by a unique key (an id, a slug, a token hash, a unique pair such
|
|
697
|
+
as workspace and user) matches at most one row and may read `rows[0]` of a
|
|
698
|
+
plain query. A read of the newest or first few rows names its own `sort`
|
|
699
|
+
and `page`.
|
|
700
|
+
- HTTP list routes keep the caller's page: their default and maximum page
|
|
701
|
+
sizes are public behaviour, not a server-side limit to raise.
|
|
702
|
+
|
|
703
|
+
Why: a list read without a page looks complete until the 21st row, then
|
|
704
|
+
silently drops the rest from every person picker, scope and delivery built on it.
|
|
705
|
+
|
|
706
|
+
```js
|
|
707
|
+
// good
|
|
708
|
+
const rows = await queryAllJsonRestCollectionRows(api.resources.workspaceMemberships, {
|
|
709
|
+
queryParams: { filters: { workspace: workspaceId, status: "active" }, include: ["user"] },
|
|
710
|
+
transaction: resolveTransaction(options),
|
|
711
|
+
format: "plain"
|
|
712
|
+
}, options.context);
|
|
713
|
+
|
|
714
|
+
// bad: the first 20 members only
|
|
715
|
+
const rows = extractJsonRestCollectionRows(await api.resources.workspaceMemberships.query({
|
|
716
|
+
queryParams: { filters: { workspace: workspaceId, status: "active" }, include: ["user"] },
|
|
717
|
+
transaction: resolveTransaction(options),
|
|
718
|
+
format: "plain"
|
|
719
|
+
}, createJsonRestContext(options.context)));
|
|
720
|
+
```
|
|
721
|
+
|
|
681
722
|
### Routes
|
|
682
723
|
|
|
683
724
|
**A route does HTTP work only (status, cookies, redirects) and runs an action
|