openvibers/openvibe.sdk Commits
0.124.0: openvibe-sdk/blog writes a body of Markdown or of blocks (#165)
Changes
@@@ -1,5 +1,9 @@# Changelog++## 0.125.0 (2026-11-09)++++- openvibe-sdk/blog: posts are written and read as Markdown or as blocks (publishing.block@1), ?format=blocks++## 0.124.0 (2026-11-09)- OpenVibe Link: `openvibe-sdk/node` is `openvibe-sdk/link` (`ov.node` is `ov.link`), building@@@ -10,7 +10,7 @@ npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags> Supported browser and server clients for the OpenVibe platform.--**Status:** alpha, v0.124.0 (the five 1.0 core entries — `core`, `auth`, `events`, `db` and `media` — are frozen: their exported names change only with a major release; roadmap Wave 2; developer apps from Wave 20; Media objects v2 from Wave 4; the Tools platform API; Search, Chat, AI, Vision and consent clients; sign-in with recovery and a client health check). Every release is tagged (see [CHANGELOG.md](CHANGELOG.md)). Tested against local stub servers and the built-in mock platform only, never against the live platform. Services pin release tags; each repository's `STATUS.json` names the one it uses.++**Status:** alpha, v0.125.0 (the five 1.0 core entries — `core`, `auth`, `events`, `db` and `media` — are frozen: their exported names change only with a major release; roadmap Wave 2; developer apps from Wave 20; Media objects v2 from Wave 4; the Tools platform API; Search, Chat, AI, Vision and consent clients; sign-in with recovery and a client health check). Every release is tagged (see [CHANGELOG.md](CHANGELOG.md)). Tested against local stub servers and the built-in mock platform only, never against the live platform. Services pin release tags; each repository's `STATUS.json` names the one it uses.**Plan:** OpenVibe End-to-End Realignment & Implementation Plan, revision 3 (20 Sep 2026), §3.2; roadmap §30.**License:** MIT ([LICENSE](LICENSE)). This package is a library that apps outside the network embed, so it uses MIT. The OpenVibe services themselves stay AGPL-3.0.@@@ -19,7 +19,7 @@ npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tagsAfter v0.97.1 is tagged:```bash--npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.124.0++npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.125.0```It has no runtime dependencies. It needs Node ≥ 20, or any browser with `fetch`, Web Crypto and `TextDecoder`. There is no build step. The package is CommonJS with ESM entry points (`import` works). Each subpath has its own `.d.ts`. For a page with no bundler, `browser/openvibe-sdk.mjs` is one self-contained ES module of the browser-safe subpaths (see [Browser without a bundler](#browser-without-a-bundler)). It does not depend on `openvibe-contracts` at runtime: it copies the contract types it uses (from the temporary Contracts sharing branch, a devDependency the tests check them against).@@@ -3,7 +3,7 @@"stage": "alpha","code": true,"wave": "W2",-- "version": "0.124.0",++ "version": "0.125.0","plan": "OpenVibe End-to-End Realignment & Implementation Plan, revision 3 (20 Sep 2026), §3.2; roadmap §30","deployed": false,"deployment": "none: a package released as git tags; services and apps pin a tag",@@@ -1,4 +1,4 @@--// Generated by scripts/browser-bundle.js from browser.js (openvibe-sdk 0.124.0, MIT). Do not edit.++// Generated by scripts/browser-bundle.js from browser.js (openvibe-sdk 0.125.0, MIT). Do not edit.// One self-contained ES module: core at the top level plus the browser-safe subpaths as namespaces// (auth, locker, registry, trust, modules, realtime, media, cam, mediaUpload, ui, community, homeFeed, bot, search, bench, meme, vision, themes, design, redact, chat, ai, credentials, jobs, tools, projects, geo). No server-only code: no service tokens, JWT verification, events, identity./* eslint-disable */@@@ -56,7 +56,7 @@ const { paginate, offsetPager } = __load(7);const semver = __load(6);/** The package version (test/version.test.js keeps it equal to package.json). */--const SDK_VERSION = '0.124.0';++const SDK_VERSION = '0.125.0';module.exports = {createClient,@@@ -1,12 +1,12 @@{"name": "openvibe-sdk",-- "version": "0.124.0",++ "version": "0.125.0","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "openvibe-sdk",-- "version": "0.124.0",++ "version": "0.125.0","license": "MIT","bin": {"openvibe-download": "bin/openvibe-download.js"@@@ -1,6 +1,6 @@{"name": "openvibe-sdk",-- "version": "0.124.0",++ "version": "0.125.0","description": "Supported browser and server clients for the OpenVibe platform: auth (incl. developer apps), registry discovery, identity, user modules, events, realtime, media, community, Bot robots, search, chat, AI runs, Tools (registry, run API and jobs), VIP memberships and developer projects, the async PostgreSQL data layer (db) and the Valkey cache, limits store, queue and pub/sub, with deadlines, safe retries, problem errors and trace propagation.","main": "index.js","types": "types/index.d.ts",@@@ -8,6 +8,7 @@* const blog = createBlogClient(createClient({ tokenProvider }));* const { posts, total } = await blog.blogs.posts('goosely', { limit: 10 }); // published, public* const { post } = await blog.posts.create('goosely', { title: 'Tonight on stream', body: '…', visibility: 'public' });++ * const { post } = await blog.posts.create('goosely', { title: 'With blocks', blocks: { type: 'root', children: [] } });* await blog.posts.update(post.id, { body: '… (edited)', expected_revision: 1 }); // a new revision* await blog.posts.publish(post.id); // the latest revision* await blog.posts.schedule(post.id, { at: '2026-10-21T18:00:00Z' });@@@ -48,12 +49,22 @@ function createBlogClient(client, { baseUrl } = {}) {feed: (h, { signal } = {}) => call({ path: `${handle(h)}/feed`, signal }),},posts: {-- /** A draft on a blog the person belongs to (blog.post-create-request@1: title required) → { post, revision }. */++ /**++ * A draft on a blog the person belongs to (blog.post-create-request@1: title required) → { post, revision }.++ * The body is Markdown, or the blocks of a body: posts.create(handle, { title, markdown }) or++ * posts.create(handle, { title, blocks }). The Markdown is what the post keeps, so blocks are++ * written back as the Markdown they parse from.++ */create: (h, fields, { signal } = {}) => {if (!fields || typeof fields.title !== 'string' || !fields.title.trim()) throw new TypeError('blog.posts.create: a title');++ if (fields.blocks !== undefined && fields.blocks !== null && fields.body === undefined && fields.markdown === undefined) {++ if (typeof fields.blocks !== 'object') throw new TypeError('blog.posts.create: blocks is a block tree');++ }return call({ method: 'POST', path: `${handle(h)}/posts`, json: fields, idempotencyKey: false, signal });},get: (id, { signal } = {}) => call({ path: post(id), signal }),++ /** The blocks of a post, parsed (GET /posts/:id?format=blocks). */++ blocks: (id, { signal } = {}) => call({ path: post(id, '?format=blocks'), signal }),/** Edit: a new revision unless nothing changed ({ post, revision, created }); expected_revision guards a race. */update: (id, fields, { signal } = {}) => call({ method: 'PATCH', path: post(id), json: fields, idempotent: true, signal }),/** Publish a revision (the latest when omitted). */@@@ -8,7 +8,7 @@ const { paginate, offsetPager } = require('./paginate');const semver = require('./semver');/** The package version (test/version.test.js keeps it equal to package.json). */--const SDK_VERSION = '0.124.0';++const SDK_VERSION = '0.125.0';module.exports = {createClient,@@@ -137,9 +137,9 @@ run([const words = phrase.split(' ');assert.equal(words.length, 24, 'the phrase has 24 words');for (const word of words) assert.ok(locker.WORDS.includes(word), `${word} is one of the 256`);-- // Two phrases are never the same: the words come from the platform's CSPRNG.++ // Two phrases are never the same: the words come from the platform's CSPRNG. (Not the first words alone: two++ // phrases share one 1 time in 256, which failed SDK #165's macOS run on 2026-11-09.)assert.notEqual(phrase, locker.recoveryWords());-- assert.notEqual(phrase.split(' ')[0], locker.recoveryWords().split(' ')[0]);// Another number of words, and the same check on a typed phrase.assert.equal(locker.recoveryWords(12).split(' ').length, 12);assert.equal(locker.isRecoveryPhrase(phrase), true);@@@ -239,6 +239,7 @@ const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, meawait blog.blogs.feed('goosely');await busyOnce(() => blog.posts.create('goosely', { title: 'Tonight on stream', body: 'Hi', visibility: 'public' }));await blog.posts.get(ids.post);++ await blog.posts.blocks(ids.post);await blog.posts.update(ids.post, { body: 'Hi again', expected_revision: 1 });await blog.posts.publish(ids.post);await blog.posts.unpublish(ids.post);@@@ -252,11 +253,11 @@ const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, meconst P = `/api/v1/posts/${ids.post}`;assert.deepStrictEqual(b.map((x) => `${x.method} ${x.url}`), ['GET /api/v1/blogs/goosely', 'GET /api/v1/blogs/goosely/posts?limit=10&all=1', 'GET /api/v1/blogs/goosely/feed',-- 'POST /api/v1/blogs/goosely/posts', `GET ${P}`, `PATCH ${P}`, `PATCH ${P}`, `POST ${P}/publish`, `POST ${P}/publish`,++ 'POST /api/v1/blogs/goosely/posts', `GET ${P}`, `GET ${P}?format=blocks`, `PATCH ${P}`, `PATCH ${P}`, `POST ${P}/publish`, `POST ${P}/publish`,`POST ${P}/unpublish`, `POST ${P}/unpublish`, `POST ${P}/schedule`, `POST ${P}/schedule`, `DELETE ${P}/schedule`,`DELETE ${P}/schedule`, `POST ${P}/revert`, `GET ${P}/revisions`, `GET ${P}/revisions/2`, `DELETE ${P}`, `DELETE ${P}`,]);-- assert.deepStrictEqual(b[11].body, { at: '2026-10-21T18:00:00Z', revision: 2 });++ assert.deepStrictEqual(b[12].body, { at: '2026-10-21T18:00:00Z', revision: 2 });assert.throws(() => blog.posts.get('post_1'), /pst_/);assert.throws(() => blog.posts.create('goosely', { body: 'no title' }), /title/);assert.throws(() => blog.posts.schedule(ids.post, { at: 'tomorrow' }), /ISO 8601/);
@@ -1,5 +1,9 @@
@@ -1,5 +1,9 @@
# Changelog
# Changelog
+## 0.125.0 (2026-11-09)
+
+- openvibe-sdk/blog: posts are written and read as Markdown or as blocks (publishing.block@1), ?format=blocks
+
## 0.124.0 (2026-11-09)
## 0.124.0 (2026-11-09)
- OpenVibe Link: `openvibe-sdk/node` is `openvibe-sdk/link` (`ov.node` is `ov.link`), building
- OpenVibe Link: `openvibe-sdk/node` is `openvibe-sdk/link` (`ov.node` is `ov.link`), building
@@ -10,7 +10,7 @@ npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags
@@ -10,7 +10,7 @@ npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags
> Supported browser and server clients for the OpenVibe platform.
> Supported browser and server clients for the OpenVibe platform.
-**Status:** alpha, v0.124.0 (the five 1.0 core entries — `core`, `auth`, `events`, `db` and `media` — are frozen: their exported names change only with a major release; roadmap Wave 2; developer apps from Wave 20; Media objects v2 from Wave 4; the Tools platform API; Search, Chat, AI, Vision and consent clients; sign-in with recovery and a client health check). Every release is tagged (see [CHANGELOG.md](CHANGELOG.md)). Tested against local stub servers and the built-in mock platform only, never against the live platform. Services pin release tags; each repository's `STATUS.json` names the one it uses.
+**Status:** alpha, v0.125.0 (the five 1.0 core entries — `core`, `auth`, `events`, `db` and `media` — are frozen: their exported names change only with a major release; roadmap Wave 2; developer apps from Wave 20; Media objects v2 from Wave 4; the Tools platform API; Search, Chat, AI, Vision and consent clients; sign-in with recovery and a client health check). Every release is tagged (see [CHANGELOG.md](CHANGELOG.md)). Tested against local stub servers and the built-in mock platform only, never against the live platform. Services pin release tags; each repository's `STATUS.json` names the one it uses.
**Plan:** OpenVibe End-to-End Realignment & Implementation Plan, revision 3 (20 Sep 2026), §3.2; roadmap §30.
**Plan:** OpenVibe End-to-End Realignment & Implementation Plan, revision 3 (20 Sep 2026), §3.2; roadmap §30.
**License:** MIT ([LICENSE](LICENSE)). This package is a library that apps outside the network embed, so it uses MIT. The OpenVibe services themselves stay AGPL-3.0.
**License:** MIT ([LICENSE](LICENSE)). This package is a library that apps outside the network embed, so it uses MIT. The OpenVibe services themselves stay AGPL-3.0.
@@ -19,7 +19,7 @@ npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags
@@ -19,7 +19,7 @@ npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags
After v0.97.1 is tagged:
After v0.97.1 is tagged:
```bash
```bash
-npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.124.0
+npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.125.0
```
```
It has no runtime dependencies. It needs Node ≥ 20, or any browser with `fetch`, Web Crypto and `TextDecoder`. There is no build step. The package is CommonJS with ESM entry points (`import` works). Each subpath has its own `.d.ts`. For a page with no bundler, `browser/openvibe-sdk.mjs` is one self-contained ES module of the browser-safe subpaths (see [Browser without a bundler](#browser-without-a-bundler)). It does not depend on `openvibe-contracts` at runtime: it copies the contract types it uses (from the temporary Contracts sharing branch, a devDependency the tests check them against).
It has no runtime dependencies. It needs Node ≥ 20, or any browser with `fetch`, Web Crypto and `TextDecoder`. There is no build step. The package is CommonJS with ESM entry points (`import` works). Each subpath has its own `.d.ts`. For a page with no bundler, `browser/openvibe-sdk.mjs` is one self-contained ES module of the browser-safe subpaths (see [Browser without a bundler](#browser-without-a-bundler)). It does not depend on `openvibe-contracts` at runtime: it copies the contract types it uses (from the temporary Contracts sharing branch, a devDependency the tests check them against).
@@ -3,7 +3,7 @@
@@ -3,7 +3,7 @@
"stage": "alpha",
"stage": "alpha",
"code": true,
"code": true,
"wave": "W2",
"wave": "W2",
- "version": "0.124.0",
+ "version": "0.125.0",
"plan": "OpenVibe End-to-End Realignment & Implementation Plan, revision 3 (20 Sep 2026), §3.2; roadmap §30",
"plan": "OpenVibe End-to-End Realignment & Implementation Plan, revision 3 (20 Sep 2026), §3.2; roadmap §30",
"deployed": false,
"deployed": false,
"deployment": "none: a package released as git tags; services and apps pin a tag",
"deployment": "none: a package released as git tags; services and apps pin a tag",
@@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
-// Generated by scripts/browser-bundle.js from browser.js (openvibe-sdk 0.124.0, MIT). Do not edit.
+// Generated by scripts/browser-bundle.js from browser.js (openvibe-sdk 0.125.0, MIT). Do not edit.
// One self-contained ES module: core at the top level plus the browser-safe subpaths as namespaces
// One self-contained ES module: core at the top level plus the browser-safe subpaths as namespaces
// (auth, locker, registry, trust, modules, realtime, media, cam, mediaUpload, ui, community, homeFeed, bot, search, bench, meme, vision, themes, design, redact, chat, ai, credentials, jobs, tools, projects, geo). No server-only code: no service tokens, JWT verification, events, identity.
// (auth, locker, registry, trust, modules, realtime, media, cam, mediaUpload, ui, community, homeFeed, bot, search, bench, meme, vision, themes, design, redact, chat, ai, credentials, jobs, tools, projects, geo). No server-only code: no service tokens, JWT verification, events, identity.
/* eslint-disable */
/* eslint-disable */
@@ -56,7 +56,7 @@ const { paginate, offsetPager } = __load(7);
@@ -56,7 +56,7 @@ const { paginate, offsetPager } = __load(7);
const semver = __load(6);
const semver = __load(6);
/** The package version (test/version.test.js keeps it equal to package.json). */
/** The package version (test/version.test.js keeps it equal to package.json). */
-const SDK_VERSION = '0.124.0';
+const SDK_VERSION = '0.125.0';
module.exports = {
module.exports = {
createClient,
createClient,
@@ -1,12 +1,12 @@
@@ -1,12 +1,12 @@
{
{
"name": "openvibe-sdk",
"name": "openvibe-sdk",
- "version": "0.124.0",
+ "version": "0.125.0",
"lockfileVersion": 3,
"lockfileVersion": 3,
"requires": true,
"requires": true,
"packages": {
"packages": {
"": {
"": {
"name": "openvibe-sdk",
"name": "openvibe-sdk",
- "version": "0.124.0",
+ "version": "0.125.0",
"license": "MIT",
"license": "MIT",
"bin": {
"bin": {
"openvibe-download": "bin/openvibe-download.js"
"openvibe-download": "bin/openvibe-download.js"
@@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
{
{
"name": "openvibe-sdk",
"name": "openvibe-sdk",
- "version": "0.124.0",
+ "version": "0.125.0",
"description": "Supported browser and server clients for the OpenVibe platform: auth (incl. developer apps), registry discovery, identity, user modules, events, realtime, media, community, Bot robots, search, chat, AI runs, Tools (registry, run API and jobs), VIP memberships and developer projects, the async PostgreSQL data layer (db) and the Valkey cache, limits store, queue and pub/sub, with deadlines, safe retries, problem errors and trace propagation.",
"description": "Supported browser and server clients for the OpenVibe platform: auth (incl. developer apps), registry discovery, identity, user modules, events, realtime, media, community, Bot robots, search, chat, AI runs, Tools (registry, run API and jobs), VIP memberships and developer projects, the async PostgreSQL data layer (db) and the Valkey cache, limits store, queue and pub/sub, with deadlines, safe retries, problem errors and trace propagation.",
"main": "index.js",
"main": "index.js",
"types": "types/index.d.ts",
"types": "types/index.d.ts",
@@ -8,6 +8,7 @@
@@ -8,6 +8,7 @@
* const blog = createBlogClient(createClient({ tokenProvider }));
* const blog = createBlogClient(createClient({ tokenProvider }));
* const { posts, total } = await blog.blogs.posts('goosely', { limit: 10 }); // published, public
* const { posts, total } = await blog.blogs.posts('goosely', { limit: 10 }); // published, public
* const { post } = await blog.posts.create('goosely', { title: 'Tonight on stream', body: '…', visibility: 'public' });
* const { post } = await blog.posts.create('goosely', { title: 'Tonight on stream', body: '…', visibility: 'public' });
+ * const { post } = await blog.posts.create('goosely', { title: 'With blocks', blocks: { type: 'root', children: [] } });
* await blog.posts.update(post.id, { body: '… (edited)', expected_revision: 1 }); // a new revision
* await blog.posts.update(post.id, { body: '… (edited)', expected_revision: 1 }); // a new revision
* await blog.posts.publish(post.id); // the latest revision
* await blog.posts.publish(post.id); // the latest revision
* await blog.posts.schedule(post.id, { at: '2026-10-21T18:00:00Z' });
* await blog.posts.schedule(post.id, { at: '2026-10-21T18:00:00Z' });
@@ -48,12 +49,22 @@ function createBlogClient(client, { baseUrl } = {}) {
@@ -48,12 +49,22 @@ function createBlogClient(client, { baseUrl } = {}) {
feed: (h, { signal } = {}) => call({ path: `${handle(h)}/feed`, signal }),
feed: (h, { signal } = {}) => call({ path: `${handle(h)}/feed`, signal }),
},
},
posts: {
posts: {
- /** A draft on a blog the person belongs to (blog.post-create-request@1: title required) → { post, revision }. */
+ /**
+ * A draft on a blog the person belongs to (blog.post-create-request@1: title required) → { post, revision }.
+ * The body is Markdown, or the blocks of a body: posts.create(handle, { title, markdown }) or
+ * posts.create(handle, { title, blocks }). The Markdown is what the post keeps, so blocks are
+ * written back as the Markdown they parse from.
+ */
create: (h, fields, { signal } = {}) => {
create: (h, fields, { signal } = {}) => {
if (!fields || typeof fields.title !== 'string' || !fields.title.trim()) throw new TypeError('blog.posts.create: a title');
if (!fields || typeof fields.title !== 'string' || !fields.title.trim()) throw new TypeError('blog.posts.create: a title');
+ if (fields.blocks !== undefined && fields.blocks !== null && fields.body === undefined && fields.markdown === undefined) {
+ if (typeof fields.blocks !== 'object') throw new TypeError('blog.posts.create: blocks is a block tree');
+ }
return call({ method: 'POST', path: `${handle(h)}/posts`, json: fields, idempotencyKey: false, signal });
return call({ method: 'POST', path: `${handle(h)}/posts`, json: fields, idempotencyKey: false, signal });
},
},
get: (id, { signal } = {}) => call({ path: post(id), signal }),
get: (id, { signal } = {}) => call({ path: post(id), signal }),
+ /** The blocks of a post, parsed (GET /posts/:id?format=blocks). */
+ blocks: (id, { signal } = {}) => call({ path: post(id, '?format=blocks'), signal }),
/** Edit: a new revision unless nothing changed ({ post, revision, created }); expected_revision guards a race. */
/** Edit: a new revision unless nothing changed ({ post, revision, created }); expected_revision guards a race. */
update: (id, fields, { signal } = {}) => call({ method: 'PATCH', path: post(id), json: fields, idempotent: true, signal }),
update: (id, fields, { signal } = {}) => call({ method: 'PATCH', path: post(id), json: fields, idempotent: true, signal }),
/** Publish a revision (the latest when omitted). */
/** Publish a revision (the latest when omitted). */
@@ -8,7 +8,7 @@ const { paginate, offsetPager } = require('./paginate');
@@ -8,7 +8,7 @@ const { paginate, offsetPager } = require('./paginate');
const semver = require('./semver');
const semver = require('./semver');
/** The package version (test/version.test.js keeps it equal to package.json). */
/** The package version (test/version.test.js keeps it equal to package.json). */
-const SDK_VERSION = '0.124.0';
+const SDK_VERSION = '0.125.0';
module.exports = {
module.exports = {
createClient,
createClient,
@@ -137,9 +137,9 @@ run([
@@ -137,9 +137,9 @@ run([
const words = phrase.split(' ');
const words = phrase.split(' ');
assert.equal(words.length, 24, 'the phrase has 24 words');
assert.equal(words.length, 24, 'the phrase has 24 words');
for (const word of words) assert.ok(locker.WORDS.includes(word), `${word} is one of the 256`);
for (const word of words) assert.ok(locker.WORDS.includes(word), `${word} is one of the 256`);
- // Two phrases are never the same: the words come from the platform's CSPRNG.
+ // Two phrases are never the same: the words come from the platform's CSPRNG. (Not the first words alone: two
+ // phrases share one 1 time in 256, which failed SDK #165's macOS run on 2026-11-09.)
assert.notEqual(phrase, locker.recoveryWords());
assert.notEqual(phrase, locker.recoveryWords());
- assert.notEqual(phrase.split(' ')[0], locker.recoveryWords().split(' ')[0]);
// Another number of words, and the same check on a typed phrase.
// Another number of words, and the same check on a typed phrase.
assert.equal(locker.recoveryWords(12).split(' ').length, 12);
assert.equal(locker.recoveryWords(12).split(' ').length, 12);
assert.equal(locker.isRecoveryPhrase(phrase), true);
assert.equal(locker.isRecoveryPhrase(phrase), true);
@@ -239,6 +239,7 @@ const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, me
@@ -239,6 +239,7 @@ const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, me
await blog.blogs.feed('goosely');
await blog.blogs.feed('goosely');
await busyOnce(() => blog.posts.create('goosely', { title: 'Tonight on stream', body: 'Hi', visibility: 'public' }));
await busyOnce(() => blog.posts.create('goosely', { title: 'Tonight on stream', body: 'Hi', visibility: 'public' }));
await blog.posts.get(ids.post);
await blog.posts.get(ids.post);
+ await blog.posts.blocks(ids.post);
await blog.posts.update(ids.post, { body: 'Hi again', expected_revision: 1 });
await blog.posts.update(ids.post, { body: 'Hi again', expected_revision: 1 });
await blog.posts.publish(ids.post);
await blog.posts.publish(ids.post);
await blog.posts.unpublish(ids.post);
await blog.posts.unpublish(ids.post);
@@ -252,11 +253,11 @@ const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, me
@@ -252,11 +253,11 @@ const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, me
const P = `/api/v1/posts/${ids.post}`;
const P = `/api/v1/posts/${ids.post}`;
assert.deepStrictEqual(b.map((x) => `${x.method} ${x.url}`), [
assert.deepStrictEqual(b.map((x) => `${x.method} ${x.url}`), [
'GET /api/v1/blogs/goosely', 'GET /api/v1/blogs/goosely/posts?limit=10&all=1', 'GET /api/v1/blogs/goosely/feed',
'GET /api/v1/blogs/goosely', 'GET /api/v1/blogs/goosely/posts?limit=10&all=1', 'GET /api/v1/blogs/goosely/feed',
- 'POST /api/v1/blogs/goosely/posts', `GET ${P}`, `PATCH ${P}`, `PATCH ${P}`, `POST ${P}/publish`, `POST ${P}/publish`,
+ 'POST /api/v1/blogs/goosely/posts', `GET ${P}`, `GET ${P}?format=blocks`, `PATCH ${P}`, `PATCH ${P}`, `POST ${P}/publish`, `POST ${P}/publish`,
`POST ${P}/unpublish`, `POST ${P}/unpublish`, `POST ${P}/schedule`, `POST ${P}/schedule`, `DELETE ${P}/schedule`,
`POST ${P}/unpublish`, `POST ${P}/unpublish`, `POST ${P}/schedule`, `POST ${P}/schedule`, `DELETE ${P}/schedule`,
`DELETE ${P}/schedule`, `POST ${P}/revert`, `GET ${P}/revisions`, `GET ${P}/revisions/2`, `DELETE ${P}`, `DELETE ${P}`,
`DELETE ${P}/schedule`, `POST ${P}/revert`, `GET ${P}/revisions`, `GET ${P}/revisions/2`, `DELETE ${P}`, `DELETE ${P}`,
]);
]);
- assert.deepStrictEqual(b[11].body, { at: '2026-10-21T18:00:00Z', revision: 2 });
+ assert.deepStrictEqual(b[12].body, { at: '2026-10-21T18:00:00Z', revision: 2 });
assert.throws(() => blog.posts.get('post_1'), /pst_/);
assert.throws(() => blog.posts.get('post_1'), /pst_/);
assert.throws(() => blog.posts.create('goosely', { body: 'no title' }), /title/);
assert.throws(() => blog.posts.create('goosely', { body: 'no title' }), /title/);
assert.throws(() => blog.posts.schedule(ids.post, { at: 'tomorrow' }), /ISO 8601/);
assert.throws(() => blog.posts.schedule(ids.post, { at: 'tomorrow' }), /ISO 8601/);