@reminix/sdk 0.12.0 → 0.14.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 +21 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents.d.mts +123 -30
- package/resources/agents.d.mts.map +1 -1
- package/resources/agents.d.ts +123 -30
- package/resources/agents.d.ts.map +1 -1
- package/resources/agents.js.map +1 -1
- package/resources/agents.mjs.map +1 -1
- package/resources/execution-logs.d.mts +3 -3
- package/resources/execution-logs.d.mts.map +1 -1
- package/resources/execution-logs.d.ts +3 -3
- package/resources/execution-logs.d.ts.map +1 -1
- package/resources/execution-logs.js +1 -1
- package/resources/execution-logs.mjs +1 -1
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/knowledge/collections/collections.d.mts +89 -0
- package/resources/knowledge/collections/collections.d.mts.map +1 -0
- package/resources/knowledge/collections/collections.d.ts +89 -0
- package/resources/knowledge/collections/collections.d.ts.map +1 -0
- package/resources/knowledge/collections/collections.js +56 -0
- package/resources/knowledge/collections/collections.js.map +1 -0
- package/resources/knowledge/collections/collections.mjs +51 -0
- package/resources/knowledge/collections/collections.mjs.map +1 -0
- package/resources/knowledge/collections/documents.d.mts +121 -0
- package/resources/knowledge/collections/documents.d.mts.map +1 -0
- package/resources/knowledge/collections/documents.d.ts +121 -0
- package/resources/knowledge/collections/documents.d.ts.map +1 -0
- package/resources/knowledge/collections/documents.js +62 -0
- package/resources/knowledge/collections/documents.js.map +1 -0
- package/resources/knowledge/collections/documents.mjs +58 -0
- package/resources/knowledge/collections/documents.mjs.map +1 -0
- package/resources/knowledge/collections/index.d.mts +3 -0
- package/resources/knowledge/collections/index.d.mts.map +1 -0
- package/resources/knowledge/collections/index.d.ts +3 -0
- package/resources/knowledge/collections/index.d.ts.map +1 -0
- package/resources/knowledge/collections/index.js +9 -0
- package/resources/knowledge/collections/index.js.map +1 -0
- package/resources/knowledge/collections/index.mjs +4 -0
- package/resources/knowledge/collections/index.mjs.map +1 -0
- package/resources/knowledge/collections.d.mts +2 -0
- package/resources/knowledge/collections.d.mts.map +1 -0
- package/resources/knowledge/collections.d.ts +2 -0
- package/resources/knowledge/collections.d.ts.map +1 -0
- package/resources/knowledge/collections.js +6 -0
- package/resources/knowledge/collections.js.map +1 -0
- package/resources/knowledge/collections.mjs +3 -0
- package/resources/knowledge/collections.mjs.map +1 -0
- package/resources/knowledge/index.d.mts +3 -0
- package/resources/knowledge/index.d.mts.map +1 -0
- package/resources/knowledge/index.d.ts +3 -0
- package/resources/knowledge/index.d.ts.map +1 -0
- package/resources/knowledge/index.js +9 -0
- package/resources/knowledge/index.js.map +1 -0
- package/resources/knowledge/index.mjs +4 -0
- package/resources/knowledge/index.mjs.map +1 -0
- package/resources/knowledge/knowledge.d.mts +65 -0
- package/resources/knowledge/knowledge.d.mts.map +1 -0
- package/resources/knowledge/knowledge.d.ts +65 -0
- package/resources/knowledge/knowledge.d.ts.map +1 -0
- package/resources/knowledge/knowledge.js +26 -0
- package/resources/knowledge/knowledge.js.map +1 -0
- package/resources/knowledge/knowledge.mjs +21 -0
- package/resources/knowledge/knowledge.mjs.map +1 -0
- package/resources/knowledge.d.mts +2 -0
- package/resources/knowledge.d.mts.map +1 -0
- package/resources/knowledge.d.ts +2 -0
- package/resources/knowledge.d.ts.map +1 -0
- package/resources/knowledge.js +6 -0
- package/resources/knowledge.js.map +1 -0
- package/resources/knowledge.mjs +3 -0
- package/resources/knowledge.mjs.map +1 -0
- package/resources/memory.d.mts +148 -0
- package/resources/memory.d.mts.map +1 -0
- package/resources/memory.d.ts +148 -0
- package/resources/memory.d.ts.map +1 -0
- package/resources/memory.js +82 -0
- package/resources/memory.js.map +1 -0
- package/resources/memory.mjs +78 -0
- package/resources/memory.mjs.map +1 -0
- package/resources/tools.d.mts +70 -12
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +70 -12
- package/resources/tools.d.ts.map +1 -1
- package/src/client.ts +30 -0
- package/src/resources/agents.ts +140 -33
- package/src/resources/execution-logs.ts +3 -3
- package/src/resources/index.ts +10 -0
- package/src/resources/knowledge/collections/collections.ts +167 -0
- package/src/resources/knowledge/collections/documents.ts +200 -0
- package/src/resources/knowledge/collections/index.ts +22 -0
- package/src/resources/knowledge/collections.ts +3 -0
- package/src/resources/knowledge/index.ts +11 -0
- package/src/resources/knowledge/knowledge.ts +101 -0
- package/src/resources/knowledge.ts +3 -0
- package/src/resources/memory.ts +188 -0
- package/src/resources/tools.ts +80 -12
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { Cursor, type CursorParams, PagePromise } from '../../../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
8
|
+
import { path } from '../../../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class Documents extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Get details of a document.
|
|
13
|
+
*/
|
|
14
|
+
retrieve(
|
|
15
|
+
documentID: string,
|
|
16
|
+
params: DocumentRetrieveParams,
|
|
17
|
+
options?: RequestOptions,
|
|
18
|
+
): APIPromise<KnowledgeDocument> {
|
|
19
|
+
const { collectionId } = params;
|
|
20
|
+
return this._client.get(path`/knowledge/collections/${collectionId}/documents/${documentID}`, options);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* List all documents in a knowledge collection.
|
|
25
|
+
*/
|
|
26
|
+
list(
|
|
27
|
+
id: string,
|
|
28
|
+
query: DocumentListParams | null | undefined = {},
|
|
29
|
+
options?: RequestOptions,
|
|
30
|
+
): PagePromise<KnowledgeDocumentsCursor, KnowledgeDocument> {
|
|
31
|
+
return this._client.getAPIList(path`/knowledge/collections/${id}/documents`, Cursor<KnowledgeDocument>, {
|
|
32
|
+
query,
|
|
33
|
+
...options,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Delete a document and its associated data.
|
|
39
|
+
*/
|
|
40
|
+
delete(documentID: string, params: DocumentDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
41
|
+
const { collectionId } = params;
|
|
42
|
+
return this._client.delete(path`/knowledge/collections/${collectionId}/documents/${documentID}`, {
|
|
43
|
+
...options,
|
|
44
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Trigger processing for a document after upload.
|
|
50
|
+
*
|
|
51
|
+
* This extracts text from the document, splits it into chunks, generates
|
|
52
|
+
* embeddings, and stores them for search.
|
|
53
|
+
*
|
|
54
|
+
* The document status will transition: pending → processing → ready (or failed).
|
|
55
|
+
*/
|
|
56
|
+
process(
|
|
57
|
+
documentID: string,
|
|
58
|
+
params: DocumentProcessParams,
|
|
59
|
+
options?: RequestOptions,
|
|
60
|
+
): APIPromise<DocumentProcessResponse> {
|
|
61
|
+
const { collectionId, ...body } = params;
|
|
62
|
+
return this._client.post(path`/knowledge/collections/${collectionId}/documents/${documentID}/process`, {
|
|
63
|
+
body,
|
|
64
|
+
...options,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Create a document record and get a presigned URL for upload.
|
|
70
|
+
*
|
|
71
|
+
* After receiving the response, upload the file to the presigned URL using a PUT
|
|
72
|
+
* request. The document will be processed automatically after upload.
|
|
73
|
+
*/
|
|
74
|
+
upload(
|
|
75
|
+
id: string,
|
|
76
|
+
body: DocumentUploadParams,
|
|
77
|
+
options?: RequestOptions,
|
|
78
|
+
): APIPromise<DocumentUploadResponse> {
|
|
79
|
+
return this._client.post(path`/knowledge/collections/${id}/documents`, { body, ...options });
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type KnowledgeDocumentsCursor = Cursor<KnowledgeDocument>;
|
|
84
|
+
|
|
85
|
+
export interface KnowledgeDocument {
|
|
86
|
+
/**
|
|
87
|
+
* Unique document ID
|
|
88
|
+
*/
|
|
89
|
+
id: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Collection ID
|
|
93
|
+
*/
|
|
94
|
+
collectionId: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* When the document was created
|
|
98
|
+
*/
|
|
99
|
+
createdAt: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* MIME type
|
|
103
|
+
*/
|
|
104
|
+
mimeType: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Document name
|
|
108
|
+
*/
|
|
109
|
+
name: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* S3 URL of the document
|
|
113
|
+
*/
|
|
114
|
+
sourceUrl: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Processing status
|
|
118
|
+
*/
|
|
119
|
+
status: 'pending' | 'processing' | 'ready' | 'failed';
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* When the document was last updated
|
|
123
|
+
*/
|
|
124
|
+
updatedAt: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Document metadata
|
|
128
|
+
*/
|
|
129
|
+
metadata?: unknown;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface DocumentProcessResponse {
|
|
133
|
+
document: KnowledgeDocument;
|
|
134
|
+
|
|
135
|
+
message: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface DocumentUploadResponse {
|
|
139
|
+
document: KnowledgeDocument;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Presigned URL for uploading the file
|
|
143
|
+
*/
|
|
144
|
+
uploadUrl: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface DocumentRetrieveParams {
|
|
148
|
+
collectionId: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface DocumentListParams extends CursorParams {
|
|
152
|
+
status?: 'pending' | 'processing' | 'ready' | 'failed';
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface DocumentDeleteParams {
|
|
156
|
+
collectionId: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface DocumentProcessParams {
|
|
160
|
+
/**
|
|
161
|
+
* Path param
|
|
162
|
+
*/
|
|
163
|
+
collectionId: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Body param: Use Unstructured.io for extraction if available
|
|
167
|
+
*/
|
|
168
|
+
preferUnstructured?: boolean;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface DocumentUploadParams {
|
|
172
|
+
/**
|
|
173
|
+
* MIME type of the document
|
|
174
|
+
*/
|
|
175
|
+
mimeType: string;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Document name (filename)
|
|
179
|
+
*/
|
|
180
|
+
name: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* File size in bytes
|
|
184
|
+
*/
|
|
185
|
+
size?: number;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export declare namespace Documents {
|
|
189
|
+
export {
|
|
190
|
+
type KnowledgeDocument as KnowledgeDocument,
|
|
191
|
+
type DocumentProcessResponse as DocumentProcessResponse,
|
|
192
|
+
type DocumentUploadResponse as DocumentUploadResponse,
|
|
193
|
+
type KnowledgeDocumentsCursor as KnowledgeDocumentsCursor,
|
|
194
|
+
type DocumentRetrieveParams as DocumentRetrieveParams,
|
|
195
|
+
type DocumentListParams as DocumentListParams,
|
|
196
|
+
type DocumentDeleteParams as DocumentDeleteParams,
|
|
197
|
+
type DocumentProcessParams as DocumentProcessParams,
|
|
198
|
+
type DocumentUploadParams as DocumentUploadParams,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Collections,
|
|
5
|
+
type KnowledgeCollection,
|
|
6
|
+
type CollectionCreateParams,
|
|
7
|
+
type CollectionUpdateParams,
|
|
8
|
+
type CollectionListParams,
|
|
9
|
+
type KnowledgeCollectionsCursor,
|
|
10
|
+
} from './collections';
|
|
11
|
+
export {
|
|
12
|
+
Documents,
|
|
13
|
+
type KnowledgeDocument,
|
|
14
|
+
type DocumentProcessResponse,
|
|
15
|
+
type DocumentUploadResponse,
|
|
16
|
+
type DocumentRetrieveParams,
|
|
17
|
+
type DocumentListParams,
|
|
18
|
+
type DocumentDeleteParams,
|
|
19
|
+
type DocumentProcessParams,
|
|
20
|
+
type DocumentUploadParams,
|
|
21
|
+
type KnowledgeDocumentsCursor,
|
|
22
|
+
} from './documents';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Collections,
|
|
5
|
+
type KnowledgeCollection,
|
|
6
|
+
type CollectionCreateParams,
|
|
7
|
+
type CollectionUpdateParams,
|
|
8
|
+
type CollectionListParams,
|
|
9
|
+
type KnowledgeCollectionsCursor,
|
|
10
|
+
} from './collections/index';
|
|
11
|
+
export { Knowledge, type KnowledgeSearchResponse, type KnowledgeSearchParams } from './knowledge';
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as CollectionsAPI from './collections/collections';
|
|
5
|
+
import {
|
|
6
|
+
CollectionCreateParams,
|
|
7
|
+
CollectionListParams,
|
|
8
|
+
CollectionUpdateParams,
|
|
9
|
+
Collections,
|
|
10
|
+
KnowledgeCollection,
|
|
11
|
+
KnowledgeCollectionsCursor,
|
|
12
|
+
} from './collections/collections';
|
|
13
|
+
import { APIPromise } from '../../core/api-promise';
|
|
14
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
15
|
+
|
|
16
|
+
export class Knowledge extends APIResource {
|
|
17
|
+
collections: CollectionsAPI.Collections = new CollectionsAPI.Collections(this._client);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Search across one or more knowledge collections using semantic similarity.
|
|
21
|
+
*
|
|
22
|
+
* The search uses vector embeddings to find the most relevant content. Results are
|
|
23
|
+
* ordered by relevance score (0-1, higher is more similar).
|
|
24
|
+
*/
|
|
25
|
+
search(body: KnowledgeSearchParams, options?: RequestOptions): APIPromise<KnowledgeSearchResponse> {
|
|
26
|
+
return this._client.post('/knowledge/search', { body, ...options });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface KnowledgeSearchResponse {
|
|
31
|
+
chunks: Array<KnowledgeSearchResponse.Chunk>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Number of results found
|
|
35
|
+
*/
|
|
36
|
+
count: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export namespace KnowledgeSearchResponse {
|
|
40
|
+
export interface Chunk {
|
|
41
|
+
/**
|
|
42
|
+
* Position in document
|
|
43
|
+
*/
|
|
44
|
+
chunkIndex: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Chunk text content
|
|
48
|
+
*/
|
|
49
|
+
content: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Source document ID
|
|
53
|
+
*/
|
|
54
|
+
documentId: string;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Similarity score (0-1)
|
|
58
|
+
*/
|
|
59
|
+
score: number;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface KnowledgeSearchParams {
|
|
64
|
+
/**
|
|
65
|
+
* Collection IDs to search
|
|
66
|
+
*/
|
|
67
|
+
collectionIds: Array<string>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Natural language search query
|
|
71
|
+
*/
|
|
72
|
+
query: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Maximum number of results
|
|
76
|
+
*/
|
|
77
|
+
limit?: number;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Minimum similarity score (0-1)
|
|
81
|
+
*/
|
|
82
|
+
threshold?: number;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
Knowledge.Collections = Collections;
|
|
86
|
+
|
|
87
|
+
export declare namespace Knowledge {
|
|
88
|
+
export {
|
|
89
|
+
type KnowledgeSearchResponse as KnowledgeSearchResponse,
|
|
90
|
+
type KnowledgeSearchParams as KnowledgeSearchParams,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export {
|
|
94
|
+
Collections as Collections,
|
|
95
|
+
type KnowledgeCollection as KnowledgeCollection,
|
|
96
|
+
type KnowledgeCollectionsCursor as KnowledgeCollectionsCursor,
|
|
97
|
+
type CollectionCreateParams as CollectionCreateParams,
|
|
98
|
+
type CollectionUpdateParams as CollectionUpdateParams,
|
|
99
|
+
type CollectionListParams as CollectionListParams,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class MemoryResource extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Get a memory value by key for a specific identity.
|
|
12
|
+
*
|
|
13
|
+
* Identity is specified via query parameters with the `identity.` prefix.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const memory = await client.memory.retrieve('x');
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
retrieve(key: string, options?: RequestOptions): APIPromise<Memory> {
|
|
21
|
+
return this._client.get(path`/memory/${key}`, options);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* List all memory keys for a specific identity.
|
|
26
|
+
*
|
|
27
|
+
* Identity is specified via query parameters with the `identity.` prefix. For
|
|
28
|
+
* example: `?identity.user_id=user_123&identity.tenant_id=acme`
|
|
29
|
+
*
|
|
30
|
+
* Returns memory keys and metadata (not full values for efficiency).
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const memories = await client.memory.list();
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
list(options?: RequestOptions): APIPromise<MemoryListResponse> {
|
|
38
|
+
return this._client.get('/memory', options);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Delete a memory by key for a specific identity.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* await client.memory.delete('x');
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
delete(key: string, options?: RequestOptions): APIPromise<void> {
|
|
50
|
+
return this._client.delete(path`/memory/${key}`, {
|
|
51
|
+
...options,
|
|
52
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Delete all memories for a specific identity.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const response = await client.memory.deleteAll();
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
deleteAll(options?: RequestOptions): APIPromise<MemoryDeleteAllResponse> {
|
|
65
|
+
return this._client.delete('/memory', options);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Store a key-value memory for a specific identity.
|
|
70
|
+
*
|
|
71
|
+
* If a memory with the same key already exists, it will be updated.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const memory = await client.memory.store({
|
|
76
|
+
* identity: { user_id: 'user_123' },
|
|
77
|
+
* key: 'preferred_language',
|
|
78
|
+
* value: 'en',
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
store(body: MemoryStoreParams, options?: RequestOptions): APIPromise<Memory> {
|
|
83
|
+
return this._client.post('/memory', { body, ...options });
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface Memory {
|
|
88
|
+
/**
|
|
89
|
+
* Unique memory ID
|
|
90
|
+
*/
|
|
91
|
+
id: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* When the memory was created
|
|
95
|
+
*/
|
|
96
|
+
createdAt: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* When the memory expires
|
|
100
|
+
*/
|
|
101
|
+
expiresAt: string | null;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Identity fields for memory scoping (e.g., user_id, tenant_id)
|
|
105
|
+
*/
|
|
106
|
+
identity: { [key: string]: unknown };
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Memory key
|
|
110
|
+
*/
|
|
111
|
+
key: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Project ID
|
|
115
|
+
*/
|
|
116
|
+
projectId: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* When the memory was last updated
|
|
120
|
+
*/
|
|
121
|
+
updatedAt: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Memory value
|
|
125
|
+
*/
|
|
126
|
+
value?: unknown;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface MemoryListResponse {
|
|
130
|
+
data: Array<MemoryListResponse.Data>;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export namespace MemoryListResponse {
|
|
134
|
+
export interface Data {
|
|
135
|
+
/**
|
|
136
|
+
* When the memory expires (if set)
|
|
137
|
+
*/
|
|
138
|
+
expiresAt: string | null;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Memory key
|
|
142
|
+
*/
|
|
143
|
+
key: string;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* When the memory was last updated
|
|
147
|
+
*/
|
|
148
|
+
updatedAt: string;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface MemoryDeleteAllResponse {
|
|
153
|
+
/**
|
|
154
|
+
* Number of memories deleted
|
|
155
|
+
*/
|
|
156
|
+
deleted: number;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface MemoryStoreParams {
|
|
160
|
+
/**
|
|
161
|
+
* Identity fields for memory scoping (e.g., user_id, tenant_id)
|
|
162
|
+
*/
|
|
163
|
+
identity: { [key: string]: unknown };
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Memory key
|
|
167
|
+
*/
|
|
168
|
+
key: string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Optional expiration time (ISO 8601)
|
|
172
|
+
*/
|
|
173
|
+
expiresAt?: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Value to store
|
|
177
|
+
*/
|
|
178
|
+
value?: unknown;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export declare namespace MemoryResource {
|
|
182
|
+
export {
|
|
183
|
+
type Memory as Memory,
|
|
184
|
+
type MemoryListResponse as MemoryListResponse,
|
|
185
|
+
type MemoryDeleteAllResponse as MemoryDeleteAllResponse,
|
|
186
|
+
type MemoryStoreParams as MemoryStoreParams,
|
|
187
|
+
};
|
|
188
|
+
}
|
package/src/resources/tools.ts
CHANGED
|
@@ -91,19 +91,19 @@ export interface Tool {
|
|
|
91
91
|
discoveredAt: string | null;
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* JSON Schema for agent input
|
|
95
95
|
*/
|
|
96
|
-
|
|
96
|
+
input: Tool.Input | null;
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
99
|
+
* Tool name
|
|
100
100
|
*/
|
|
101
|
-
|
|
101
|
+
name: string;
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
* JSON Schema for agent input
|
|
104
|
+
* JSON Schema for agent input
|
|
105
105
|
*/
|
|
106
|
-
|
|
106
|
+
output: Tool.Output | null;
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* Project ID
|
|
@@ -129,28 +129,96 @@ export interface Tool {
|
|
|
129
129
|
|
|
130
130
|
export namespace Tool {
|
|
131
131
|
/**
|
|
132
|
-
* JSON Schema for agent input
|
|
132
|
+
* JSON Schema for agent input
|
|
133
133
|
*/
|
|
134
|
-
export interface
|
|
135
|
-
|
|
134
|
+
export interface Input {
|
|
135
|
+
/**
|
|
136
|
+
* Default value for the property
|
|
137
|
+
*/
|
|
138
|
+
default?: unknown;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Description of the schema
|
|
142
|
+
*/
|
|
143
|
+
description?: string;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Enumeration of allowed values
|
|
147
|
+
*/
|
|
148
|
+
enum?: Array<unknown>;
|
|
136
149
|
|
|
150
|
+
/**
|
|
151
|
+
* Schema for array items
|
|
152
|
+
*/
|
|
153
|
+
items?: unknown;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Property definitions for object types
|
|
157
|
+
*/
|
|
137
158
|
properties?: { [key: string]: unknown };
|
|
138
159
|
|
|
160
|
+
/**
|
|
161
|
+
* List of required property names
|
|
162
|
+
*/
|
|
139
163
|
required?: Array<string>;
|
|
140
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Human-readable title
|
|
167
|
+
*/
|
|
168
|
+
title?: string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* JSON Schema type (e.g., "object", "string", "array")
|
|
172
|
+
*/
|
|
173
|
+
type?: string;
|
|
174
|
+
|
|
141
175
|
[k: string]: unknown;
|
|
142
176
|
}
|
|
143
177
|
|
|
144
178
|
/**
|
|
145
|
-
* JSON Schema for agent input
|
|
179
|
+
* JSON Schema for agent input
|
|
146
180
|
*/
|
|
147
|
-
export interface
|
|
148
|
-
|
|
181
|
+
export interface Output {
|
|
182
|
+
/**
|
|
183
|
+
* Default value for the property
|
|
184
|
+
*/
|
|
185
|
+
default?: unknown;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Description of the schema
|
|
189
|
+
*/
|
|
190
|
+
description?: string;
|
|
149
191
|
|
|
192
|
+
/**
|
|
193
|
+
* Enumeration of allowed values
|
|
194
|
+
*/
|
|
195
|
+
enum?: Array<unknown>;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Schema for array items
|
|
199
|
+
*/
|
|
200
|
+
items?: unknown;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Property definitions for object types
|
|
204
|
+
*/
|
|
150
205
|
properties?: { [key: string]: unknown };
|
|
151
206
|
|
|
207
|
+
/**
|
|
208
|
+
* List of required property names
|
|
209
|
+
*/
|
|
152
210
|
required?: Array<string>;
|
|
153
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Human-readable title
|
|
214
|
+
*/
|
|
215
|
+
title?: string;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* JSON Schema type (e.g., "object", "string", "array")
|
|
219
|
+
*/
|
|
220
|
+
type?: string;
|
|
221
|
+
|
|
154
222
|
[k: string]: unknown;
|
|
155
223
|
}
|
|
156
224
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.14.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.14.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.14.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.14.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|