@pouchy_ai/world-sdk 0.25.1 → 0.27.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 +30 -0
- package/README.md +9 -0
- package/dist/index.d.ts +22 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @pouchy_ai/world-sdk
|
|
2
2
|
|
|
3
|
+
## 0.27.0
|
|
4
|
+
|
|
5
|
+
- **`WorldProgressCheckpointV1.publicFlags` / `publicFlagsTruncated`** — Story
|
|
6
|
+
Contract **v4**: a declared flag may carry `public: true`, and the progress
|
|
7
|
+
checkpoint then carries that flag's name and value (the declared initial when
|
|
8
|
+
it was never set, `null` when there is neither), sorted by key. ALWAYS
|
|
9
|
+
present — an empty array for a story that publishes nothing — so absent never
|
|
10
|
+
reads as unknown. Flags the author did not mark public stay out of the
|
|
11
|
+
checkpoint, as every flag did before: a flag's name can itself be a spoiler.
|
|
12
|
+
This is the read a client needs for a RUNTIME exit — a character who leaves
|
|
13
|
+
for good — instead of a static scene list (design #23).
|
|
14
|
+
- `StoryFlagSpec.public?: true` on the Story Package type. Declaring any public
|
|
15
|
+
flag makes a package contract v4; the server decides the version, and an
|
|
16
|
+
environment that has not enabled v4 writes answers 409
|
|
17
|
+
`story_contract_v4_write_disabled` with the field intact.
|
|
18
|
+
|
|
19
|
+
## 0.26.0
|
|
20
|
+
|
|
21
|
+
- **`WorldDeliberationResponse.viewTrimmed`** — whether the role's view had to
|
|
22
|
+
be trimmed to fit the previewer's input budget. The budget grows with the
|
|
23
|
+
worldline, so a long session reaches it where a short one never does, and a
|
|
24
|
+
previewer working from a cut-down view is not the same instrument as one that
|
|
25
|
+
saw the whole state.
|
|
26
|
+
- The server has always computed it and told nobody. A field test read its
|
|
27
|
+
absence in a downstream response as "no trimming happened" — a different claim
|
|
28
|
+
from "nobody reports this" — and retired a live hypothesis on that reading.
|
|
29
|
+
Always present, `true` or `false`: a flag that appears on only one branch
|
|
30
|
+
cannot separate "it did not happen" from "we did not look".
|
|
31
|
+
- Additive; nothing else on the deliberation surface moved.
|
|
32
|
+
|
|
3
33
|
## 0.25.1
|
|
4
34
|
|
|
5
35
|
- **Docs links now resolve.** The README sent readers to `docs/*.md` "in the Pouchy
|
package/README.md
CHANGED
|
@@ -158,8 +158,17 @@ if (p.status !== 'ready') return renderStartFresh(); // narrow FIRST
|
|
|
158
158
|
renderScene(p.checkpoint.currentScene); // may be null
|
|
159
159
|
renderCounts(p.checkpoint.completedNodeCount, p.checkpoint.declaredNodeCount);
|
|
160
160
|
renderDirections(p.checkpoint.nextOptions);
|
|
161
|
+
renderPresence(p.checkpoint.publicFlags); // 0.27.0 — always present
|
|
161
162
|
```
|
|
162
163
|
|
|
164
|
+
**`publicFlags`** (0.27.0, Story Contract v4) carries the flags the author
|
|
165
|
+
declared `public: true`, sorted by key, with the value the state this
|
|
166
|
+
checkpoint reports — the declared initial when never set, `null` when there is
|
|
167
|
+
neither. It is always present (an empty array for a story that publishes
|
|
168
|
+
nothing), so a client can gate a character's presence on a runtime exit the
|
|
169
|
+
story sets, rather than on a static scene list. Every other flag stays out of
|
|
170
|
+
the checkpoint: a flag's name can itself be a spoiler.
|
|
171
|
+
|
|
163
172
|
Narrowing on `status` is not politeness: the `unavailable` arm has no
|
|
164
173
|
`checkpoint` key, so skipping the check reads `undefined` rather than telling a
|
|
165
174
|
reader they never started a story they are halfway through.
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* a project is running — which is exactly the field you reach for when a
|
|
5
5
|
* customer's integration behaves like an older SDK than they say they have.
|
|
6
6
|
* It sat at '0.1.0' for eight releases before anything compared the two. */
|
|
7
|
-
export declare const WORLD_SDK_VERSION = "0.
|
|
7
|
+
export declare const WORLD_SDK_VERSION = "0.27.0";
|
|
8
8
|
export declare const DEFAULT_BASE_URL = "https://pouchy.ai/v1";
|
|
9
9
|
/** One direction a beat could take. The WHOLE of what a deliberation shows a
|
|
10
10
|
* player: no reasoning, no role secrets, no simulated effects, no scores. */
|
|
@@ -30,6 +30,16 @@ export interface WorldDeliberationResponse {
|
|
|
30
30
|
/** Why it stopped. A run that hit a ceiling says so rather than letting a
|
|
31
31
|
* short list pass for a complete one. */
|
|
32
32
|
stop: 'complete' | 'candidate_cap' | 'model_call_cap' | 'token_cap' | 'time_cap' | 'no_roles';
|
|
33
|
+
/** True when the role's view had to be trimmed to fit the previewer's input
|
|
34
|
+
* budget — which grows with the worldline, so a long session can reach it
|
|
35
|
+
* where a short one never does.
|
|
36
|
+
*
|
|
37
|
+
* It matters because a previewer working from a cut-down view is not the
|
|
38
|
+
* same instrument as one that saw the whole state, and until 0.26.0 the
|
|
39
|
+
* server computed this and told nobody. A field test then read its absence
|
|
40
|
+
* as "no trimming happened" — a different claim from "nobody reports this"
|
|
41
|
+
* — and retired a live hypothesis on it. Always present, true or false. */
|
|
42
|
+
viewTrimmed: boolean;
|
|
33
43
|
}
|
|
34
44
|
/** The refusal classes a world call can produce. `unknown` is deliberate: an
|
|
35
45
|
* unrecognized status is never quietly folded into a neighbour. */
|
|
@@ -234,6 +244,17 @@ export interface WorldProgressCheckpointV1 {
|
|
|
234
244
|
descriptor: string;
|
|
235
245
|
}>;
|
|
236
246
|
publicRelationsTruncated: boolean;
|
|
247
|
+
/** Story Contract v4 (0.27.0). The flags the pinned story declared
|
|
248
|
+
* `public: true`, sorted by key, with the value the state THIS checkpoint
|
|
249
|
+
* reports — the declared initial when never set, `null` when there is
|
|
250
|
+
* neither. ALWAYS present (an empty array for a story that publishes
|
|
251
|
+
* nothing), so absent never reads as unknown. A flag the author did not
|
|
252
|
+
* mark public is never here: its name can be a spoiler. */
|
|
253
|
+
publicFlags: Array<{
|
|
254
|
+
key: string;
|
|
255
|
+
value: boolean | number | string | null;
|
|
256
|
+
}>;
|
|
257
|
+
publicFlagsTruncated: boolean;
|
|
237
258
|
/** Newest first. That a beat happened — never what happened in it. */
|
|
238
259
|
recentProgressRecords: Array<{
|
|
239
260
|
seq: number;
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import { createHash, createHmac, randomUUID } from 'node:crypto';
|
|
|
23
23
|
* a project is running — which is exactly the field you reach for when a
|
|
24
24
|
* customer's integration behaves like an older SDK than they say they have.
|
|
25
25
|
* It sat at '0.1.0' for eight releases before anything compared the two. */
|
|
26
|
-
export const WORLD_SDK_VERSION = '0.
|
|
26
|
+
export const WORLD_SDK_VERSION = '0.27.0';
|
|
27
27
|
export const DEFAULT_BASE_URL = 'https://pouchy.ai/v1';
|
|
28
28
|
/** Read the commit turn id out of an envelope, so the signature covers the id
|
|
29
29
|
* the server will commit under. The payload half is base64url JSON; the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pouchy_ai/world-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "Server-side TypeScript client for Pouchy World \u2014 story packages, world definitions, world sessions, coordinated turns, trusted events, replay verification and script drafts. Node only: it holds a project Secret Key and a source signing key, which never belong in a browser or a mobile app.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|