@madewithremy/admin 0.1.1 → 0.1.3
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 +142 -1
- package/dist/index.js +32 -10
- package/dist/index.js.map +1 -1
- package/dist/prod.js +104 -6
- package/package.json +1 -1
package/dist/prod.js
CHANGED
|
@@ -2381,8 +2381,9 @@ var prerenderSpecs = {
|
|
|
2381
2381
|
}
|
|
2382
2382
|
},
|
|
2383
2383
|
"prerender get": {
|
|
2384
|
-
usage: "Usage: remy-admin prerender get <path>",
|
|
2385
|
-
positionals: [{ name: "path", required: true }]
|
|
2384
|
+
usage: "Usage: remy-admin prerender get <path> [--host <hostname>]",
|
|
2385
|
+
positionals: [{ name: "path", required: true }],
|
|
2386
|
+
flags: { host: { type: "string" } }
|
|
2386
2387
|
},
|
|
2387
2388
|
"prerender pages": {
|
|
2388
2389
|
usage: "Usage: remy-admin prerender pages [--cursor <c>]",
|
|
@@ -2404,7 +2405,7 @@ async function prerenderGet(ctx, a) {
|
|
|
2404
2405
|
const rawPath = a.req("path");
|
|
2405
2406
|
const normalized = rawPath.startsWith("/") ? rawPath : `/${rawPath}`;
|
|
2406
2407
|
const isDev = !ctx.baseUrl.includes("api.mindstudio.ai");
|
|
2407
|
-
const host = `${ctx.appId}${isDev ? "-dev" : ""}.madewithremy.com`;
|
|
2408
|
+
const host = a.str("host")?.replace(/^https?:\/\//, "").replace(/\/+$/, "") || `${ctx.appId}${isDev ? "-dev" : ""}.madewithremy.com`;
|
|
2408
2409
|
const url = `https://${host}${normalized}`;
|
|
2409
2410
|
const res = await fetchWithTimeout(
|
|
2410
2411
|
url,
|
|
@@ -2448,6 +2449,7 @@ Usage:
|
|
|
2448
2449
|
remy-admin prerender invalidate <path...> Purge specific paths
|
|
2449
2450
|
remy-admin prerender invalidate --all Purge every snapshot for the app
|
|
2450
2451
|
remy-admin prerender get <path> Print { url, status, html } as a crawler sees it
|
|
2452
|
+
remy-admin prerender get <path> --host <h> Same, against a specific hostname
|
|
2451
2453
|
|
|
2452
2454
|
Notes:
|
|
2453
2455
|
- 'pages'/'view' read what's stored for the LIVE release; 'get' exercises the real
|
|
@@ -2455,12 +2457,17 @@ Notes:
|
|
|
2455
2457
|
returns the live SPA and triggers a render \u2014 re-run to see it.
|
|
2456
2458
|
- 'view' errors with snapshot_not_found when the path has no snapshot yet.
|
|
2457
2459
|
- Invalidation targets the current LIVE release; a deploy already invalidates on its own.
|
|
2460
|
+
- Mounted pages: when another app mounts this one, 'pages' lists paths carrying that
|
|
2461
|
+
app's mount prefix, and those pages exist only on that app's host \u2014 pass --host to
|
|
2462
|
+
verify them with 'get'. 'invalidate' takes this app's OWN paths and purges the
|
|
2463
|
+
mounted copies with them.
|
|
2458
2464
|
|
|
2459
2465
|
Examples:
|
|
2460
2466
|
remy-admin prerender pages
|
|
2461
2467
|
remy-admin prerender view /u/abc123
|
|
2462
2468
|
remy-admin prerender invalidate --all
|
|
2463
|
-
remy-admin prerender get /u/abc123
|
|
2469
|
+
remy-admin prerender get /u/abc123
|
|
2470
|
+
remy-admin prerender get /demos/vector-search/blog/x --host example.com`;
|
|
2464
2471
|
|
|
2465
2472
|
// src/commands/files.ts
|
|
2466
2473
|
import fs2 from "fs";
|
|
@@ -2988,6 +2995,7 @@ var CONFIG_FLAGS = {
|
|
|
2988
2995
|
"min-chars": { type: "number", min: 0 },
|
|
2989
2996
|
"drop-blocks": { type: "string" },
|
|
2990
2997
|
contextual: { type: "string" },
|
|
2998
|
+
"contextual-model": { type: "string" },
|
|
2991
2999
|
"describe-images": { type: "string" },
|
|
2992
3000
|
"embedding-model": { type: "string" },
|
|
2993
3001
|
"image-model": { type: "string" },
|
|
@@ -3253,7 +3261,10 @@ function configFromFlags(a) {
|
|
|
3253
3261
|
if (dropBlocks !== void 0) {
|
|
3254
3262
|
chunking.dropBlockTypes = dropBlocks.split(",").map((s) => s.trim()).filter(Boolean);
|
|
3255
3263
|
}
|
|
3256
|
-
const contextual =
|
|
3264
|
+
const contextual = {
|
|
3265
|
+
...triState(a, "contextual", "enabled"),
|
|
3266
|
+
...a.str("contextual-model") ? { modelId: a.str("contextual-model") } : {}
|
|
3267
|
+
};
|
|
3257
3268
|
const images = {
|
|
3258
3269
|
...triState(a, "describe-images", "describe"),
|
|
3259
3270
|
...a.str("image-model") ? { modelId: a.str("image-model") } : {}
|
|
@@ -3426,7 +3437,10 @@ Search options:
|
|
|
3426
3437
|
coerce: true/false and numbers become typed.
|
|
3427
3438
|
Pass a JSON object for the full grammar:
|
|
3428
3439
|
metadata, filename, documentIds, pages, contains,
|
|
3429
|
-
phrase \u2014 e.g. --filter '{"pages":{"max":3}}'
|
|
3440
|
+
phrase \u2014 e.g. --filter '{"pages":{"max":3}}'.
|
|
3441
|
+
Metadata takes numeric ranges via {gte,lte}: store
|
|
3442
|
+
dates as integers (YYYYMMDD or epoch seconds), then
|
|
3443
|
+
--filter '{"metadata":{"date":{"gte":20250101}}}'
|
|
3430
3444
|
--phrase <text> Chunk must contain this exact word sequence
|
|
3431
3445
|
--contains <words> Chunk must contain ALL these words, any order
|
|
3432
3446
|
--max-per-document <n> Cap hits per document; backfills from others
|
|
@@ -3456,6 +3470,8 @@ Tuning a corpus:
|
|
|
3456
3470
|
--contextual <true|false> LLM context blurb per chunk. Improves retrieval
|
|
3457
3471
|
on long documents; costs a model call per chunk
|
|
3458
3472
|
at ingest. Off by default \u2014 measure on your data.
|
|
3473
|
+
--contextual-model <id> Which chat model writes the blurbs. Optional:
|
|
3474
|
+
enabling without it uses the platform default.
|
|
3459
3475
|
--describe-images <true|false> Vision pass over images inside documents,
|
|
3460
3476
|
substituting a description into the searchable
|
|
3461
3477
|
text. ON by default: a document with no images
|
|
@@ -3772,6 +3788,83 @@ Notes:
|
|
|
3772
3788
|
Transcripts ('sessions get') are the primary way to debug and iterate on a
|
|
3773
3789
|
voice persona.`;
|
|
3774
3790
|
|
|
3791
|
+
// src/ops/agent.ts
|
|
3792
|
+
function threadsList(ctx, params = {}) {
|
|
3793
|
+
return call(
|
|
3794
|
+
ctx,
|
|
3795
|
+
"GET",
|
|
3796
|
+
`/_internal/v2/apps/${ctx.appId}/agent-threads${qs(params)}`
|
|
3797
|
+
);
|
|
3798
|
+
}
|
|
3799
|
+
function threadsGet(ctx, threadId) {
|
|
3800
|
+
return call(
|
|
3801
|
+
ctx,
|
|
3802
|
+
"GET",
|
|
3803
|
+
`/_internal/v2/apps/${ctx.appId}/agent-threads/${seg(threadId)}`
|
|
3804
|
+
);
|
|
3805
|
+
}
|
|
3806
|
+
|
|
3807
|
+
// src/commands/agent.ts
|
|
3808
|
+
var agentSpecs = {
|
|
3809
|
+
"agent threads list": {
|
|
3810
|
+
usage: "Usage: remy-admin agent threads list [--limit 20] [--cursor <nextCursor>]",
|
|
3811
|
+
flags: {
|
|
3812
|
+
limit: { type: "number", min: 1, max: 100 },
|
|
3813
|
+
cursor: { type: "string" }
|
|
3814
|
+
}
|
|
3815
|
+
},
|
|
3816
|
+
"agent threads get": {
|
|
3817
|
+
usage: "Usage: remy-admin agent threads get <threadId>",
|
|
3818
|
+
positionals: [{ name: "threadId", required: true }]
|
|
3819
|
+
}
|
|
3820
|
+
};
|
|
3821
|
+
async function threadsList2(ctx, a) {
|
|
3822
|
+
out(
|
|
3823
|
+
await threadsList(ctx, {
|
|
3824
|
+
limit: a.num("limit"),
|
|
3825
|
+
cursor: a.str("cursor")
|
|
3826
|
+
})
|
|
3827
|
+
);
|
|
3828
|
+
}
|
|
3829
|
+
async function threadsGet2(ctx, a) {
|
|
3830
|
+
out(await threadsGet(ctx, a.req("threadId")));
|
|
3831
|
+
}
|
|
3832
|
+
var agentHandlers = {
|
|
3833
|
+
"agent threads list": threadsList2,
|
|
3834
|
+
"agent threads get": threadsGet2
|
|
3835
|
+
};
|
|
3836
|
+
var agentHelp = `remy-admin agent \u2014 Conversation log for the app's agent (chat) interface.
|
|
3837
|
+
|
|
3838
|
+
Subcommands:
|
|
3839
|
+
threads list Every conversation, newest activity first (transcripts excluded)
|
|
3840
|
+
threads get One conversation with its full transcript
|
|
3841
|
+
|
|
3842
|
+
Usage:
|
|
3843
|
+
remy-admin agent threads list [--limit 20] [--cursor <nextCursor>]
|
|
3844
|
+
remy-admin agent threads get <threadId>
|
|
3845
|
+
|
|
3846
|
+
Examples:
|
|
3847
|
+
remy-admin agent threads list --limit 10
|
|
3848
|
+
remy-admin agent threads get 4f6c\u2026
|
|
3849
|
+
|
|
3850
|
+
Notes:
|
|
3851
|
+
Transcripts are how you iterate on an agent: after the user tests it, read
|
|
3852
|
+
'threads get' for what was actually said and which tools ran with which
|
|
3853
|
+
arguments, then fix the system prompt and tool descriptions from that evidence
|
|
3854
|
+
rather than from guesses.
|
|
3855
|
+
|
|
3856
|
+
In the list, 'toolErrorCount' and 'hasTurnError' point at the conversations
|
|
3857
|
+
worth opening \u2014 a failed tool call, or a turn that broke (model error, rate
|
|
3858
|
+
limit, credits) instead of replying. 'devSession' is true for your own test
|
|
3859
|
+
conversations through the dev tunnel, so you can tell them from real traffic.
|
|
3860
|
+
|
|
3861
|
+
In a transcript, each message is the stored conversation's own shape: 'user'
|
|
3862
|
+
for a person's message and also for a tool result (which carries
|
|
3863
|
+
'toolCallId'), 'assistant' for the agent (carrying 'toolCalls' when it asked
|
|
3864
|
+
for tools). A method tool call also carries a 'requestId' \u2014 pass it to
|
|
3865
|
+
'remy-admin requests get <requestId>' for that call's input, output, stdout
|
|
3866
|
+
and error. Client tools run in the browser, so they have no requestId.`;
|
|
3867
|
+
|
|
3775
3868
|
// src/ops/jewels.ts
|
|
3776
3869
|
var JEWEL_RUN_TIMEOUT_MS = 6e5;
|
|
3777
3870
|
function overview(ctx, params = {}) {
|
|
@@ -5054,6 +5147,7 @@ var SPECS = {
|
|
|
5054
5147
|
...filesSpecs,
|
|
5055
5148
|
...dataSourcesSpecs,
|
|
5056
5149
|
...voiceSpecs,
|
|
5150
|
+
...agentSpecs,
|
|
5057
5151
|
...jewelsSpecs,
|
|
5058
5152
|
...settingsSpecs,
|
|
5059
5153
|
...emailSpecs,
|
|
@@ -5076,6 +5170,7 @@ var HANDLERS = {
|
|
|
5076
5170
|
...filesHandlers,
|
|
5077
5171
|
...dataSourcesHandlers,
|
|
5078
5172
|
...voiceHandlers,
|
|
5173
|
+
...agentHandlers,
|
|
5079
5174
|
...jewelsHandlers,
|
|
5080
5175
|
...settingsHandlers,
|
|
5081
5176
|
...emailHandlers,
|
|
@@ -5098,6 +5193,7 @@ var GROUP_HELP = {
|
|
|
5098
5193
|
files: filesHelp,
|
|
5099
5194
|
datasources: dataSourcesHelp,
|
|
5100
5195
|
voice: voiceHelp,
|
|
5196
|
+
agent: agentHelp,
|
|
5101
5197
|
jewels: jewelsHelp,
|
|
5102
5198
|
settings: settingsHelp,
|
|
5103
5199
|
email: emailHelp,
|
|
@@ -5177,6 +5273,7 @@ Commands:
|
|
|
5177
5273
|
files Store, retrieve, share (signed links) + manage files in the app's stores
|
|
5178
5274
|
datasources Build and query searchable document corpora (RAG)
|
|
5179
5275
|
voice Phone numbers, voice call log + transcripts, voice policy settings
|
|
5276
|
+
agent Agent (chat) conversation log + transcripts
|
|
5180
5277
|
jewels Monitor jewel shadowing; review + approve the proposal queue
|
|
5181
5278
|
settings App settings \u2014 signup allowlist, test accounts, embed origins, toggles
|
|
5182
5279
|
email Email \u2014 delivery log, blast stats, unsubscribes, inbox, custom domains
|
|
@@ -5207,6 +5304,7 @@ var GROUPS = [
|
|
|
5207
5304
|
"files",
|
|
5208
5305
|
"datasources",
|
|
5209
5306
|
"voice",
|
|
5307
|
+
"agent",
|
|
5210
5308
|
"jewels",
|
|
5211
5309
|
"settings",
|
|
5212
5310
|
"email",
|