@madewithremy/admin 0.1.50 → 0.1.52

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
@@ -534,6 +534,12 @@ Usage:
534
534
  remy-admin requests get <requestId>
535
535
  remy-admin requests stats [--method <methodId>] [--start <ISO date>] [--end <ISO date>]
536
536
 
537
+ Notes:
538
+ With an app's logPayloads off ('remy-admin settings', or its workspace's),
539
+ the log has no inputs, outputs or stdout: 'get' shows them empty with
540
+ 'interfaceContext.payloadsOff' true, and the error, timing and outcome are
541
+ still there. Your dev box's own log, .logs/requests.ndjson, always has them.
542
+
537
543
  Examples:
538
544
  remy-admin requests list --limit 10
539
545
  remy-admin requests list --method mth_abc123 --status error
@@ -1017,7 +1023,7 @@ async function dashboardLive(ctx) {
1017
1023
  "GET",
1018
1024
  `/_internal/v2/apps/${ctx.appId}/dashboard`
1019
1025
  );
1020
- return dashboard.liveRelease;
1026
+ return dashboard.liveRelease ? { ...dashboard.liveRelease, primaryUrl: dashboard.primaryUrl } : null;
1021
1027
  }
1022
1028
  async function primaryUrl(ctx) {
1023
1029
  const dashboard = await call(
@@ -1035,7 +1041,8 @@ function summarizeRelease(release) {
1035
1041
  status: release.status,
1036
1042
  buildDurationMs: release.buildDurationMs ?? null,
1037
1043
  publishedAt: release.publishedAt ?? null,
1038
- ...release.previewUrl ? { previewUrl: release.previewUrl } : {}
1044
+ ...release.previewUrl ? { previewUrl: release.previewUrl } : {},
1045
+ ...release.primaryUrl ? { primaryUrl: release.primaryUrl } : {}
1039
1046
  };
1040
1047
  const readers = (release.dataSources ?? []).filter((d) => d.reader);
1041
1048
  if (readers.length > 0 && release.status === "live") {
@@ -1279,7 +1286,7 @@ var releasesHelp = `remy-admin releases \u2014 View and monitor releases.
1279
1286
  Subcommands:
1280
1287
  list List releases, newest first (--limit N, default 20, max 100)
1281
1288
  get Get full details of a specific release
1282
- current Get the currently live release
1289
+ current Get the currently live release, with the address it's served on
1283
1290
  status Check a release's status by id (optionally poll until complete)
1284
1291
  wait Wait for the release built from a commit to go live
1285
1292
 
@@ -1292,8 +1299,11 @@ Usage:
1292
1299
 
1293
1300
  'releases wait' is the "publish and wait until live" primitive. After a
1294
1301
  'git push', run it to block until the pushed commit's release is terminal.
1295
- A push to a non-default branch resolves to status 'preview' and the result
1296
- carries 'previewUrl' \u2014 the gated URL that build is reachable at.
1302
+ A push to the default branch that goes live carries 'primaryUrl', the
1303
+ address the app is served on (its custom domain, else its subdomain, else
1304
+ its id's own host), which 'releases current' also returns. A push to a
1305
+ non-default branch resolves to status 'preview' and the result carries
1306
+ 'previewUrl' \u2014 the gated URL that build is reachable at.
1297
1307
  --commit defaults to the workspace HEAD; abbreviated SHAs (7+ hex chars,
1298
1308
  e.g. from push output) are accepted. It prints one JSON object and sets
1299
1309
  the exit code so you can branch on $? without parsing:
@@ -2002,6 +2012,12 @@ Usage:
2002
2012
  remy-admin domains zone add acmebakery.com --type TXT --host @ --answer "google-site-verification=abc"
2003
2013
 
2004
2014
  Notes:
2015
+ - 'check' says why a subdomain isn't available: reason 'reserved' (the
2016
+ platform's own, never any app's: offer a different name), 'taken' (another
2017
+ app has it, freed only from that app) or 'invalid' (not 1 to 63 letters,
2018
+ digits and hyphens, or shaped like an app's ID). 'set' refuses the same
2019
+ names, with subdomain_not_allowed (reserved or invalid) or unavailable
2020
+ (taken), and says which.
2005
2021
  - 'add' with an apex (e.g. acme.com) auto-creates the www.apex pair and
2006
2022
  returns both. 'remove' on an apex also removes its paired www.
2007
2023
  - 'list'/'records'/'status' read a CF-synced cache that can be up to ~5
@@ -3173,7 +3189,7 @@ Notes:
3173
3189
  - '--app <appId>' targets another app in the same workspace. Every app there is reachable
3174
3190
  with this credential, so it is a targeting flag: the issue lands in THAT app's tracker,
3175
3191
  and 'originAppId' on the row records that this app filed it. Cross-reference it in prose
3176
- as 'app#42'.
3192
+ as 'app#42'. 'remy-admin apps list --search <name>' finds another app's id by its name.
3177
3193
  - 'list' shows what was filed IN an app; 'filed' shows what an app sent OUT to others \u2014
3178
3194
  the whole fan-out in one call instead of one call per app.
3179
3195
  - '--label' repeats ('--label a --label b') or takes a comma-separated list ('--label a,b').
@@ -3190,6 +3206,82 @@ Examples:
3190
3206
  remy-admin issues comment 42 "Fixed in the latest release."
3191
3207
  remy-admin issues close 42 --comment "Already fixed in v3 \u2014 no change needed."`;
3192
3208
 
3209
+ // src/ops/apps.ts
3210
+ var PAGE_SIZE = 500;
3211
+ async function list9(ctx, params = {}) {
3212
+ const words = (params.search ?? "").toLowerCase().split(/\s+/).filter(Boolean);
3213
+ const apps = [];
3214
+ let cursor;
3215
+ while (true) {
3216
+ const page = await call(
3217
+ ctx,
3218
+ "GET",
3219
+ `/_internal/v2/apps${qs({ status: params.status, limit: PAGE_SIZE, cursor })}`
3220
+ );
3221
+ for (const app of page.apps) {
3222
+ const text = `${app.name} ${app.customSubdomain ?? ""}`.toLowerCase();
3223
+ if (words.every((word) => text.includes(word))) {
3224
+ apps.push({
3225
+ appId: app.appId,
3226
+ name: app.name,
3227
+ subdomain: app.customSubdomain,
3228
+ isPublished: app.isPublished,
3229
+ lastDeployedAt: app.lastDeployedAt,
3230
+ createdBy: app.createdBy.name
3231
+ });
3232
+ }
3233
+ }
3234
+ if (!page.nextCursor) {
3235
+ return { apps };
3236
+ }
3237
+ cursor = page.nextCursor;
3238
+ }
3239
+ }
3240
+
3241
+ // src/commands/apps.ts
3242
+ var appsSpecs = {
3243
+ "apps list": {
3244
+ usage: "Usage: remy-admin apps list [--search <words>] [--status draft|published]",
3245
+ flags: {
3246
+ search: { type: "string" },
3247
+ status: { type: "string", choices: ["draft", "published"] }
3248
+ }
3249
+ }
3250
+ };
3251
+ async function appsList(ctx, a) {
3252
+ out(
3253
+ await list9(ctx, {
3254
+ search: a.str("search"),
3255
+ status: a.str("status")
3256
+ })
3257
+ );
3258
+ }
3259
+ var appsHandlers = {
3260
+ "apps list": appsList
3261
+ };
3262
+ var appsHelp = `remy-admin apps \u2014 The apps in this app's workspace.
3263
+
3264
+ Subcommands:
3265
+ list List the workspace's apps, last active first, with their ids
3266
+
3267
+ Usage:
3268
+ remy-admin apps list [--search <words>] [--status draft|published]
3269
+
3270
+ Notes:
3271
+ - Lists every published app in the workspace, and your own drafts (another
3272
+ member's draft isn't listed). This app is in it too.
3273
+ - Each app has appId, name, subdomain (null if it has none), isPublished,
3274
+ lastDeployedAt and createdBy. Its appId is what '--app' takes elsewhere,
3275
+ as in 'issues create --app <appId>'.
3276
+ - '--search' keeps the apps whose name or subdomain contains every word, in
3277
+ any case. When the user names an app, search for it rather than asking for
3278
+ its id; when more than one matches, ask which.
3279
+
3280
+ Examples:
3281
+ remy-admin apps list
3282
+ remy-admin apps list --search "marketing site"
3283
+ remy-admin apps list --status published`;
3284
+
3193
3285
  // src/ops/prerender.ts
3194
3286
  function pages(ctx, params = {}) {
3195
3287
  return call(
@@ -3802,7 +3894,7 @@ async function waitForCandidate(ctx, params) {
3802
3894
  const timeoutMs = params.timeoutMs ?? DEFAULT_WAIT_TIMEOUT_MS;
3803
3895
  const outcome = await pollUntil(
3804
3896
  async () => {
3805
- const { dataSources } = await list9(ctx);
3897
+ const { dataSources } = await list10(ctx);
3806
3898
  const source = dataSources.find((s) => s.slug === params.slug);
3807
3899
  if (!source) {
3808
3900
  throw new Error(`Data source "${params.slug}" not found.`);
@@ -3884,7 +3976,7 @@ async function allDocuments(ctx, params) {
3884
3976
  }
3885
3977
  return out2;
3886
3978
  }
3887
- function list9(ctx) {
3979
+ function list10(ctx) {
3888
3980
  return call(ctx, "GET", base(ctx.appId));
3889
3981
  }
3890
3982
  function search2(ctx, params) {
@@ -4003,7 +4095,7 @@ async function waitForMove(ctx, params) {
4003
4095
  const timeoutMs = params.timeoutMs ?? DEFAULT_WAIT_TIMEOUT_MS;
4004
4096
  const outcome = await pollUntil(
4005
4097
  async () => {
4006
- const { dataSources } = await list9(ctx);
4098
+ const { dataSources } = await list10(ctx);
4007
4099
  const source2 = dataSources.find((s) => s.slug === params.slug);
4008
4100
  if (!source2) {
4009
4101
  throw new Error(`Data source "${params.slug}" not found.`);
@@ -4204,7 +4296,7 @@ async function uploadManifest(ctx, params) {
4204
4296
  await uploadDirect(token.upload, params.content, "manifest.jsonl");
4205
4297
  return { key: token.key };
4206
4298
  }
4207
- function list10(ctx, params) {
4299
+ function list11(ctx, params) {
4208
4300
  return call(
4209
4301
  ctx,
4210
4302
  "GET",
@@ -4643,7 +4735,7 @@ async function waitForHydration(ctx, params) {
4643
4735
  const timeoutMs = params.timeoutMs ?? DEFAULT_WAIT_TIMEOUT_MS3;
4644
4736
  const outcome = await pollUntil(
4645
4737
  async () => {
4646
- const { dataSources } = await list9(ctx);
4738
+ const { dataSources } = await list10(ctx);
4647
4739
  const source2 = dataSources.find((s) => s.slug === params.slug);
4648
4740
  if (!source2) {
4649
4741
  throw new Error(`Data source "${params.slug}" not found.`);
@@ -5620,7 +5712,7 @@ async function jobsStart(ctx, a) {
5620
5712
  }
5621
5713
  async function jobsList(ctx, a) {
5622
5714
  const slug = a.str("source");
5623
- out(await list10(ctx, slug ? { slug } : void 0));
5715
+ out(await list11(ctx, slug ? { slug } : void 0));
5624
5716
  }
5625
5717
  async function jobsStatus(ctx, a) {
5626
5718
  const id = a.req("id");
@@ -6637,7 +6729,7 @@ async function dataSourcesAdd(ctx, a) {
6637
6729
  });
6638
6730
  }
6639
6731
  async function dataSourcesList(ctx) {
6640
- out(await list9(ctx));
6732
+ out(await list10(ctx));
6641
6733
  }
6642
6734
  async function dataSourcesStatus(ctx, a) {
6643
6735
  const slug = sourceOf(a);
@@ -6656,7 +6748,7 @@ async function dataSourcesStatus(ctx, a) {
6656
6748
  });
6657
6749
  return;
6658
6750
  }
6659
- const { dataSources: sources2 } = await list9(ctx);
6751
+ const { dataSources: sources2 } = await list10(ctx);
6660
6752
  const source = sources2.find((s) => s.slug === slug);
6661
6753
  if (!source) {
6662
6754
  out({ dataSource: slug, exists: false });
@@ -7630,7 +7722,7 @@ Notes:
7630
7722
  and error. Client tools run in the browser, so they have no requestId.`;
7631
7723
 
7632
7724
  // src/ops/tasks.ts
7633
- function list11(ctx, params = {}) {
7725
+ function list12(ctx, params = {}) {
7634
7726
  return call(
7635
7727
  ctx,
7636
7728
  "GET",
@@ -7659,9 +7751,9 @@ var tasksSpecs = {
7659
7751
  positionals: [{ name: "traceId", required: true }]
7660
7752
  }
7661
7753
  };
7662
- async function list12(ctx, a) {
7754
+ async function list13(ctx, a) {
7663
7755
  out(
7664
- await list11(ctx, {
7756
+ await list12(ctx, {
7665
7757
  limit: a.num("limit"),
7666
7758
  cursor: a.str("cursor")
7667
7759
  })
@@ -7671,7 +7763,7 @@ async function get10(ctx, a) {
7671
7763
  out(await get9(ctx, a.req("traceId")));
7672
7764
  }
7673
7765
  var tasksHandlers = {
7674
- "tasks list": list12,
7766
+ "tasks list": list13,
7675
7767
  "tasks get": get10
7676
7768
  };
7677
7769
  var tasksHelp = `remy-admin tasks \u2014 Log of the app's task agents (runTask), kept 90 days.
@@ -7705,6 +7797,10 @@ Notes:
7705
7797
  'remy-admin requests get <requestId>' for that call's input, output, stdout
7706
7798
  and error.
7707
7799
 
7800
+ With an app's logPayloads off ('remy-admin settings'), it logs no transcripts:
7801
+ its turns are listed in 'notKeptTurns' and the transcript is empty, while
7802
+ spend, outcome and each turn's tool counts and errors are still there.
7803
+
7708
7804
  Examples:
7709
7805
  remy-admin tasks list --limit 10
7710
7806
  remy-admin tasks get 0b9e\u2026`;
@@ -8323,7 +8419,7 @@ var SETTABLE_KEYS = [
8323
8419
  "blockDisposableEmails",
8324
8420
  "signupAllowlistEnabled",
8325
8421
  "testAccountsEnabled",
8326
- "telemetryCaptureResponseBodies",
8422
+ "logPayloads",
8327
8423
  "analyticsExtraQueryParams"
8328
8424
  ];
8329
8425
  var settingsSpecs = {
@@ -8594,9 +8690,12 @@ Settable keys (settings set):
8594
8690
  'allowlist enable'.
8595
8691
  testAccountsEnabled Activate fixed-code test accounts. Default: false.
8596
8692
  Prefer 'test-accounts enable'.
8597
- telemetryCaptureResponseBodies Include failed-request response bodies (~1KB) in
8598
- frontend error reports. Default: true; turn off if API
8599
- responses may carry PII or tokens.
8693
+ logPayloads Payload logging: method inputs, outputs and console output
8694
+ in the request log, task traces' transcripts, inbound email
8695
+ content, and failed responses (~1KB) in frontend error
8696
+ reports. Default: true. Off logs metadata only (timing,
8697
+ status, errors). The workspace can turn it off for every
8698
+ app ('settings get' shows workspaceLogging.payloads).
8600
8699
  analyticsExtraQueryParams JSON array of query-param names to preserve in
8601
8700
  analytics URLs beyond the UTM/ad-click defaults.
8602
8701
 
@@ -8650,7 +8749,7 @@ async function resolveDomainId(ctx, direction, domain) {
8650
8749
  }
8651
8750
  return match.id;
8652
8751
  }
8653
- function list13(ctx, params = {}) {
8752
+ function list14(ctx, params = {}) {
8654
8753
  return call(
8655
8754
  ctx,
8656
8755
  "GET",
@@ -8849,7 +8948,7 @@ var emailSpecs = {
8849
8948
  };
8850
8949
  async function emailList(ctx, a) {
8851
8950
  out(
8852
- await list13(ctx, {
8951
+ await list14(ctx, {
8853
8952
  status: a.str("status"),
8854
8953
  kind: a.str("kind"),
8855
8954
  recipient: a.str("recipient"),
@@ -9020,7 +9119,12 @@ Custom domains \u2014 two independent directions:
9020
9119
  bounces.<domain>) \u2014 hand these to the user to create at
9021
9120
  their DNS host, then 'verify <domain>' to re-check now.
9022
9121
  'list' also returns effectiveSender: what the app currently
9023
- sends as, and which tier that address comes from.
9122
+ sends as, which tier that address comes from, and
9123
+ anyRecipient. anyRecipient false is the shared platform
9124
+ address, which only mails the app's verified users and its
9125
+ workspace's members, in dev and live alike (anyone else is
9126
+ refused with unverified_recipients). A subdomain
9127
+ ('domains set') or a verified sending domain lifts it.
9024
9128
  'inbound-domains' receive mail at the user's own domain via one MX record
9025
9129
  ('check' returns it up front \u2014 no registration needed to
9026
9130
  see it). Apps already receive at *@<slug>.madewithremy.com
@@ -9047,7 +9151,7 @@ Examples:
9047
9151
  `;
9048
9152
 
9049
9153
  // src/ops/cron.ts
9050
- function list14(ctx, params = {}) {
9154
+ function list15(ctx, params = {}) {
9051
9155
  return call(
9052
9156
  ctx,
9053
9157
  "GET",
@@ -9076,7 +9180,7 @@ var cronSpecs = {
9076
9180
  }
9077
9181
  };
9078
9182
  async function cronList(ctx, a) {
9079
- out(await list14(ctx, { runs: a.num("runs") }));
9183
+ out(await list15(ctx, { runs: a.num("runs") }));
9080
9184
  }
9081
9185
  async function cronRun(ctx, a) {
9082
9186
  out(await run2(ctx, a.req("route")));
@@ -9177,7 +9281,7 @@ var POLL_MS5 = 3e3;
9177
9281
  function base7(appId) {
9178
9282
  return `/_internal/v2/apps/${appId}/infra`;
9179
9283
  }
9180
- function list15(ctx, params) {
9284
+ function list16(ctx, params) {
9181
9285
  return call(
9182
9286
  ctx,
9183
9287
  "GET",
@@ -9369,7 +9473,7 @@ async function waitAndReport2(ctx, a, id, phases, summary2, until) {
9369
9473
  }
9370
9474
  }
9371
9475
  async function infraList(ctx, a) {
9372
- out(await list15(ctx, { includeDestroyed: a.bool("include-destroyed") }));
9476
+ out(await list16(ctx, { includeDestroyed: a.bool("include-destroyed") }));
9373
9477
  }
9374
9478
  async function infraGet(ctx, a) {
9375
9479
  out(await get12(ctx, { id: a.req("id") }));
@@ -9861,6 +9965,7 @@ var SPECS = {
9861
9965
  ...methodsSpecs,
9862
9966
  ...dataSpecs,
9863
9967
  ...issuesSpecs,
9968
+ ...appsSpecs,
9864
9969
  ...prerenderSpecs,
9865
9970
  ...filesSpecs,
9866
9971
  ...dataSourcesSpecs,
@@ -9896,6 +10001,7 @@ var HANDLERS = {
9896
10001
  ...methodsHandlers,
9897
10002
  ...dataHandlers,
9898
10003
  ...issuesHandlers,
10004
+ ...appsHandlers,
9899
10005
  ...prerenderHandlers,
9900
10006
  ...filesHandlers,
9901
10007
  ...dataSourcesHandlers,
@@ -9931,6 +10037,7 @@ var GROUP_HELP = {
9931
10037
  methods: methodsHelp,
9932
10038
  data: dataHelp,
9933
10039
  issues: issuesHelp,
10040
+ apps: appsHelp,
9934
10041
  prerender: prerenderHelp,
9935
10042
  files: filesHelp,
9936
10043
  datasources: dataSourcesHelp,
@@ -10017,6 +10124,7 @@ Commands:
10017
10124
  methods List and invoke methods
10018
10125
  data Sync databases between dev and live (lift-from-dev / lift-from-live)
10019
10126
  issues File and manage issues, in this app or another app in the workspace
10127
+ apps The workspace's apps by name, with the ids '--app' takes
10020
10128
  prerender Manage + verify prerendered snapshots served to bots/crawlers
10021
10129
  files Store, retrieve, share (signed links) + manage files in the app's stores
10022
10130
  datasources Build and query searchable document corpora (RAG)
@@ -10054,6 +10162,7 @@ var GROUPS = [
10054
10162
  "methods",
10055
10163
  "data",
10056
10164
  "issues",
10165
+ "apps",
10057
10166
  "prerender",
10058
10167
  "files",
10059
10168
  "datasources",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madewithremy/admin",
3
- "version": "0.1.50",
3
+ "version": "0.1.52",
4
4
  "description": "Admin SDK + CLI for managing production Remy apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",