runbios-sdk 0.2.6-rc.197 → 0.2.6-rc.201

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-rc.197";
39
+ export declare const VERSION = "0.2.6-rc.201";
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-rc.197';
39
+ export const VERSION = '0.2.6-rc.201';
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.
@@ -9,7 +9,7 @@ export declare class Datasets {
9
9
  /** @internal */
10
10
  constructor(_http: HttpClient);
11
11
  /**
12
- * List datasets in the current organization/workspace.
12
+ * List ready datasets by default. Request processing, failed, or all explicitly.
13
13
  *
14
14
  * @example
15
15
  * ```ts
@@ -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
  *
@@ -25,7 +25,7 @@ export class Datasets {
25
25
  this._http = _http;
26
26
  }
27
27
  /**
28
- * List datasets in the current organization/workspace.
28
+ * List ready datasets by default. Request processing, failed, or all explicitly.
29
29
  *
30
30
  * @example
31
31
  * ```ts
@@ -43,8 +43,7 @@ export class Datasets {
43
43
  q.set('workspace_id', params.workspaceId);
44
44
  if (params.datasetType)
45
45
  q.set('dataset_type', params.datasetType);
46
- if (params.status)
47
- q.set('status', params.status);
46
+ q.set('status', params.status ?? 'ready');
48
47
  if (params.query)
49
48
  q.set('q', params.query);
50
49
  if (params.sort)
@@ -260,6 +259,45 @@ export class Datasets {
260
259
  });
261
260
  return normalizeDataset(result);
262
261
  }
262
+ /**
263
+ * Turn a curated Conscious Loop set into a dataset training can use.
264
+ *
265
+ * Without this, using a loop set from code meant downloading the JSONL and
266
+ * uploading it again as an unrelated dataset. That works, and it throws away
267
+ * the one thing that made the set worth having: which conversations, which
268
+ * verdicts and which judges produced it. Registering keeps that link.
269
+ *
270
+ * The set is then put through the SAME validation every uploaded dataset
271
+ * gets, so it comes back `processing` rather than ready -- poll
272
+ * {@link getStatus} before training on it. Registering the same set and split
273
+ * twice is refused rather than billed twice, and an empty set is refused
274
+ * rather than registered as something that would fail inside the trainer.
275
+ *
276
+ * @example
277
+ * ```ts
278
+ * const train = await client.datasets.registerLoop({
279
+ * loopDatasetId: 'd244894c-7ab4-4b3d-bfda-e0bb4c563ceb',
280
+ * name: 'extract-v1 distill SFT',
281
+ * split: 'train',
282
+ * });
283
+ * ```
284
+ */
285
+ async registerLoop(params) {
286
+ const raw = params;
287
+ const loopDatasetId = String(raw.loopDatasetId || raw.loop_dataset_id || '');
288
+ if (!loopDatasetId)
289
+ throw new Error('RunBiOS: loopDatasetId is required');
290
+ const workspaceId = String(raw.workspaceId || raw.workspace_id || '')
291
+ || this._http.workspaceId
292
+ || await this._http.resolveWorkspaceId();
293
+ const result = await this._http.fetchPost('/api/datasets/register-loop', {
294
+ loop_dataset_id: loopDatasetId,
295
+ workspace_id: workspaceId,
296
+ split: raw.split ?? 'all',
297
+ ...(raw.name !== undefined && { name: raw.name }),
298
+ });
299
+ return normalizeDataset(result);
300
+ }
263
301
  /**
264
302
  * Get the processing status of a dataset.
265
303
  *
package/dist/types.d.ts CHANGED
@@ -347,8 +347,8 @@ export interface DatasetListParams {
347
347
  workspaceId?: string;
348
348
  /** Filter by dataset type. */
349
349
  datasetType?: string;
350
- /** Lifecycle bucket: ready, processing, or failed. */
351
- status?: 'ready' | 'processing' | 'failed';
350
+ /** Lifecycle bucket. Defaults to ready; all is an explicit diagnostic view. */
351
+ status?: 'ready' | 'processing' | 'failed' | 'all';
352
352
  /** Case-insensitive name search. */
353
353
  query?: string;
354
354
  /** Server-side ordering. */
@@ -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-rc.197",
3
+ "version": "0.2.6-rc.201",
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",