runbios-sdk 0.2.6-dev.196 → 0.2.6-dev.198

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 CHANGED
@@ -36,7 +36,7 @@ import { Loop } from './resources/loop.js';
36
36
  * SDK version. Sent as part of the User-Agent header.
37
37
  * Must match package.json "version" -- enforced by a contract test.
38
38
  */
39
- export declare const VERSION = "0.2.6-dev.196";
39
+ export declare const VERSION = "0.2.6-dev.198";
40
40
  export declare class RunBiOS {
41
41
  /** Search models, fetch configs, check adapter compatibility. */
42
42
  readonly models: Models;
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ import { Loop } from './resources/loop.js';
36
36
  * SDK version. Sent as part of the User-Agent header.
37
37
  * Must match package.json "version" -- enforced by a contract test.
38
38
  */
39
- export const VERSION = '0.2.6-dev.196';
39
+ export const VERSION = '0.2.6-dev.198';
40
40
  export class RunBiOS {
41
41
  /** Search models, fetch configs, check adapter compatibility. */
42
42
  models;
@@ -1,5 +1,5 @@
1
1
  import type { HttpClient } from '../client.js';
2
- import type { Dataset, DatasetListParams, DatasetListResponse, DatasetUploadParams, DatasetPreview, DatasetPreviewParams, DatasetImportHFParams, DatasetRegisterHFParams, DatasetHubSearchParams, DatasetHubPreviewParams, DatasetValidation, DatasetFormatSpecs, DatasetStorageUsage } from '../types.js';
2
+ import type { Dataset, DatasetListParams, DatasetListResponse, DatasetUploadParams, DatasetPreview, DatasetPreviewParams, DatasetImportHFParams, DatasetRegisterHFParams, DatasetRegisterLoopParams, DatasetHubSearchParams, DatasetHubPreviewParams, DatasetValidation, DatasetFormatSpecs, DatasetStorageUsage } from '../types.js';
3
3
  /**
4
4
  * Manage training datasets -- upload files, import from HuggingFace,
5
5
  * preview contents, and manage storage.
@@ -118,6 +118,30 @@ export declare class Datasets {
118
118
  * ```
119
119
  */
120
120
  registerHuggingFace(params: DatasetRegisterHFParams | Record<string, unknown>): Promise<Dataset>;
121
+ /**
122
+ * Turn a curated Conscious Loop set into a dataset training can use.
123
+ *
124
+ * Without this, using a loop set from code meant downloading the JSONL and
125
+ * uploading it again as an unrelated dataset. That works, and it throws away
126
+ * the one thing that made the set worth having: which conversations, which
127
+ * verdicts and which judges produced it. Registering keeps that link.
128
+ *
129
+ * The set is then put through the SAME validation every uploaded dataset
130
+ * gets, so it comes back `processing` rather than ready -- poll
131
+ * {@link getStatus} before training on it. Registering the same set and split
132
+ * twice is refused rather than billed twice, and an empty set is refused
133
+ * rather than registered as something that would fail inside the trainer.
134
+ *
135
+ * @example
136
+ * ```ts
137
+ * const train = await client.datasets.registerLoop({
138
+ * loopDatasetId: 'd244894c-7ab4-4b3d-bfda-e0bb4c563ceb',
139
+ * name: 'extract-v1 distill SFT',
140
+ * split: 'train',
141
+ * });
142
+ * ```
143
+ */
144
+ registerLoop(params: DatasetRegisterLoopParams | Record<string, unknown>): Promise<Dataset>;
121
145
  /**
122
146
  * Get the processing status of a dataset.
123
147
  *
@@ -260,6 +260,45 @@ export class Datasets {
260
260
  });
261
261
  return normalizeDataset(result);
262
262
  }
263
+ /**
264
+ * Turn a curated Conscious Loop set into a dataset training can use.
265
+ *
266
+ * Without this, using a loop set from code meant downloading the JSONL and
267
+ * uploading it again as an unrelated dataset. That works, and it throws away
268
+ * the one thing that made the set worth having: which conversations, which
269
+ * verdicts and which judges produced it. Registering keeps that link.
270
+ *
271
+ * The set is then put through the SAME validation every uploaded dataset
272
+ * gets, so it comes back `processing` rather than ready -- poll
273
+ * {@link getStatus} before training on it. Registering the same set and split
274
+ * twice is refused rather than billed twice, and an empty set is refused
275
+ * rather than registered as something that would fail inside the trainer.
276
+ *
277
+ * @example
278
+ * ```ts
279
+ * const train = await client.datasets.registerLoop({
280
+ * loopDatasetId: 'd244894c-7ab4-4b3d-bfda-e0bb4c563ceb',
281
+ * name: 'extract-v1 distill SFT',
282
+ * split: 'train',
283
+ * });
284
+ * ```
285
+ */
286
+ async registerLoop(params) {
287
+ const raw = params;
288
+ const loopDatasetId = String(raw.loopDatasetId || raw.loop_dataset_id || '');
289
+ if (!loopDatasetId)
290
+ throw new Error('RunBiOS: loopDatasetId is required');
291
+ const workspaceId = String(raw.workspaceId || raw.workspace_id || '')
292
+ || this._http.workspaceId
293
+ || await this._http.resolveWorkspaceId();
294
+ const result = await this._http.fetchPost('/api/datasets/register-loop', {
295
+ loop_dataset_id: loopDatasetId,
296
+ workspace_id: workspaceId,
297
+ split: raw.split ?? 'all',
298
+ ...(raw.name !== undefined && { name: raw.name }),
299
+ });
300
+ return normalizeDataset(result);
301
+ }
263
302
  /**
264
303
  * Get the processing status of a dataset.
265
304
  *
package/dist/types.d.ts CHANGED
@@ -444,6 +444,21 @@ export interface DatasetRegisterHFParams {
444
444
  columnMapping?: Record<string, string>;
445
445
  importMode?: 'auto' | 'reference' | 'materialize';
446
446
  }
447
+ /** Parameters for registering a curated Conscious Loop set as a dataset. */
448
+ export interface DatasetRegisterLoopParams {
449
+ /** The Conscious Loop dataset to register. */
450
+ loopDatasetId: string;
451
+ /** Defaults to `loop-<first 8 of the loop id>`. */
452
+ name?: string;
453
+ /**
454
+ * Which rows to take. Defaults to `all`, because the loop already split the
455
+ * set by TIME and re-splitting a deliberate split throws that decision away.
456
+ * Register `train` and `holdout` separately to score a training job against
457
+ * the loop's own held-back rows; both can exist at once.
458
+ */
459
+ split?: 'all' | 'train' | 'holdout';
460
+ workspaceId?: string;
461
+ }
447
462
  /** Parameters for searching HuggingFace Hub datasets. */
448
463
  export interface DatasetHubSearchParams {
449
464
  /** Search query. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runbios-sdk",
3
- "version": "0.2.6-dev.196",
3
+ "version": "0.2.6-dev.198",
4
4
  "description": "Official TypeScript SDK for the Run BiOS training and deployment platform API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",