@seclai/sdk 1.1.3 → 1.1.5
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/README.md +1 -1
- package/dist/index.cjs +70 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +430 -3
- package/dist/index.d.ts +430 -3
- package/dist/index.js +70 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -797,6 +797,21 @@ var Seclai = class {
|
|
|
797
797
|
await this.request("DELETE", `/agents/${agentId}`);
|
|
798
798
|
}
|
|
799
799
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
800
|
+
// Agent Export
|
|
801
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
802
|
+
/**
|
|
803
|
+
* Export an agent definition as a portable JSON snapshot.
|
|
804
|
+
*
|
|
805
|
+
* @param agentId - Agent identifier.
|
|
806
|
+
* @param download - When true (default), the server sets Content-Disposition: attachment.
|
|
807
|
+
* @returns The exported agent snapshot.
|
|
808
|
+
*/
|
|
809
|
+
async exportAgent(agentId, download = true) {
|
|
810
|
+
return await this.request("GET", `/agents/${agentId}/export`, {
|
|
811
|
+
query: { download }
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
800
815
|
// Agent Definitions
|
|
801
816
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
802
817
|
/**
|
|
@@ -2159,6 +2174,61 @@ var Seclai = class {
|
|
|
2159
2174
|
async getModelRecommendations(modelId) {
|
|
2160
2175
|
return await this.request("GET", `/models/${modelId}/recommendations`);
|
|
2161
2176
|
}
|
|
2177
|
+
/**
|
|
2178
|
+
* List all enabled LLM models grouped by provider.
|
|
2179
|
+
*
|
|
2180
|
+
* @param opts - Optional filters.
|
|
2181
|
+
*/
|
|
2182
|
+
async listModels(opts = {}) {
|
|
2183
|
+
return await this.request("GET", "/models", {
|
|
2184
|
+
query: { provider: opts.provider, supports_tool_use: opts.supportsToolUse, supports_thinking: opts.supportsThinking }
|
|
2185
|
+
});
|
|
2186
|
+
}
|
|
2187
|
+
/**
|
|
2188
|
+
* Get full details for a specific model.
|
|
2189
|
+
*
|
|
2190
|
+
* @param modelId - Model identifier.
|
|
2191
|
+
*/
|
|
2192
|
+
async getModel(modelId) {
|
|
2193
|
+
return await this.request("GET", `/models/${modelId}/details`);
|
|
2194
|
+
}
|
|
2195
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
2196
|
+
// Model Playground Experiments
|
|
2197
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
2198
|
+
/**
|
|
2199
|
+
* List model playground experiments.
|
|
2200
|
+
*
|
|
2201
|
+
* @param opts - Optional filters and pagination.
|
|
2202
|
+
*/
|
|
2203
|
+
async listExperiments(opts = {}) {
|
|
2204
|
+
return await this.request("GET", "/models/playground/experiments", {
|
|
2205
|
+
query: { days: opts.days, start_date: opts.startDate, end_date: opts.endDate, limit: opts.limit, offset: opts.offset }
|
|
2206
|
+
});
|
|
2207
|
+
}
|
|
2208
|
+
/**
|
|
2209
|
+
* Create a model playground experiment.
|
|
2210
|
+
*
|
|
2211
|
+
* @param body - Experiment configuration.
|
|
2212
|
+
*/
|
|
2213
|
+
async createExperiment(body) {
|
|
2214
|
+
return await this.request("POST", "/models/playground/experiments", { json: body });
|
|
2215
|
+
}
|
|
2216
|
+
/**
|
|
2217
|
+
* Get a model playground experiment by ID.
|
|
2218
|
+
*
|
|
2219
|
+
* @param experimentId - Experiment identifier.
|
|
2220
|
+
*/
|
|
2221
|
+
async getExperiment(experimentId) {
|
|
2222
|
+
return await this.request("GET", `/models/playground/experiments/${experimentId}`);
|
|
2223
|
+
}
|
|
2224
|
+
/**
|
|
2225
|
+
* Cancel a running model playground experiment.
|
|
2226
|
+
*
|
|
2227
|
+
* @param experimentId - Experiment identifier.
|
|
2228
|
+
*/
|
|
2229
|
+
async cancelExperiment(experimentId) {
|
|
2230
|
+
return await this.request("POST", `/models/playground/experiments/${experimentId}/cancel`);
|
|
2231
|
+
}
|
|
2162
2232
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
2163
2233
|
// Search
|
|
2164
2234
|
// ═══════════════════════════════════════════════════════════════════════════
|