@madewithremy/admin 0.1.58 → 0.1.60

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.
@@ -601,9 +601,9 @@ export declare function rmWhereAll(ctx: AdminContext, params: RmWhereParams & {
601
601
  /**
602
602
  * Delete a whole data source — every version, every document, and every byte.
603
603
  *
604
- * Extraction caches survive (shared across sources by content hash), so
605
- * re-ingesting the same files into a new source costs no re-extraction.
606
- * Manage-plane only: running app code has no equivalent.
604
+ * Extracted text is shared across the app's sources by content hash, so a
605
+ * document's goes too unless another source in the app still holds the same
606
+ * bytes. Manage-plane only: running app code has no equivalent.
607
607
  *
608
608
  * @throws AdminApiError `data_source_not_found` (404).
609
609
  * @example
@@ -1,5 +1,7 @@
1
1
  /**
2
- * App secrets operations: list, read, write, and delete encrypted key/value pairs.
2
+ * App secrets operations: list, write and delete encrypted key/value pairs.
3
+ * Values are write-only: no op reads one back, and the app's code gets them as
4
+ * environment variables.
3
5
  *
4
6
  * `SecretsSetParams` allows `null` values to explicitly clear an environment's
5
7
  * stored value (mapped from the CLI's `--dev-clear` / `--prod-clear` flags).
@@ -9,26 +11,16 @@
9
11
  * AdminTimeoutError. No printing, no process coupling.
10
12
  */
11
13
  import type { AdminContext } from '../ctx.js';
12
- import type { SecretsListResult, SecretsGetResult, SecretsSetResult, SecretsDeleteResult } from '../types/secrets.js';
14
+ import type { SecretsListResult, SecretsSetResult, SecretsDeleteResult } from '../types/secrets.js';
13
15
  /**
14
- * List all secret keys for the app (values are not returned — use `get` to
15
- * retrieve decrypted values for a specific key).
16
+ * List all secret keys for the app, with which environments have a value.
17
+ * Values are never returned, by this or any op.
16
18
  *
17
19
  * @example
18
20
  * const { secrets } = await admin.secrets.list();
19
21
  * const withProd = secrets.filter((s) => s.hasProdValue);
20
22
  */
21
23
  export declare function list(ctx: AdminContext): Promise<SecretsListResult>;
22
- /**
23
- * Get the decrypted dev and prod values for a secret key.
24
- *
25
- * This call is audited as a `secret.reveal` event on the workspace.
26
- *
27
- * @throws AdminApiError `secret_not_found` (404).
28
- * @example
29
- * const { devValue, prodValue } = await admin.secrets.get('STRIPE_SECRET_KEY');
30
- */
31
- export declare function get(ctx: AdminContext, key: string): Promise<SecretsGetResult>;
32
24
  export interface SecretsSetParams {
33
25
  /**
34
26
  * Value for the dev environment; `null` clears the stored dev value;
package/dist/prod.js CHANGED
@@ -2439,13 +2439,6 @@ function list6(ctx) {
2439
2439
  `/_internal/v2/apps/${ctx.appId}/secrets`
2440
2440
  );
2441
2441
  }
2442
- function get5(ctx, key) {
2443
- return call(
2444
- ctx,
2445
- "GET",
2446
- `/_internal/v2/apps/${ctx.appId}/secrets/${seg(key)}`
2447
- );
2448
- }
2449
2442
  function set2(ctx, key, params) {
2450
2443
  const body = {};
2451
2444
  if ("devValue" in params) {
@@ -2474,10 +2467,6 @@ var secretsSpecs = {
2474
2467
  "secrets list": {
2475
2468
  usage: "Usage: remy-admin secrets list"
2476
2469
  },
2477
- "secrets get": {
2478
- usage: "Usage: remy-admin secrets get <KEY>",
2479
- positionals: [{ name: "key", required: true }]
2480
- },
2481
2470
  "secrets set": {
2482
2471
  usage: "Usage: remy-admin secrets set <KEY> [--dev <value>] [--prod <value>] [--dev-clear] [--prod-clear]",
2483
2472
  positionals: [{ name: "key", required: true }],
@@ -2500,9 +2489,6 @@ var secretsSpecs = {
2500
2489
  async function secretsList(ctx) {
2501
2490
  out(await list6(ctx));
2502
2491
  }
2503
- async function secretsGet(ctx, a) {
2504
- out(await get5(ctx, a.req("key")));
2505
- }
2506
2492
  async function secretsSet(ctx, a) {
2507
2493
  const key = a.req("key");
2508
2494
  const dev = a.str("dev");
@@ -2532,7 +2518,6 @@ async function secretsDelete(ctx, a) {
2532
2518
  }
2533
2519
  var secretsHandlers = {
2534
2520
  "secrets list": secretsList,
2535
- "secrets get": secretsGet,
2536
2521
  "secrets set": secretsSet,
2537
2522
  "secrets delete": secretsDelete
2538
2523
  };
@@ -2540,13 +2525,11 @@ var secretsHelp = `remy-admin secrets \u2014 Manage app secrets (environment var
2540
2525
 
2541
2526
  Subcommands:
2542
2527
  list List all secret keys (values are not shown, only which environments have values)
2543
- get Get decrypted values for a secret
2544
2528
  set Create or update a secret's value for dev and/or prod
2545
2529
  delete Delete a secret entirely (both dev and prod values)
2546
2530
 
2547
2531
  Usage:
2548
2532
  remy-admin secrets list
2549
- remy-admin secrets get <KEY>
2550
2533
  remy-admin secrets set <KEY> [--dev <value>] [--prod <value>] [--dev-clear] [--prod-clear]
2551
2534
  remy-admin secrets delete <KEY>
2552
2535
 
@@ -2559,13 +2542,14 @@ The set command updates only the environments you specify:
2559
2542
 
2560
2543
  Examples:
2561
2544
  remy-admin secrets list
2562
- remy-admin secrets get STRIPE_SECRET_KEY
2563
2545
  remy-admin secrets set STRIPE_SECRET_KEY --dev sk_test_abc --prod sk_live_xyz
2564
2546
  remy-admin secrets set OPENAI_API_KEY --prod sk-abc123
2565
2547
  remy-admin secrets set OLD_KEY --prod-clear
2566
2548
  remy-admin secrets delete OLD_KEY
2567
2549
 
2568
2550
  Notes:
2551
+ - Values are write-only: nothing reads one back once it's saved. The app's
2552
+ code gets them as environment variables; to change one, set it again.
2569
2553
  - If a value starts with a dash, use the '=' form so it isn't read as a flag:
2570
2554
  remy-admin secrets set KEY --prod=-abc123`;
2571
2555
 
@@ -3007,7 +2991,7 @@ function filed(ctx, params = {}) {
3007
2991
  `/_internal/v2/apps/${ctx.appId}/issues/filed${listQuery(params)}`
3008
2992
  );
3009
2993
  }
3010
- function get6(ctx, number) {
2994
+ function get5(ctx, number) {
3011
2995
  return call(
3012
2996
  ctx,
3013
2997
  "GET",
@@ -3219,7 +3203,7 @@ async function issuesFiled(ctx, a) {
3219
3203
  );
3220
3204
  }
3221
3205
  async function issuesGet(ctx, a) {
3222
- out(await get6(ctx, a.req("number")));
3206
+ out(await get5(ctx, a.req("number")));
3223
3207
  }
3224
3208
  async function issuesCreate(ctx, a) {
3225
3209
  const issueBody = readBodyFlag(a);
@@ -4420,7 +4404,7 @@ function list11(ctx, params) {
4420
4404
  `${base2(ctx.appId)}${qs({ slug: params?.slug })}`
4421
4405
  );
4422
4406
  }
4423
- function get7(ctx, params) {
4407
+ function get6(ctx, params) {
4424
4408
  return call(
4425
4409
  ctx,
4426
4410
  "GET",
@@ -4484,7 +4468,7 @@ function waitForJob(ctx, params) {
4484
4468
  async function settle(ctx, params, isSettled) {
4485
4469
  const timeoutMs = params.timeoutMs ?? DEFAULT_WAIT_TIMEOUT_MS2;
4486
4470
  const outcome = await pollUntil(
4487
- async () => (await get7(ctx, { id: params.id })).job,
4471
+ async () => (await get6(ctx, { id: params.id })).job,
4488
4472
  isSettled,
4489
4473
  {
4490
4474
  timeoutMs,
@@ -4633,7 +4617,7 @@ function connect(ctx, params) {
4633
4617
  }
4634
4618
  );
4635
4619
  }
4636
- function get8(ctx, params) {
4620
+ function get7(ctx, params) {
4637
4621
  return call(
4638
4622
  ctx,
4639
4623
  "GET",
@@ -4740,7 +4724,7 @@ async function connect2(ctx, a) {
4740
4724
  }
4741
4725
  async function show(ctx, a) {
4742
4726
  const slug = sourceOf(a);
4743
- out({ dataSource: slug, ...await get8(ctx, { slug }) });
4727
+ out({ dataSource: slug, ...await get7(ctx, { slug }) });
4744
4728
  }
4745
4729
  async function disconnect2(ctx, a) {
4746
4730
  const slug = a.str("source");
@@ -5834,7 +5818,7 @@ async function jobsList(ctx, a) {
5834
5818
  async function jobsStatus(ctx, a) {
5835
5819
  const id = a.req("id");
5836
5820
  if (!a.bool("wait")) {
5837
- out(await get7(ctx, { id }));
5821
+ out(await get6(ctx, { id }));
5838
5822
  return;
5839
5823
  }
5840
5824
  await waitAndReport(ctx, a, id, "job", { action: "status" });
@@ -7360,7 +7344,8 @@ Tuning a corpus:
7360
7344
 
7361
7345
  FREE \u2014 take effect on the next search, no rebuild:
7362
7346
  --rerank <true|false> Cross-encoder reranking (default true)
7363
- --rerank-model <id> Which cross-encoder reranks (live, no rebuild)
7347
+ --rerank-model <id> Which reranking model reranks (live, no rebuild);
7348
+ a chat model is refused, rerank_model_invalid
7364
7349
  --hybrid <true|false> Semantic + keyword matching (default true)
7365
7350
  --top-k <n> Default results per search
7366
7351
 
@@ -7395,7 +7380,16 @@ Tuning a corpus:
7395
7380
  one it lists; the error names the choices.
7396
7381
  Smaller vectors cut index memory, and dedicated
7397
7382
  capacity needs, roughly in proportion.
7398
- --extraction-model <id>
7383
+ --extraction-model <id> Reads PDFs and images; Office documents,
7384
+ spreadsheets, HTML and text never reach it.
7385
+
7386
+ Every model setting takes <model>@<routeKey> to hold that model's calls to
7387
+ one of its serving routes (\`routes\` in listModels), for a data-boundary
7388
+ need: \`--embedding-model text-embedding-3-large@openai\`. The pin is part of
7389
+ the setting, so it costs what the setting does, and it holds ingest and
7390
+ search alike. \`config\` shows it as stored; a route the model doesn't
7391
+ declare is refused with model_route_unavailable. The bare id routes
7392
+ automatically.
7399
7393
 
7400
7394
  Placement (shared pool vs dedicated capacity, see \`infra --help\`):
7401
7395
  --source defaults to "${DEFAULT_SOURCE}" and is created on first use, on the
@@ -7448,8 +7442,13 @@ Notes:
7448
7442
  recorded, e.g. '{"externalIdPrefix":"archive/2019/"}'). An empty filter
7449
7443
  is refused; to remove everything, delete the source.
7450
7444
  delete requires an explicit --source (no default) and refuses while documents
7451
- are still ingesting. Extraction caches survive deletion, so re-ingesting
7452
- the same files elsewhere costs no re-extraction.
7445
+ are still ingesting.
7446
+ Extracted text is kept by content hash and shared across the app's sources.
7447
+ It goes once no document in the app holds the same bytes (rm, rm --filter,
7448
+ delete), so a file still in another source keeps its extraction and
7449
+ re-adding it costs no re-extraction. Dropping a version (\`drop\`, or the
7450
+ sweep after \`promote\`) also deletes the extracted text of any extraction
7451
+ or image model no other version in the app uses.
7453
7452
  Re-vectorizing reuses stored extractions, so changing chunking never re-runs
7454
7453
  document extraction \u2014 only re-chunking and re-embedding.
7455
7454
 
@@ -7851,7 +7850,7 @@ function list12(ctx, params = {}) {
7851
7850
  `/_internal/v2/apps/${ctx.appId}/task-traces${qs(params)}`
7852
7851
  );
7853
7852
  }
7854
- function get9(ctx, traceId) {
7853
+ function get8(ctx, traceId) {
7855
7854
  return call(
7856
7855
  ctx,
7857
7856
  "GET",
@@ -7881,12 +7880,12 @@ async function list13(ctx, a) {
7881
7880
  })
7882
7881
  );
7883
7882
  }
7884
- async function get10(ctx, a) {
7885
- out(await get9(ctx, a.req("traceId")));
7883
+ async function get9(ctx, a) {
7884
+ out(await get8(ctx, a.req("traceId")));
7886
7885
  }
7887
7886
  var tasksHandlers = {
7888
7887
  "tasks list": list13,
7889
- "tasks get": get10
7888
+ "tasks get": get9
7890
7889
  };
7891
7890
  var tasksHelp = `remy-admin tasks \u2014 Log of the app's task agents (runTask), kept 90 days.
7892
7891
 
@@ -8932,7 +8931,7 @@ function list14(ctx, params = {}) {
8932
8931
  `/_internal/v2/apps/${ctx.appId}/outbound-email/messages${qs(params)}`
8933
8932
  );
8934
8933
  }
8935
- function get11(ctx, messageId) {
8934
+ function get10(ctx, messageId) {
8936
8935
  return call(
8937
8936
  ctx,
8938
8937
  "GET",
@@ -9138,7 +9137,7 @@ async function emailList(ctx, a) {
9138
9137
  );
9139
9138
  }
9140
9139
  async function emailGet(ctx, a) {
9141
- out(await get11(ctx, a.req("messageId")));
9140
+ out(await get10(ctx, a.req("messageId")));
9142
9141
  }
9143
9142
  async function emailStats(ctx, a) {
9144
9143
  out(await stats2(ctx, { start: a.str("start"), end: a.str("end") }));
@@ -9464,7 +9463,7 @@ function list16(ctx, params) {
9464
9463
  `${base7(ctx.appId)}${params?.includeDestroyed ? "?includeDestroyed=true" : ""}`
9465
9464
  );
9466
9465
  }
9467
- function get12(ctx, params) {
9466
+ function get11(ctx, params) {
9468
9467
  return call(
9469
9468
  ctx,
9470
9469
  "GET",
@@ -9534,7 +9533,7 @@ async function waitForPhase(ctx, params) {
9534
9533
  const wanted = new Set(params.phases);
9535
9534
  const arrived = (resource2) => wanted.has(resource2.phase) && (params.until?.(resource2) ?? true);
9536
9535
  const outcome = await pollUntil(
9537
- async () => (await get12(ctx, { id: params.id })).resource,
9536
+ async () => (await get11(ctx, { id: params.id })).resource,
9538
9537
  (resource2) => arrived(resource2) || resource2.phase === "failed",
9539
9538
  {
9540
9539
  timeoutMs,
@@ -9652,7 +9651,7 @@ async function infraList(ctx, a) {
9652
9651
  out(await list16(ctx, { includeDestroyed: a.bool("include-destroyed") }));
9653
9652
  }
9654
9653
  async function infraGet(ctx, a) {
9655
- out(await get12(ctx, { id: a.req("id") }));
9654
+ out(await get11(ctx, { id: a.req("id") }));
9656
9655
  }
9657
9656
  var FOLLOW_POLL_MS = 4e3;
9658
9657
  async function infraLogs(ctx, a) {
@@ -3,7 +3,6 @@
3
3
  *
4
4
  * Sources in the api (apps/api/src/):
5
5
  * GET /secrets → roles/http/routes/Apps/manage/secrets.ts
6
- * GET /secrets/:key → roles/http/routes/Apps/manage/secrets.ts
7
6
  * PUT /secrets/:key → roles/http/routes/Apps/manage/secrets.ts
8
7
  * DELETE /secrets/:key → roles/http/routes/Apps/manage/secrets.ts
9
8
  * AppSecretsDao → customerApps/AppSecrets/dao/AppSecretsDao.ts
@@ -27,15 +26,6 @@ export interface AppSecretRow {
27
26
  export interface SecretsListResult {
28
27
  secrets: AppSecretRow[];
29
28
  }
30
- /**
31
- * Response from GET /_internal/v2/apps/:appId/secrets/:key.
32
- * Returns KMS-decrypted values inline.
33
- */
34
- export interface SecretsGetResult {
35
- key: string;
36
- devValue: string | null;
37
- prodValue: string | null;
38
- }
39
29
  /**
40
30
  * Response from PUT /_internal/v2/apps/:appId/secrets/:key.
41
31
  * Route returns HTTP 200 with { ok: true } (not a 204).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madewithremy/admin",
3
- "version": "0.1.58",
3
+ "version": "0.1.60",
4
4
  "description": "Admin SDK + CLI for managing production Remy apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",