@madewithremy/admin 0.1.12 → 0.1.13

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/prod.js CHANGED
@@ -3268,13 +3268,14 @@ function base2(appId) {
3268
3268
  return `/_internal/v2/apps/${appId}/datasources/jobs`;
3269
3269
  }
3270
3270
  function start(ctx, params) {
3271
- const { slug, source, approve: approve2, budgetDollars, concurrency, limit } = params;
3271
+ const { slug, source, approve: approve2, budgetDollars, concurrency, priority, limit } = params;
3272
3272
  return call(ctx, "POST", base2(ctx.appId), {
3273
3273
  slug,
3274
3274
  source,
3275
3275
  ...approve2 ? { approve: true } : {},
3276
3276
  ...budgetDollars !== void 0 ? { budgetDollars } : {},
3277
3277
  ...concurrency !== void 0 ? { concurrency } : {},
3278
+ ...priority ? { priority: true } : {},
3278
3279
  ...limit !== void 0 ? { limit } : {}
3279
3280
  });
3280
3281
  }
@@ -3307,9 +3308,16 @@ function approve(ctx, params) {
3307
3308
  ctx,
3308
3309
  "POST",
3309
3310
  `${base2(ctx.appId)}/${encodeURIComponent(params.id)}/approve`,
3310
- params.concurrency !== void 0 ? { concurrency: params.concurrency } : void 0
3311
+ controlBody(params)
3311
3312
  );
3312
3313
  }
3314
+ function controlBody(params) {
3315
+ const body = {
3316
+ ...params.concurrency !== void 0 ? { concurrency: params.concurrency } : {},
3317
+ ...params.priority !== void 0 ? { priority: params.priority } : {}
3318
+ };
3319
+ return Object.keys(body).length > 0 ? body : void 0;
3320
+ }
3313
3321
  function pause(ctx, params) {
3314
3322
  return call(
3315
3323
  ctx,
@@ -3322,7 +3330,7 @@ function resume(ctx, params) {
3322
3330
  ctx,
3323
3331
  "POST",
3324
3332
  `${base2(ctx.appId)}/${encodeURIComponent(params.id)}/resume`,
3325
- params.concurrency !== void 0 ? { concurrency: params.concurrency } : void 0
3333
+ controlBody(params)
3326
3334
  );
3327
3335
  }
3328
3336
  function cancel(ctx, params) {
@@ -3477,7 +3485,8 @@ function sync(ctx, params) {
3477
3485
  slug: params.slug,
3478
3486
  ...params.budgetDollars !== void 0 ? { budgetDollars: params.budgetDollars } : {},
3479
3487
  ...params.limit !== void 0 ? { limit: params.limit } : {},
3480
- ...params.concurrency !== void 0 ? { concurrency: params.concurrency } : {}
3488
+ ...params.concurrency !== void 0 ? { concurrency: params.concurrency } : {},
3489
+ ...params.priority ? { priority: true } : {}
3481
3490
  });
3482
3491
  }
3483
3492
 
@@ -3506,12 +3515,13 @@ var dataSourceConnectorsSpecs = {
3506
3515
  flags: { source: { type: "string" } }
3507
3516
  },
3508
3517
  "datasources sync": {
3509
- usage: "Usage: remy-admin datasources sync [--source <slug>] [--budget <dollars>] [--limit <n>] [--concurrency <n>] [--wait] [--timeout <sec>]",
3518
+ usage: "Usage: remy-admin datasources sync [--source <slug>] [--budget <dollars>] [--limit <n>] [--concurrency <n>] [--priority] [--wait] [--timeout <sec>]",
3510
3519
  flags: {
3511
3520
  source: { type: "string" },
3512
3521
  budget: { type: "number", min: 0.01 },
3513
3522
  limit: { type: "number", min: 1 },
3514
3523
  concurrency: { type: "number", min: 1 },
3524
+ priority: { type: "boolean" },
3515
3525
  wait: { type: "boolean" },
3516
3526
  timeout: { type: "string" }
3517
3527
  }
@@ -3587,7 +3597,8 @@ async function sync2(ctx, a) {
3587
3597
  slug,
3588
3598
  ...budget !== void 0 ? { budgetDollars: budget } : {},
3589
3599
  ...limit !== void 0 ? { limit } : {},
3590
- ...concurrency !== void 0 ? { concurrency } : {}
3600
+ ...concurrency !== void 0 ? { concurrency } : {},
3601
+ ...a.bool("priority") ? { priority: true } : {}
3591
3602
  });
