@onlyworlds/sdk 4.177.0 → 4.178.0

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/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.178.0] - 2026-11-17
9
+
10
+ ### Added
11
+
12
+ - **`by_role` on every row of a draught's `work`**, which `GET /character/{id}/context` now serves: the ids of her Titles that the work item names, each once, in the item's order, and an empty list when none does. Work is for her by name (the item's `actor`) or by a role she holds (the item's `x_packet_for` names a Title whose `holders` name her), and a row that reached her only through a Title has `via` `['holders']`. Read as her (`mode: 'voice'`) a work item reaches her only through a field of its own that names her, so a caller asks with `mode: 'act'` for what is hers by role.
13
+
14
+ ### Fixed
15
+
16
+ - **The message for a write the host refused says the whole way out.** The same command passes in a fenced code block whose first line names a language, or with no backtick, semicolon or pipe directly before it; the message named only the backtick.
17
+
8
18
  ## [4.177.0] - 2026-11-17
9
19
 
10
20
  ### Added
package/dist/index.d.ts CHANGED
@@ -3618,9 +3618,17 @@ interface OwDraught {
3618
3618
  element: OwElement;
3619
3619
  } | null;
3620
3620
  role?: OwDraughtItem[];
3621
- /** Each row with its work item's `x_packet_elements` as `packet` (`[]` when it has none). */
3621
+ /**
3622
+ * Her open work: Relations with supertype `Work item` and subtype `open` or `taken` that are for her, by name
3623
+ * (`actor` is her) or by a role she holds (`x_packet_for` names a Title whose `holders` name her). Each row adds
3624
+ * `packet`, the item's `x_packet_elements` (`[]` when it has none), and `by_role`, the ids of her Titles the item
3625
+ * names, each once, in the item's order (`[]` when none does). A row that reached her only through a Title has
3626
+ * `via` `['holders']`. Read as her (`mode: 'voice'`) a work item reaches her only through a field of its own
3627
+ * that names her: ask with `mode: 'act'` for what is hers by role.
3628
+ */
3622
3629
  work?: Array<OwDraughtItem & {
3623
3630
  packet: Array<Record<string, unknown>>;
3631
+ by_role: string[];
3624
3632
  }>;
3625
3633
  style?: OwDraughtItem | null;
3626
3634
  events?: OwDraughtItem[];
@@ -4278,7 +4286,7 @@ declare class OwApiError extends Error {
4278
4286
  * page titled "Blocked", not the API's JSON envelope. Nothing was written. The host refuses text that holds a
4279
4287
  * shell command such as `python -m`, `python -c`, `perl -e`, or `curl` or `wget` with an address right after
4280
4288
  * a backtick, a semicolon or a pipe; such a command passes in a fenced code block whose first line names a
4281
- * language, or without the backtick. `code` is null (it is no API code) and `detail` keeps the page.
4289
+ * language, or with none of the three directly before it. `code` is null (it is no API code) and `detail` keeps the page.
4282
4290
  */
4283
4291
  get isHostBlocked(): boolean;
4284
4292
  /** 422s/400s name the offending param/field -- typos error loudly platform-wide. */
package/dist/index.js CHANGED
@@ -129,7 +129,7 @@ var OwApiError = class extends Error {
129
129
  * page titled "Blocked", not the API's JSON envelope. Nothing was written. The host refuses text that holds a
130
130
  * shell command such as `python -m`, `python -c`, `perl -e`, or `curl` or `wget` with an address right after
131
131
  * a backtick, a semicolon or a pipe; such a command passes in a fenced code block whose first line names a
132
- * language, or without the backtick. `code` is null (it is no API code) and `detail` keeps the page.
132
+ * language, or with none of the three directly before it. `code` is null (it is no API code) and `detail` keeps the page.
133
133
  */
134
134
  get isHostBlocked() {
135
135
  return isHostBlockedPage(this.status, this.detail);
@@ -530,7 +530,7 @@ var OwSignInError = class extends Error {
530
530
  function isHostBlockedPage(status, body) {
531
531
  return status === 403 && typeof body === "string" && /<title[^>]*>\s*Blocked\s*<\/title>/i.test(body);
532
532
  }
533
- var HOST_BLOCKED_MESSAGE = 'The host in front of onlyworlds.com refused this request before the API saw it (a 403 page titled "Blocked"), and nothing was written. It refuses text that holds a shell command such as python -m, python -c, perl -e, or curl or wget with an address, right after a backtick, a semicolon or a pipe. Put such a command in a fenced code block whose first line names a language, or write it without the backtick.';
533
+ var HOST_BLOCKED_MESSAGE = 'The host in front of onlyworlds.com refused this request before the API saw it (a 403 page titled "Blocked"), and nothing was written. It refuses text that holds a shell command such as python -m, python -c, perl -e, or curl or wget with an address, right after a backtick, a semicolon or a pipe. Put such a command in a fenced code block whose first line names a language, or write it with none of the three directly before it.';
534
534
  function parseErrorEnvelope(status, body, retryAfter = null) {
535
535
  if (isHostBlockedPage(status, body)) return new OwApiError(status, null, HOST_BLOCKED_MESSAGE, null, body, null, null, retryAfter);
536
536
  const env = body && typeof body === "object" ? body : {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.177.0",
3
+ "version": "4.178.0",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {