wontopos 2.2.42 → 2.2.43
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/cjs/wontopos.d.cts +27 -11
- package/dist/cjs/wontopos.js +1 -1
- package/dist/wontopos.d.ts +27 -11
- package/dist/wontopos.js +1 -1
- package/package.json +1 -1
package/dist/cjs/wontopos.d.cts
CHANGED
|
@@ -156,13 +156,16 @@ export interface Memory {
|
|
|
156
156
|
speaker?: string;
|
|
157
157
|
[key: string]: unknown;
|
|
158
158
|
}
|
|
159
|
-
/** `add` / `store` → `{ id, status }
|
|
159
|
+
/** `add` / `store` → `{ id, status }`. `status` starts with `"stored"` (more text can
|
|
160
|
+
* follow) or is `"duplicate"`; match on the prefix. */
|
|
160
161
|
export interface StoreResult {
|
|
161
162
|
id?: string;
|
|
162
|
-
/** `"stored"`, or `"duplicate"` when nothing was saved. */
|
|
163
|
+
/** Starts with `"stored"`, or is `"duplicate"` when nothing was saved. */
|
|
163
164
|
status?: string;
|
|
164
165
|
/**
|
|
165
|
-
*
|
|
166
|
+
* On a duplicate, the id of the memory this write collided with, when the reply has
|
|
167
|
+
* it. A duplicate can arrive with an empty `id` and no `duplicate_of`; then search with
|
|
168
|
+
* the same text to find the memory it matched.
|
|
166
169
|
*
|
|
167
170
|
* A genuinely new fact that only varies a detail of one already stored ("no meetings
|
|
168
171
|
* before 10am" next to "no meetings on Fridays") can land here too, so a duplicate is
|
|
@@ -324,6 +327,8 @@ export interface SpeakerPage {
|
|
|
324
327
|
memories: Memory[];
|
|
325
328
|
chunks?: number;
|
|
326
329
|
/** The count to show before anyone confirms a delete of this speaker's memories. */
|
|
330
|
+
records_to_delete?: number;
|
|
331
|
+
/** @deprecated The same number as `records_to_delete`, under its old name. */
|
|
327
332
|
points_to_delete?: number;
|
|
328
333
|
returned?: number;
|
|
329
334
|
has_more?: boolean;
|
|
@@ -381,10 +386,16 @@ export interface EngramResult {
|
|
|
381
386
|
usage?: Usage;
|
|
382
387
|
[key: string]: unknown;
|
|
383
388
|
}
|
|
389
|
+
/** One turn of the short-term window, as `history()` returns it. */
|
|
384
390
|
export interface HistoryTurn {
|
|
391
|
+
/** `"user"` or `"assistant"`. */
|
|
392
|
+
role?: string;
|
|
393
|
+
content?: string;
|
|
394
|
+
timestamp?: string;
|
|
395
|
+
/** @deprecated Not sent: a turn comes back as `role` and `content`. */
|
|
385
396
|
user_msg?: string;
|
|
397
|
+
/** @deprecated Not sent: a turn comes back as `role` and `content`. */
|
|
386
398
|
assistant_msg?: string;
|
|
387
|
-
timestamp?: string;
|
|
388
399
|
[key: string]: unknown;
|
|
389
400
|
}
|
|
390
401
|
/** `usage` → what this key has spent, and what is left to spend. */
|
|
@@ -404,7 +415,7 @@ export interface UsageResult {
|
|
|
404
415
|
requests?: number;
|
|
405
416
|
cost_cents?: number;
|
|
406
417
|
};
|
|
407
|
-
/** Per-store spend over the window,
|
|
418
|
+
/** Per-store spend over the window, highest spend first, and at most 50 rows — a longer
|
|
408
419
|
* list is cut, so these need not sum to `workspace`. `other`, when present, is an
|
|
409
420
|
* overflow bucket rather than a store. */
|
|
410
421
|
stores?: {
|
|
@@ -464,6 +475,10 @@ export interface ModelInfo {
|
|
|
464
475
|
memory: "shared" | "isolated";
|
|
465
476
|
/** What this model can do. Check it before relying on a feature. */
|
|
466
477
|
capabilities?: ModelCapabilities;
|
|
478
|
+
/** Present on a live model that is scheduled to retire (RFC3339). From that instant
|
|
479
|
+
* the model leaves this list and calls naming it are refused. */
|
|
480
|
+
retires_at?: string;
|
|
481
|
+
[key: string]: unknown;
|
|
467
482
|
}
|
|
468
483
|
/** One entry of the engram / delivery-form catalogue (`listEngrams`). */
|
|
469
484
|
export interface EngramInfo {
|
|
@@ -931,9 +946,9 @@ export declare class Client {
|
|
|
931
946
|
get(userId: string | undefined, memoryId: string): Promise<Memory>;
|
|
932
947
|
/** List a store's stored memories — the text you stored, plus its metadata.
|
|
933
948
|
* Paginated: pass the returned `next_cursor` back as `cursor` for the next
|
|
934
|
-
* page, and only a cursor the service returned
|
|
935
|
-
* next page; a non-null one can still be followed by
|
|
936
|
-
* browse or export a store.
|
|
949
|
+
* page, and only a cursor the service returned, with the model that returned it. A
|
|
950
|
+
* `null` cursor means there is no next page; a non-null one can still be followed by
|
|
951
|
+
* an empty page. Use it to browse or export a store.
|
|
937
952
|
*
|
|
938
953
|
* `limit` is 1-500 (default 100); anything else is refused before the request.
|
|
939
954
|
*
|
|
@@ -1093,8 +1108,8 @@ export declare class Client {
|
|
|
1093
1108
|
* assistant's own words, otherwise a person's name. Same cursor paging as
|
|
1094
1109
|
* `listImages`; `limit` is 5-20.
|
|
1095
1110
|
*
|
|
1096
|
-
* `
|
|
1097
|
-
* speaker's memories.
|
|
1111
|
+
* `records_to_delete` is the count to show before anyone confirms a delete of this
|
|
1112
|
+
* speaker's memories; `points_to_delete` is the same number under its old name.
|
|
1098
1113
|
*/
|
|
1099
1114
|
bySpeaker(speaker: string, userId?: string, opts?: {
|
|
1100
1115
|
limit?: number;
|
|
@@ -1105,7 +1120,8 @@ export declare class Client {
|
|
|
1105
1120
|
* `AuthenticationError` (bad key), `PaymentRequiredError` (valid key but no card /
|
|
1106
1121
|
* depleted balance), or `APIConnectionError` (unreachable). Makes one metered request. */
|
|
1107
1122
|
ping(): Promise<boolean>;
|
|
1108
|
-
/** Available models: `[{ id, name, available, memory }, ...]`.
|
|
1123
|
+
/** Available models: `[{ id, name, available, memory, capabilities, retires_at? }, ...]`.
|
|
1124
|
+
* Needs no API key. */
|
|
1109
1125
|
listModels(): Promise<ModelInfo[]>;
|
|
1110
1126
|
/**
|
|
1111
1127
|
* The engrams (and delivery forms) the selected model can actually run.
|
package/dist/cjs/wontopos.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.WME = exports.Client = exports.ServerError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.PermissionDeniedError = exports.PaymentRequiredError = exports.AuthenticationError = exports.BadRequestError = exports.APIConnectionError = exports.WosError = exports.CONTEXT_LIMIT_MAX = exports.CONTEXT_LIMIT_MIN = exports.SEARCH_LIMIT_MAX = exports.SEARCH_LIMIT_MIN = void 0;
|
|
4
4
|
exports._resetStoreIdWarnings = _resetStoreIdWarnings;
|
|
5
5
|
exports._resetFilterWarnings = _resetFilterWarnings;
|
|
6
|
-
const VERSION = "2.2.
|
|
6
|
+
const VERSION = "2.2.43";
|
|
7
7
|
const RUNTIME = (() => {
|
|
8
8
|
const p = globalThis?.process;
|
|
9
9
|
return p?.version ? ` (node/${p.version}; ${p.platform}-${p.arch})` : "";
|
package/dist/wontopos.d.ts
CHANGED
|
@@ -156,13 +156,16 @@ export interface Memory {
|
|
|
156
156
|
speaker?: string;
|
|
157
157
|
[key: string]: unknown;
|
|
158
158
|
}
|
|
159
|
-
/** `add` / `store` → `{ id, status }
|
|
159
|
+
/** `add` / `store` → `{ id, status }`. `status` starts with `"stored"` (more text can
|
|
160
|
+
* follow) or is `"duplicate"`; match on the prefix. */
|
|
160
161
|
export interface StoreResult {
|
|
161
162
|
id?: string;
|
|
162
|
-
/** `"stored"`, or `"duplicate"` when nothing was saved. */
|
|
163
|
+
/** Starts with `"stored"`, or is `"duplicate"` when nothing was saved. */
|
|
163
164
|
status?: string;
|
|
164
165
|
/**
|
|
165
|
-
*
|
|
166
|
+
* On a duplicate, the id of the memory this write collided with, when the reply has
|
|
167
|
+
* it. A duplicate can arrive with an empty `id` and no `duplicate_of`; then search with
|
|
168
|
+
* the same text to find the memory it matched.
|
|
166
169
|
*
|
|
167
170
|
* A genuinely new fact that only varies a detail of one already stored ("no meetings
|
|
168
171
|
* before 10am" next to "no meetings on Fridays") can land here too, so a duplicate is
|
|
@@ -324,6 +327,8 @@ export interface SpeakerPage {
|
|
|
324
327
|
memories: Memory[];
|
|
325
328
|
chunks?: number;
|
|
326
329
|
/** The count to show before anyone confirms a delete of this speaker's memories. */
|
|
330
|
+
records_to_delete?: number;
|
|
331
|
+
/** @deprecated The same number as `records_to_delete`, under its old name. */
|
|
327
332
|
points_to_delete?: number;
|
|
328
333
|
returned?: number;
|
|
329
334
|
has_more?: boolean;
|
|
@@ -381,10 +386,16 @@ export interface EngramResult {
|
|
|
381
386
|
usage?: Usage;
|
|
382
387
|
[key: string]: unknown;
|
|
383
388
|
}
|
|
389
|
+
/** One turn of the short-term window, as `history()` returns it. */
|
|
384
390
|
export interface HistoryTurn {
|
|
391
|
+
/** `"user"` or `"assistant"`. */
|
|
392
|
+
role?: string;
|
|
393
|
+
content?: string;
|
|
394
|
+
timestamp?: string;
|
|
395
|
+
/** @deprecated Not sent: a turn comes back as `role` and `content`. */
|
|
385
396
|
user_msg?: string;
|
|
397
|
+
/** @deprecated Not sent: a turn comes back as `role` and `content`. */
|
|
386
398
|
assistant_msg?: string;
|
|
387
|
-
timestamp?: string;
|
|
388
399
|
[key: string]: unknown;
|
|
389
400
|
}
|
|
390
401
|
/** `usage` → what this key has spent, and what is left to spend. */
|
|
@@ -404,7 +415,7 @@ export interface UsageResult {
|
|
|
404
415
|
requests?: number;
|
|
405
416
|
cost_cents?: number;
|
|
406
417
|
};
|
|
407
|
-
/** Per-store spend over the window,
|
|
418
|
+
/** Per-store spend over the window, highest spend first, and at most 50 rows — a longer
|
|
408
419
|
* list is cut, so these need not sum to `workspace`. `other`, when present, is an
|
|
409
420
|
* overflow bucket rather than a store. */
|
|
410
421
|
stores?: {
|
|
@@ -464,6 +475,10 @@ export interface ModelInfo {
|
|
|
464
475
|
memory: "shared" | "isolated";
|
|
465
476
|
/** What this model can do. Check it before relying on a feature. */
|
|
466
477
|
capabilities?: ModelCapabilities;
|
|
478
|
+
/** Present on a live model that is scheduled to retire (RFC3339). From that instant
|
|
479
|
+
* the model leaves this list and calls naming it are refused. */
|
|
480
|
+
retires_at?: string;
|
|
481
|
+
[key: string]: unknown;
|
|
467
482
|
}
|
|
468
483
|
/** One entry of the engram / delivery-form catalogue (`listEngrams`). */
|
|
469
484
|
export interface EngramInfo {
|
|
@@ -931,9 +946,9 @@ export declare class Client {
|
|
|
931
946
|
get(userId: string | undefined, memoryId: string): Promise<Memory>;
|
|
932
947
|
/** List a store's stored memories — the text you stored, plus its metadata.
|
|
933
948
|
* Paginated: pass the returned `next_cursor` back as `cursor` for the next
|
|
934
|
-
* page, and only a cursor the service returned
|
|
935
|
-
* next page; a non-null one can still be followed by
|
|
936
|
-
* browse or export a store.
|
|
949
|
+
* page, and only a cursor the service returned, with the model that returned it. A
|
|
950
|
+
* `null` cursor means there is no next page; a non-null one can still be followed by
|
|
951
|
+
* an empty page. Use it to browse or export a store.
|
|
937
952
|
*
|
|
938
953
|
* `limit` is 1-500 (default 100); anything else is refused before the request.
|
|
939
954
|
*
|
|
@@ -1093,8 +1108,8 @@ export declare class Client {
|
|
|
1093
1108
|
* assistant's own words, otherwise a person's name. Same cursor paging as
|
|
1094
1109
|
* `listImages`; `limit` is 5-20.
|
|
1095
1110
|
*
|
|
1096
|
-
* `
|
|
1097
|
-
* speaker's memories.
|
|
1111
|
+
* `records_to_delete` is the count to show before anyone confirms a delete of this
|
|
1112
|
+
* speaker's memories; `points_to_delete` is the same number under its old name.
|
|
1098
1113
|
*/
|
|
1099
1114
|
bySpeaker(speaker: string, userId?: string, opts?: {
|
|
1100
1115
|
limit?: number;
|
|
@@ -1105,7 +1120,8 @@ export declare class Client {
|
|
|
1105
1120
|
* `AuthenticationError` (bad key), `PaymentRequiredError` (valid key but no card /
|
|
1106
1121
|
* depleted balance), or `APIConnectionError` (unreachable). Makes one metered request. */
|
|
1107
1122
|
ping(): Promise<boolean>;
|
|
1108
|
-
/** Available models: `[{ id, name, available, memory }, ...]`.
|
|
1123
|
+
/** Available models: `[{ id, name, available, memory, capabilities, retires_at? }, ...]`.
|
|
1124
|
+
* Needs no API key. */
|
|
1109
1125
|
listModels(): Promise<ModelInfo[]>;
|
|
1110
1126
|
/**
|
|
1111
1127
|
* The engrams (and delivery forms) the selected model can actually run.
|
package/dist/wontopos.js
CHANGED