3592
3603
  if (!a.bool("wait")) {
3593
3604
  out({
@@ -3612,7 +3623,7 @@ var dataSourceConnectorsHelp = `
3612
3623
  Following an S3 bucket (connectors):
3613
3624
  remy-admin datasources connect --source <slug> --bucket <name> --region <aws-region> [--prefix <p>] --access-key-secret <NAME> --secret-key-secret <NAME> [--deletions mirror|keep] [--budget-per-sync <dollars>]
3614
3625
  remy-admin datasources connector [--source <slug>]
3615
- remy-admin datasources sync [--source <slug>] [--budget <dollars>] [--limit <n>] [--concurrency <n>] [--wait] [--timeout <sec>]
3626
+ remy-admin datasources sync [--source <slug>] [--budget <dollars>] [--limit <n>] [--concurrency <n>] [--priority] [--wait] [--timeout <sec>]
3616
3627
  remy-admin datasources disconnect --source <slug>
3617
3628
 
3618
3629
  A connector makes a bucket the customer owns the origin of a source. The
@@ -4411,7 +4422,7 @@ import fs4 from "fs";
4411
4422
  import path4 from "path";
4412
4423
  var dataSourceJobsSpecs = {
4413
4424
  "datasources jobs start": {
4414
- usage: "Usage: remy-admin datasources jobs start [--source <slug>] (--store <name> [--access <private|public>] [--prefix <p>] | --manifest <file.jsonl>) [--limit <n>] [--budget <dollars>] [--concurrency <n>] [--approve] [--wait] [--timeout <sec>]",
4425
+ usage: "Usage: remy-admin datasources jobs start [--source <slug>] (--store <name> [--access <private|public>] [--prefix <p>] | --manifest <file.jsonl>) [--limit <n>] [--budget <dollars>] [--concurrency <n>] [--priority] [--approve] [--wait] [--timeout <sec>]",
4415
4426
  flags: {
4416
4427
  source: { type: "string" },
4417
4428
  store: { type: "string" },
@@ -4421,6 +4432,7 @@ var dataSourceJobsSpecs = {
4421
4432
  limit: { type: "number", min: 1 },
4422
4433
  budget: { type: "number", min: 0.01 },
4423
4434
  concurrency: { type: "number", min: 1 },
4435
+ priority: { type: "boolean" },
4424
4436
  approve: { type: "boolean" },
4425
4437
  wait: { type: "boolean" },
4426
4438
  timeout: { type: "string" }
@@ -4440,10 +4452,11 @@ var dataSourceJobsSpecs = {
4440
4452
  flags: { wait: { type: "boolean" }, timeout: { type: "string" } }
4441
4453
  },
4442
4454
  "datasources jobs approve": {
4443
- usage: "Usage: remy-admin datasources jobs approve <id> [--concurrency <n>] [--wait] [--timeout <sec>]",
4455
+ usage: "Usage: remy-admin datasources jobs approve <id> [--concurrency <n>] [--priority] [--wait] [--timeout <sec>]",
4444
4456
  positionals: [{ name: "id", required: true }],
4445
4457
  flags: {
4446
4458
  concurrency: { type: "number", min: 1 },
4459
+ priority: { type: "boolean" },
4447
4460
  wait: { type: "boolean" },
4448
4461
  timeout: { type: "string" }
4449
4462
  }
@@ -4453,10 +4466,11 @@ var dataSourceJobsSpecs = {
4453
4466
  positionals: [{ name: "id", required: true }]
4454
4467
  },
4455
4468
  "datasources jobs resume": {
4456
- usage: "Usage: remy-admin datasources jobs resume <id> [--concurrency <n>] [--wait] [--timeout <sec>]",
4469
+ usage: "Usage: remy-admin datasources jobs resume <id> [--concurrency <n>] [--priority] [--wait] [--timeout <sec>]",
4457
4470
  positionals: [{ name: "id", required: true }],
4458
4471
  flags: {
4459
4472
  concurrency: { type: "number", min: 1 },
4473
+ priority: { type: "boolean" },
4460
4474
  wait: { type: "boolean" },
4461
4475
  timeout: { type: "string" }
4462
4476
  }
@@ -4506,6 +4520,7 @@ async function jobsStart(ctx, a) {
4506
4520
  ...a.bool("approve") ? { approve: true } : {},
4507
4521
  ...budget !== void 0 ? { budgetDollars: budget } : {},
4508
4522
  ...concurrency !== void 0 ? { concurrency } : {},
4523
+ ...a.bool("priority") ? { priority: true } : {},
4509
4524
  ...limit !== void 0 ? { limit } : {}
4510
4525
  });
4511
4526
  if (!a.bool("wait")) {
@@ -4539,7 +4554,8 @@ async function jobsApprove(ctx, a) {
4539
4554
  const concurrency = a.num("concurrency");
4540
4555
  const { job } = await approve(ctx, {
4541
4556
  id,
4542
- ...concurrency !== void 0 ? { concurrency } : {}
4557
+ ...concurrency !== void 0 ? { concurrency } : {},
4558
+ ...a.bool("priority") ? { priority: true } : {}
4543
4559
  });
4544
4560
  if (!a.bool("wait")) {
4545
4561
  out({
@@ -4558,7 +4574,8 @@ async function jobsResume(ctx, a) {
4558
4574
  const concurrency = a.num("concurrency");
4559
4575
  const { job } = await resume(ctx, {
4560
4576
  id,
4561
- ...concurrency !== void 0 ? { concurrency } : {}
4577
+ ...concurrency !== void 0 ? { concurrency } : {},
4578
+ ...a.bool("priority") ? { priority: true } : {}
4562
4579
  });
4563
4580
  if (!a.bool("wait")) {
4564
4581
  out({ job });
@@ -4606,10 +4623,14 @@ Bulk ingestion (jobs):
4606
4623
  --approve Run as soon as the plan passes the gates, no separate approve
4607
4624
  --budget <dollars> Pause when estimated spend reaches this (default 1.5x the plan)
4608
4625
  --concurrency <n> Batches in flight at once (default 64, max 128)
4626
+ --priority Embed at the provider's priority tier: calls skip the
4627
+ provider's queue at 1.5x the embedding price. For the
4628
+ load where the clock matters more than the price.
4609
4629
  --limit <n> Only the first N objects: a cheap sample of the corpus
4610
4630
  --wait Block until the plan is ready (or, with --approve, until done)
4611
4631
  On approve and resume:
4612
4632
  --concurrency <n> Batches in flight from here on (max 128); a plan made at 8 can run at 64
4633
+ --priority Priority-tier embedding from here on (1.5x); pause and resume to change it
4613
4634
 
4614
4635
  While running, documents are read in batches of fifty with one embedding
4615
4636
  call per batch. Unchanged documents are skipped by content hash, so re-running
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madewithremy/admin",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Admin SDK + CLI for managing production Remy apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",