@pouchy_ai/companion-sdk 0.42.0 → 0.43.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
@@ -12,6 +12,26 @@ a protocol bump is always called out explicitly here.
12
12
 
13
13
  ## [Unreleased]
14
14
 
15
+ ## [0.43.0] - 2026-07-26
16
+
17
+ Additive: a confirmation can now be rendered in the user's own language. No wire-protocol
18
+ bump (`PROTOCOL_VERSION` stays 1); no existing field changed or moved.
19
+
20
+ - **`summaryKey` / `summaryVars`** on `ConfirmRequestPayload` and `PendingConfirm` — the
21
+ same sentence as data (an i18n key `confirmSummary.*` plus its placeholder values)
22
+ alongside the English `summary`, which is unchanged and still always present. A host
23
+ that knows the user's language renders
24
+ `summaryKey ? localize(summaryKey, summaryVars) : summary`; a host that does nothing
25
+ keeps the exact behaviour it has today.
26
+
27
+ The server cannot localize this for you: the turn endpoint (`/input`) carries no
28
+ locale, so the sentence has to travel as data to the one process that knows the
29
+ user's language. Both fields are optional — absent for a tool that ships no keyed
30
+ summary, and on confirmations recorded before this release.
31
+
32
+ Shipped for Pouchy's own hosted confirm page, which was asking users to approve
33
+ payments against an English sentence regardless of the language they run Pouchy in.
34
+
15
35
  ## [0.42.0] - 2026-07-25
16
36
 
17
37
  Additive: the Instant UI ⇄ Google A2UI v0.9 projection ships in the package.
package/README.md CHANGED
@@ -147,7 +147,7 @@ type-checks without a cast; `'*'` keeps the untyped envelope:
147
147
  | `onRender(fn)` | `companion.ui_action` | **Instant UI** — draw `payload.interface` (platform-neutral genui schema) with your own renderer (web / iOS / Android / CLI). Needs `ui.render` |
148
148
  | `onInterfaceUpdate(fn)` | `companion.ui_update` | live `{key,value}` update to an already-rendered panel (no rebuild) |
149
149
  | `onSocialMessage(fn)` | `companion.social_message` | inbound A2A friend message, delivered cross-app. Needs `social.message` |
150
- | `onConfirmRequest(fn)` | `companion.confirm_request` | a sensitive-op approval request. **Platform session tokens** (your end users): show your own confirm card and resolve it with `confirmAction` — this is how confirm-gated custom skills (POST / credentialed) run. First-party user tokens: observe-only — approval stays first-party (where the `stepUp:true` biometric gate lives) |
150
+ | `onConfirmRequest(fn)` | `companion.confirm_request` | a sensitive-op approval request. **Platform session tokens** (your end users): show your own confirm card and resolve it with `confirmAction` — this is how confirm-gated custom skills (POST / credentialed) run. First-party user tokens: observe-only — approval stays first-party (where the `stepUp:true` biometric gate lives). Payload `{ confirmId, scope, summary, summaryKey?, summaryVars?, stepUp? }` — render `summaryKey ? localize(summaryKey, summaryVars) : summary` to show the approval in the user's language (0.43.0) |
151
151
  | `onAudio(fn)` | `companion.audio` | TTS clip (non-call modality). _(reserved — not emitted yet)_ |
152
152
  | `onExpression(fn)` | `companion.expression` | avatar viseme / expression / gesture. _(reserved — not emitted yet)_ |
153
153
  | `onVoiceInject(fn)` | `companion.voice_inject` | `fn({text, speak})` — a `voiceRelevant` world-state line to say aloud during a live call; route `text` to your voice session when `speak` |
