@pouchy_ai/companion-sdk 0.41.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 +46 -0
- package/README.md +15 -1
- package/dist/a2ui.d.ts +216 -0
- package/dist/a2ui.d.ts.map +1 -0
- package/dist/a2ui.js +622 -0
- package/dist/a2ui.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/protocol.d.ts +18 -0
- package/dist/protocol.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/a2ui.ts +881 -0
- package/src/index.ts +15 -0
- package/src/protocol.ts +18 -0
package/src/index.ts
CHANGED
|
@@ -91,6 +91,21 @@ export {
|
|
|
91
91
|
} from './protocol';
|
|
92
92
|
export type { CompanionErrorCode, ControlErrorCode } from './protocol';
|
|
93
93
|
|
|
94
|
+
// Instant UI ⇄ Google A2UI v0.9 projection (0.42.0) — put `toA2UI` in front of
|
|
95
|
+
// any renderer built against the A2UI catalog and it draws Pouchy panels;
|
|
96
|
+
// `fromA2UI` ingests an A2UI surface back into the Instant UI panel shape.
|
|
97
|
+
// The node-type catalog rides along as data for renderer capability checks.
|
|
98
|
+
export { toA2UI, fromA2UI, INSTANT_UI_NODE_TYPES } from './a2ui';
|
|
99
|
+
export type {
|
|
100
|
+
A2UISurface,
|
|
101
|
+
A2UIComponent,
|
|
102
|
+
A2UIValue,
|
|
103
|
+
InstantUIInput,
|
|
104
|
+
DynamicInterface,
|
|
105
|
+
GenuiNode,
|
|
106
|
+
EmbeddedAction
|
|
107
|
+
} from './a2ui';
|
|
108
|
+
|
|
94
109
|
// The framework-agnostic view controller behind the /svelte and /vue subpath
|
|
95
110
|
// adapters (and the separate `@pouchy_ai/react` package) — exported from the
|
|
96
111
|
// root too, so a host on any OTHER framework (or none) can reuse the same
|
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
|
}
|