@mnmal-ai/cortext-opencode 1.0.0-alpha.3 → 1.0.0-alpha.5

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/dist/plugin.js CHANGED
@@ -1611,9 +1611,13 @@ function withTimeout$1(timeoutMs) {
1611
1611
  *
1612
1612
  * `onDiagnostics` is the raw escape hatch, for callers that need the per-type
1613
1613
  * unknown sets to do their own cross-type comparison.
1614
+ *
1615
+ * `onPagination` receives the server's per-frame `_pagination` map
1616
+ * (`{ [key]: { hasMore, nextCursor } }`, `{}` when absent). A caller whose
1617
+ * answer depends on completeness pages on `nextCursor` until `hasMore` is false.
1614
1618
  */
1615
1619
  async function substrateQuery(substrateUrl, payload, opts = {}) {
1616
- const { fetchImpl = fetch, timeoutMs = DEFAULT_TIMEOUT_MS, expectUnknown = [], onUnexpectedProjection = null, onDiagnostics = null, onFrameFailure = null } = opts;
1620
+ const { fetchImpl = fetch, timeoutMs = DEFAULT_TIMEOUT_MS, expectUnknown = [], onUnexpectedProjection = null, onDiagnostics = null, onFrameFailure = null, onPagination = null } = opts;
1617
1621
  const { signal, done } = withTimeout$1(timeoutMs);
1618
1622
  try {
1619
1623
  const res = await fetchImpl(`${substrateUrl}/substrate/v1/query`, {
@@ -1635,6 +1639,7 @@ async function substrateQuery(substrateUrl, payload, opts = {}) {
1635
1639
  if (residue.length > 0) onUnexpectedProjection(residue);
1636
1640
  }
1637
1641
  } catch {}
1642
+ if (onPagination !== null) onPagination(json._pagination ?? {});
1638
1643
  return json.data ?? {};
1639
1644
  } finally {
1640
1645
  done();
@@ -1,4 +1,4 @@
1
- <!-- substrate-conventions vsynoptic-1.0.0-alpha.3+99787976 — opencode skin; plugin-owned, do not edit. Edit your own AGENTS.md instead. Body is shared with the Claude skin's fragment (test/instructions-sync.test.ts enforces it). -->
1
+ <!-- substrate-conventions vsynoptic-1.0.0-alpha.5+9d0bf8e1 — opencode skin; plugin-owned, do not edit. Edit your own AGENTS.md instead. Body is shared with the Claude skin's fragment (test/instructions-sync.test.ts enforces it). -->
2
2
 
3
3
  # Substrate interaction conventions
4
4
 
@@ -185,6 +185,8 @@ Memory is scoped by the `project` field on each row (repo basename), **not** by
185
185
 
186
186
  **Reading:** memory is **not preloaded**; the cold-start carries no memory section. When a task touches prior work, call `recall` with `namespace`, a topic `query` and `type: "Memory"` (or `"SessionLog"` / `"Decision"`; the tool defaults to Decision), scoped with `where: { project: { in: ["<repo>", null] } }`. Or query `<ns>/Memory` by `name`.
187
187
 
188
+ **Hits carry handles, not bodies** (substrate ≥ 1.0.0-alpha.4; older servers return the whole row). Each hit's `row` is `id` plus the handle fields it has (`name`, `title`, `topic`, `synopsis`, `description`), which is usually enough to decide. Ask for the body only on hits you will read: `rowFields: { body: true }` (or `true` for the whole row) on the MCP tool and the HTTP route, `fields: { id: true, row: { body: true } }` on the `recall/Hit` frame.
189
+
188
190
  **Writing:** `cortext/createMemory`. Recall first: update an existing row covering the same fact rather than creating a duplicate.
189
191
 
190
192
  ## Cold-start
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mnmal-ai/cortext-opencode",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.5",
4
4
  "description": "Cortext — the OpenCode skin: cold-start injection via experimental.chat.system.transform, bundling the @mnmal-ai/synoptic host into a committed dist artifact. Installed as an OpenCode plugin (\"plugin\": [\"@mnmal-ai/cortext-opencode\"]). Published to npm, not the Claude marketplace.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -25,7 +25,7 @@
25
25
  "access": "public"
26
26
  },
27
27
  "devDependencies": {
28
- "@mnmal-ai/synoptic": "1.0.0-alpha.3",
28
+ "@mnmal-ai/synoptic": "1.0.0-alpha.5",
29
29
  "@opencode-ai/plugin": "^1.18.35",
30
30
  "@opencode/plugin": "^2.0.24",
31
31
  "@types/node": "^26.6.4",