@@ -74,6 +74,15 @@ export interface ConfirmRequestPayload {
74
74
  scope: string;
75
75
  /** A human, user-facing summary of what approving will do. */
76
76
  summary: string;
77
+ /** The same sentence as DATA — an i18n key (`confirmSummary.*`) plus its
78
+ * placeholder values — so a host that knows the user's language can render
79
+ * the approval in it. `summary` stays the English fallback and is always
80
+ * present; these two are absent for a tool that ships no keyed summary and
81
+ * on confirmations recorded before this field existed, so render
82
+ * `summaryKey ? localize(summaryKey, summaryVars) : summary`. The server
83
+ * cannot do this for you: the turn endpoint carries no locale. */
84
+ summaryKey?: string;
85
+ summaryVars?: Record<string, string | number>;
77
86
  /** Advisory: when true, the first-party approval surface should require a
78
87
  * stronger user gesture — a biometric / passkey (Face ID, Touch ID) — before
79
88
  * approving, not just a tap. Set for irreversible money ops (wallet.spend).
@@ -88,6 +97,15 @@ export interface PendingConfirm {
88
97
  scope: string;
89
98
  /** A human, user-facing summary of what approving will do. */
90
99
  summary: string;
100
+ /** The same sentence as DATA — an i18n key (`confirmSummary.*`) plus its
101
+ * placeholder values — so a host that knows the user's language can render
102
+ * the approval in it. `summary` stays the English fallback and is always
103
+ * present; these two are absent for a tool that ships no keyed summary and
104
+ * on confirmations recorded before this field existed, so render
105
+ * `summaryKey ? localize(summaryKey, summaryVars) : summary`. The server
106
+ * cannot do this for you: the turn endpoint carries no locale. */
107
+ summaryKey?: string;
108
+ summaryVars?: Record<string, string | number>;
91
109
  /** Epoch ms when the companion asked. */
92
110
  createdAt: number;
93
111
  }
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB,EAAG,CAAU,CAAC;AAE3C,yCAAyC;AACzC,eAAO,MAAM,aAAa,0KAUhB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD;;;;;;qCAMqC;AACrC,eAAO,MAAM,cAAc,4TAejB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,YAAY,CAAC;AAErD;;;;;;oDAMoD;AACpD,eAAO,MAAM,mBAAmB,8CAGtB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE;;;4EAG4E;AAC5E,eAAO,MAAM,qBAAqB,0SAiBxB,CAAC;AACX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,mEAAmE;AACnE,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO;IAC7C,CAAC,EAAE,OAAO,gBAAgB,CAAC;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CA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chy companion \u2014 chat, voice, tools, memory, live world-state, instant UI, and agent-to-agent messaging \u2014 in any app, game, or site.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",
package/src/protocol.ts CHANGED
@@ -131,6 +131,15 @@ export interface ConfirmRequestPayload {
131
131
  scope: string;
132
132
  /** A human, user-facing summary of what approving will do. */
133
133
  summary: string;
134
+ /** The same sentence as DATA — an i18n key (`confirmSummary.*`) plus its
135
+ * placeholder values — so a host that knows the user's language can render
136
+ * the approval in it. `summary` stays the English fallback and is always
137
+ * present; these two are absent for a tool that ships no keyed summary and
138
+ * on confirmations recorded before this field existed, so render
139
+ * `summaryKey ? localize(summaryKey, summaryVars) : summary`. The server
140
+ * cannot do this for you: the turn endpoint carries no locale. */
141
+ summaryKey?: string;
142
+ summaryVars?: Record<string, string | number>;
134
143
  /** Advisory: when true, the first-party approval surface should require a
135
144
  * stronger user gesture — a biometric / passkey (Face ID, Touch ID) — before
136
145
  * approving, not just a tap. Set for irreversible money ops (wallet.spend).
@@ -146,6 +155,15 @@ export interface PendingConfirm {
146
155
  scope: string;
147
156
  /** A human, user-facing summary of what approving will do. */
148
157
  summary: string;
158
+ /** The same sentence as DATA — an i18n key (`confirmSummary.*`) plus its
159
+ * placeholder values — so a host that knows the user's language can render
160
+ * the approval in it. `summary` stays the English fallback and is always
161
+ * present; these two are absent for a tool that ships no keyed summary and
162
+ * on confirmations recorded before this field existed, so render
163
+ * `summaryKey ? localize(summaryKey, summaryVars) : summary`. The server
164
+ * cannot do this for you: the turn endpoint carries no locale. */
165
+ summaryKey?: string;
166
+ summaryVars?: Record<string, string | number>;
149
167
  /** Epoch ms when the companion asked. */
150
168
  createdAt: number;
151
169
  }