@collective-intelligence/external-apps-server-sdk 0.2.5 → 0.2.7

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.
@@ -36,8 +36,9 @@ export const getLead = async (organizationId: string, entityId: string) => {
36
36
  - `schema` is the FQN of the schema.
37
37
  - Read a get with `knowledge.query` and `op: "get"`. Return only the answer of
38
38
  an ok result, and throw on an error envelope: a thrown read is not cached.
39
- - Tags: `ciTag.all`, the Schema Tag, and the Entity Tag of a get or the Topic
40
- Tag of a filtered list. To name a tag yourself, use `ciTag.entity(fqn, id)`,
39
+ - Tags: `ciTag.all`, the Schema Tag, and the Entity Tag of a get or the List
40
+ Tag of a list, with the Topic Tag of a filtered list. To name a tag
41
+ yourself, use `ciTag.entity(fqn, id)`, `ciTag.list(fqn)`,
41
42
  `ciTag.schema(fqn)` or `ciTag.topic({ schema, filter })`. A tag is a
42
43
  `CiTag`, a branded string; the SDK computes it.
43
44
  - Lifetime: `life`, by default `{ stale: 60, revalidate: 60, expire: 86400 }`
@@ -72,8 +73,9 @@ When the app API is an Effect server, keep `next` out of it:
72
73
 
73
74
  ## Write invalidation
74
75
 
75
- After CI confirms a write, the SDK expires the Entity Tag and the Schema Tag
76
- of its record, so the next read computes the entry again. This covers
76
+ After CI confirms a write, the SDK expires the Entity Tag of its record and
77
+ the List Tag of its schema, so the next read of that record and of each list
78
+ computes the entry again. The gets of other records keep their entries. This covers
77
79
  `resources.records` writes and each write through the CI entity proxy
78
80
  (`ciResources` of the BFF, `createCiResourceMounts`, `defineCiEntityResource`,
79
81
  `CiEntities`). A read, and a write that CI refuses or that fails, expires
package/docs/realtime.md CHANGED
@@ -54,11 +54,12 @@ Then give the browser realtime client
54
54
 
55
55
  ## What the Revalidate Route expires
56
56
 
57
- - For each accepted change: the Topic Tag (the Schema Tag for a topic without
57
+ - For each accepted change: the Topic Tag (the List Tag for a topic without
58
58
  a filter) and the Entity Tag. These are the tags that `cacheCiRead` writes;
59
59
  see [next-cache.md](next-cache.md).
60
- - `reset: true`, after a `reset` or `access-changed` event: the tag of each
61
- topic in the token.
60
+ - `reset: true`, after a `reset` or `access-changed` event: for each topic in
61
+ the token, the Schema Tag of a topic without a filter (the missed changes
62
+ have no ids, so the gets expire too), or the Topic Tag of a filtered topic.
62
63
  - It calls `revalidateTag(tag, { expire: 0 })`. On one instance, the first post
63
64
  of a tag expires it at once and opens a 1-second window; more posts in the
64
65
  window expire it once more at the window end, through `after`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@collective-intelligence/external-apps-server-sdk",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Server-side client and proxy adapters for Collective Intelligence external applications.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -252,5 +252,5 @@
252
252
  "vitest": "5.0.2",
253
253
  "zod": "4.4.3"
254
254
  },
255
- "gitHead": "854692172c956fe8f0bbc6a0fdf8bcaa6e2787ef"
255
+ "gitHead": "5c6e6747e229d629d02380e62f0574c3e37d0090"
256
256
  }