@cadenya/cadenya 0.43.0 → 0.45.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 +16 -0
- package/client.d.mts +27 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +27 -0
- package/client.d.ts.map +1 -1
- package/client.js +27 -0
- package/client.js.map +1 -1
- package/client.mjs +27 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- 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/memory-layers/entries.d.mts +241 -0
- package/resources/memory-layers/entries.d.mts.map +1 -0
- package/resources/memory-layers/entries.d.ts +241 -0
- package/resources/memory-layers/entries.d.ts.map +1 -0
- package/resources/memory-layers/entries.js +63 -0
- package/resources/memory-layers/entries.js.map +1 -0
- package/resources/memory-layers/entries.mjs +59 -0
- package/resources/memory-layers/entries.mjs.map +1 -0
- package/resources/memory-layers/index.d.mts +3 -0
- package/resources/memory-layers/index.d.mts.map +1 -0
- package/resources/memory-layers/index.d.ts +3 -0
- package/resources/memory-layers/index.d.ts.map +1 -0
- package/resources/memory-layers/index.js +9 -0
- package/resources/memory-layers/index.js.map +1 -0
- package/resources/memory-layers/index.mjs +4 -0
- package/resources/memory-layers/index.mjs.map +1 -0
- package/resources/memory-layers/memory-layers.d.mts +140 -0
- package/resources/memory-layers/memory-layers.d.mts.map +1 -0
- package/resources/memory-layers/memory-layers.d.ts +140 -0
- package/resources/memory-layers/memory-layers.d.ts.map +1 -0
- package/resources/memory-layers/memory-layers.js +65 -0
- package/resources/memory-layers/memory-layers.js.map +1 -0
- package/resources/memory-layers/memory-layers.mjs +60 -0
- package/resources/memory-layers/memory-layers.mjs.map +1 -0
- package/resources/memory-layers.d.mts +2 -0
- package/resources/memory-layers.d.mts.map +1 -0
- package/resources/memory-layers.d.ts +2 -0
- package/resources/memory-layers.d.ts.map +1 -0
- package/resources/memory-layers.js +6 -0
- package/resources/memory-layers.js.map +1 -0
- package/resources/memory-layers.mjs +3 -0
- package/resources/memory-layers.mjs.map +1 -0
- package/resources/objectives/tasks.d.mts +1 -1
- package/resources/objectives/tasks.d.ts +1 -1
- package/resources/objectives/tool-calls.d.mts +3 -2
- package/resources/objectives/tool-calls.d.mts.map +1 -1
- package/resources/objectives/tool-calls.d.ts +3 -2
- package/resources/objectives/tool-calls.d.ts.map +1 -1
- package/resources/uploads.d.mts +97 -0
- package/resources/uploads.d.mts.map +1 -0
- package/resources/uploads.d.ts +97 -0
- package/resources/uploads.d.ts.map +1 -0
- package/resources/uploads.js +33 -0
- package/resources/uploads.js.map +1 -0
- package/resources/uploads.mjs +29 -0
- package/resources/uploads.mjs.map +1 -0
- package/src/client.ts +61 -0
- package/src/resources/index.ts +11 -0
- package/src/resources/memory-layers/entries.ts +325 -0
- package/src/resources/memory-layers/index.ts +27 -0
- package/src/resources/memory-layers/memory-layers.ts +225 -0
- package/src/resources/memory-layers.ts +3 -0
- package/src/resources/objectives/tasks.ts +1 -1
- package/src/resources/objectives/tool-calls.ts +3 -2
- package/src/resources/uploads.ts +128 -0
- 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,128 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as AccountAPI from './account';
|
|
5
|
+
import * as Shared from './shared';
|
|
6
|
+
import { APIPromise } from '../core/api-promise';
|
|
7
|
+
import { RequestOptions } from '../internal/request-options';
|
|
8
|
+
import { path } from '../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* UploadService issues short-lived presigned URLs for direct client-to-object-
|
|
12
|
+
* storage uploads at the WORKSPACE level. Created uploads can be referenced by
|
|
13
|
+
* id when creating or updating resources that accept binary content (e.g.,
|
|
14
|
+
* MemoryEntry).
|
|
15
|
+
*
|
|
16
|
+
* Authentication: Bearer token (JWT)
|
|
17
|
+
* Scope: Workspace-level operations
|
|
18
|
+
*/
|
|
19
|
+
export class Uploads extends APIResource {
|
|
20
|
+
/**
|
|
21
|
+
* Issues a short-lived presigned URL for direct upload to object storage. The
|
|
22
|
+
* returned id is used to reference the upload from resources that accept binary
|
|
23
|
+
* content.
|
|
24
|
+
*/
|
|
25
|
+
create(body: UploadCreateParams, options?: RequestOptions): APIPromise<Upload> {
|
|
26
|
+
return this._client.post('/v1/uploads', { body, ...options });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves the current state of an upload, including its lifecycle status
|
|
31
|
+
*/
|
|
32
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Upload> {
|
|
33
|
+
return this._client.get(path`/v1/uploads/${id}`, options);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Upload is a workspace-scoped handle representing a single file upload flow.
|
|
39
|
+
* Clients call CreateUpload to receive a short-lived presigned URL, PUT the file
|
|
40
|
+
* directly to object storage, then reference the upload by id when creating or
|
|
41
|
+
* updating resources that accept binary content.
|
|
42
|
+
*
|
|
43
|
+
* Uploads are one-shot: once consumed by a creating or updating resource, the
|
|
44
|
+
* upload transitions to UPLOAD_STATUS_CONSUMED and cannot be reused. Unused
|
|
45
|
+
* uploads expire and are garbage-collected by the runtime.
|
|
46
|
+
*/
|
|
47
|
+
export interface Upload {
|
|
48
|
+
info: UploadInfo;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
52
|
+
*/
|
|
53
|
+
metadata: Shared.ResourceMetadata;
|
|
54
|
+
|
|
55
|
+
spec: UploadSpec;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface UploadInfo {
|
|
59
|
+
/**
|
|
60
|
+
* Profile represents a human user at the account level. Profiles are
|
|
61
|
+
* account-scoped resources that can be associated with multiple workspaces through
|
|
62
|
+
* the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
|
|
63
|
+
*/
|
|
64
|
+
createdBy?: AccountAPI.Profile;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Lifecycle state. Transitions PENDING → COMPLETE (storage confirms the object
|
|
68
|
+
* exists) → CONSUMED (a resource referenced this upload), or → EXPIRED (URL
|
|
69
|
+
* elapsed without a PUT).
|
|
70
|
+
*/
|
|
71
|
+
status?:
|
|
72
|
+
| 'UPLOAD_STATUS_UNSPECIFIED'
|
|
73
|
+
| 'UPLOAD_STATUS_PENDING'
|
|
74
|
+
| 'UPLOAD_STATUS_COMPLETE'
|
|
75
|
+
| 'UPLOAD_STATUS_CONSUMED'
|
|
76
|
+
| 'UPLOAD_STATUS_EXPIRED';
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Presigned PUT URL. Short-lived. The client must PUT with the exact Content-Type
|
|
80
|
+
* declared in the spec, and the body length must match size_bytes.
|
|
81
|
+
*/
|
|
82
|
+
uploadUrl?: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Absolute time at which upload_url stops working.
|
|
86
|
+
*/
|
|
87
|
+
uploadUrlExpiresAt?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface UploadSpec {
|
|
91
|
+
/**
|
|
92
|
+
* MIME type the client will send. Baked into the presigned URL's signature — the
|
|
93
|
+
* PUT must match exactly or object storage will reject it.
|
|
94
|
+
*/
|
|
95
|
+
contentType: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Client-supplied filename. Used for audit and display only; does not control the
|
|
99
|
+
* object's storage path.
|
|
100
|
+
*/
|
|
101
|
+
filename: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Expected size of the upload in bytes. Baked into the presigned URL as a
|
|
105
|
+
* Content-Length constraint.
|
|
106
|
+
*/
|
|
107
|
+
sizeBytes: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface UploadCreateParams {
|
|
111
|
+
/**
|
|
112
|
+
* CreateResourceMetadata contains the user-provided fields for creating a
|
|
113
|
+
* workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
114
|
+
* profile_id, created_at) are excluded since they are set by the server.
|
|
115
|
+
*/
|
|
116
|
+
metadata: Shared.CreateResourceMetadata;
|
|
117
|
+
|
|
118
|
+
spec: UploadSpec;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export declare namespace Uploads {
|
|
122
|
+
export {
|
|
123
|
+
type Upload as Upload,
|
|
124
|
+
type UploadInfo as UploadInfo,
|
|
125
|
+
type UploadSpec as UploadSpec,
|
|
126
|
+
type UploadCreateParams as UploadCreateParams,
|
|
127
|
+
};
|
|
128
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.45.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.45.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.45.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.45.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|