@paneui/core 0.0.1 → 0.0.3
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/dist/client.d.ts +22 -1
- package/dist/client.js +35 -0
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +12 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ArtifactRecord, ArtifactSummary, ArtifactType, ArtifactVersion, CreateArtifactResponse, CreateSessionRequest, CreateSessionResponse, EventsPage, KeyInfo, PaneEvent, SessionState } from "./types.js";
|
|
1
|
+
import type { ArtifactRecord, ArtifactSummary, ArtifactType, ArtifactVersion, CreateArtifactResponse, CreateSessionRequest, CreateSessionResponse, EventsPage, KeyInfo, PaneEvent, SessionState, TasteInfo } from "./types.js";
|
|
2
2
|
export interface ClientOptions {
|
|
3
3
|
/** Relay base URL, e.g. https://pane.example.com. Trailing slash is trimmed. */
|
|
4
4
|
url: string;
|
|
@@ -153,6 +153,27 @@ export declare class PaneClient {
|
|
|
153
153
|
* self-destruct. Returns 204 with no body on success.
|
|
154
154
|
*/
|
|
155
155
|
revokeKey(id: string): Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* GET /v1/taste — the calling agent's freeform "taste notes" markdown blob:
|
|
158
|
+
* presentation preferences the agent has picked up from human feedback over
|
|
159
|
+
* time. Returns `{ taste: null, updated_at: null, bytes: 0 }` when the
|
|
160
|
+
* agent has never written notes. Read this before generating an artifact so
|
|
161
|
+
* the agent applies prior feedback.
|
|
162
|
+
*/
|
|
163
|
+
getTaste(): Promise<TasteInfo>;
|
|
164
|
+
/**
|
|
165
|
+
* PUT /v1/taste — whole-blob replace of the calling agent's taste notes.
|
|
166
|
+
* Empty/whitespace-only values are rejected by the relay; callers asking to
|
|
167
|
+
* clear must use {@link clearTaste}. The relay caps the payload at the
|
|
168
|
+
* server's `MAX_TASTE_BYTES` (utf8 bytes).
|
|
169
|
+
*/
|
|
170
|
+
setTaste(taste: string): Promise<TasteInfo>;
|
|
171
|
+
/**
|
|
172
|
+
* DELETE /v1/taste — clear the calling agent's taste notes (idempotent on
|
|
173
|
+
* the relay; clearing already-empty notes still succeeds). Returns 204 with
|
|
174
|
+
* no body.
|
|
175
|
+
*/
|
|
176
|
+
clearTaste(): Promise<void>;
|
|
156
177
|
/**
|
|
157
178
|
* DELETE /v1/sessions/:id — close/delete a session. Idempotent on the relay
|
|
158
179
|
* side (an already-closed session still returns 204 with no body).
|
package/dist/client.js
CHANGED
|
@@ -269,6 +269,41 @@ export class PaneClient {
|
|
|
269
269
|
if (!r.ok)
|
|
270
270
|
this.fail(r);
|
|
271
271
|
}
|
|
272
|
+
/**
|
|
273
|
+
* GET /v1/taste — the calling agent's freeform "taste notes" markdown blob:
|
|
274
|
+
* presentation preferences the agent has picked up from human feedback over
|
|
275
|
+
* time. Returns `{ taste: null, updated_at: null, bytes: 0 }` when the
|
|
276
|
+
* agent has never written notes. Read this before generating an artifact so
|
|
277
|
+
* the agent applies prior feedback.
|
|
278
|
+
*/
|
|
279
|
+
async getTaste() {
|
|
280
|
+
const r = await this.call("GET", "/v1/taste");
|
|
281
|
+
if (!r.ok)
|
|
282
|
+
this.fail(r);
|
|
283
|
+
return this.asObject(r);
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* PUT /v1/taste — whole-blob replace of the calling agent's taste notes.
|
|
287
|
+
* Empty/whitespace-only values are rejected by the relay; callers asking to
|
|
288
|
+
* clear must use {@link clearTaste}. The relay caps the payload at the
|
|
289
|
+
* server's `MAX_TASTE_BYTES` (utf8 bytes).
|
|
290
|
+
*/
|
|
291
|
+
async setTaste(taste) {
|
|
292
|
+
const r = await this.call("PUT", "/v1/taste", { taste });
|
|
293
|
+
if (!r.ok)
|
|
294
|
+
this.fail(r);
|
|
295
|
+
return this.asObject(r);
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* DELETE /v1/taste — clear the calling agent's taste notes (idempotent on
|
|
299
|
+
* the relay; clearing already-empty notes still succeeds). Returns 204 with
|
|
300
|
+
* no body.
|
|
301
|
+
*/
|
|
302
|
+
async clearTaste() {
|
|
303
|
+
const r = await this.call("DELETE", "/v1/taste");
|
|
304
|
+
if (!r.ok)
|
|
305
|
+
this.fail(r);
|
|
306
|
+
}
|
|
272
307
|
/**
|
|
273
308
|
* DELETE /v1/sessions/:id — close/delete a session. Idempotent on the relay
|
|
274
309
|
* side (an already-closed session still returns 204 with no body).
|
package/dist/index.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export type { RegisterAgentOptions, RegisterAgentResult } from "./register.js";
|
|
|
7
7
|
export { artifactSchema, callbackSchema, createSessionSchema, artifactTypeSchema, createArtifactSchema, createArtifactVersionSchema, patchArtifactMetadataSchema, } from "./schemas.js";
|
|
8
8
|
export type { CreateSessionInput } from "./schemas.js";
|
|
9
9
|
export { MAX_EVENT_TYPE_LENGTH, MAX_IDEMPOTENCY_KEY_LENGTH, MAX_RESPONSE_SNIPPET_LENGTH, MAX_FRAME_SNIPPET_LENGTH, } from "./limits.js";
|
|
10
|
-
export type { AuthorKind, PaneEvent, Artifact, ArtifactType, ArtifactVersion, ArtifactRecord, ArtifactSummary, CreateArtifactResponse, KeyInfo, Callback, CreateSessionRequest, CreateSessionResponse, SessionState, EventsPage, RelayError, } from "./types.js";
|
|
10
|
+
export type { AuthorKind, PaneEvent, Artifact, ArtifactType, ArtifactVersion, ArtifactRecord, ArtifactSummary, CreateArtifactResponse, KeyInfo, TasteInfo, Callback, CreateSessionRequest, CreateSessionResponse, SessionState, EventsPage, RelayError, } from "./types.js";
|
package/dist/types.d.ts
CHANGED
|
@@ -130,6 +130,18 @@ export interface KeyInfo {
|
|
|
130
130
|
last_used_at: string | null;
|
|
131
131
|
revoked_at: string | null;
|
|
132
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* Response from GET /v1/taste, PUT /v1/taste — the calling agent's freeform
|
|
135
|
+
* "taste notes" markdown blob (presentation preferences the agent has picked
|
|
136
|
+
* up from human feedback over time). `taste` and `updated_at` are null when
|
|
137
|
+
* the agent has never written notes; `bytes` is the utf8 byte length and 0
|
|
138
|
+
* when `taste` is null.
|
|
139
|
+
*/
|
|
140
|
+
export interface TasteInfo {
|
|
141
|
+
taste: string | null;
|
|
142
|
+
updated_at: string | null;
|
|
143
|
+
bytes: number;
|
|
144
|
+
}
|
|
133
145
|
/** A relay error envelope. */
|
|
134
146
|
export interface RelayError {
|
|
135
147
|
code: string;
|