@wice24/tars-sdk 0.1.6 → 0.1.7
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/index.d.ts +5 -0
- package/dist/index.js +12 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -121,6 +121,11 @@ export declare class TarsClient {
|
|
|
121
121
|
version: number;
|
|
122
122
|
files: number;
|
|
123
123
|
}>;
|
|
124
|
+
/**
|
|
125
|
+
* Download one immutable version's zip bytes — exactly what `pushVersion`
|
|
126
|
+
* stored, e.g. to promote a proven version to another tenant or instance.
|
|
127
|
+
*/
|
|
128
|
+
downloadVersion: (id: string, version: number) => Promise<Uint8Array>;
|
|
124
129
|
};
|
|
125
130
|
readonly apiKeys: {
|
|
126
131
|
create: (input?: {
|
package/dist/index.js
CHANGED
|
@@ -162,6 +162,18 @@ export class TarsClient {
|
|
|
162
162
|
throw new TarsApiError(res.status, await res.json().catch(() => ({})));
|
|
163
163
|
return res.json();
|
|
164
164
|
},
|
|
165
|
+
/**
|
|
166
|
+
* Download one immutable version's zip bytes — exactly what `pushVersion`
|
|
167
|
+
* stored, e.g. to promote a proven version to another tenant or instance.
|
|
168
|
+
*/
|
|
169
|
+
downloadVersion: async (id, version) => {
|
|
170
|
+
const res = await this.fetchImpl(`${this.baseUrl}/v1/skills/${id}/versions/${version}/content`, {
|
|
171
|
+
headers: { authorization: `Bearer ${this.apiKey}` },
|
|
172
|
+
});
|
|
173
|
+
if (!res.ok)
|
|
174
|
+
throw new TarsApiError(res.status, await res.json().catch(() => undefined));
|
|
175
|
+
return new Uint8Array(await res.arrayBuffer());
|
|
176
|
+
},
|
|
165
177
|
};
|
|
166
178
|
// ── api keys / identity ──────────────────────────────────────
|
|
167
179
|
apiKeys = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wice24/tars-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Client SDK for TARS — the self-hosted managed-agents platform (sessions, streaming turns, client tools, MCP credentials, skills, files, usage, tenant administration)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|