@madewithremy/admin 0.1.2 → 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 +141 -1
- package/dist/index.js +32 -10
- package/dist/index.js.map +1 -1
- package/dist/prod.js +93 -4
- 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";
|
|
@@ -3781,6 +3788,83 @@ Notes:
|
|
|
3781
3788
|
Transcripts ('sessions get') are the primary way to debug and iterate on a
|
|
3782
3789
|
voice persona.`;
|
|
3783
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
|
+
|
|
3784
3868
|
// src/ops/jewels.ts
|
|
3785
3869
|
var JEWEL_RUN_TIMEOUT_MS = 6e5;
|
|
3786
3870
|
function overview(ctx, params = {}) {
|
|
@@ -5063,6 +5147,7 @@ var SPECS = {
|
|
|
5063
5147
|
...filesSpecs,
|
|
5064
5148
|
...dataSourcesSpecs,
|
|
5065
5149
|
...voiceSpecs,
|
|
5150
|
+
...agentSpecs,
|
|
5066
5151
|
...jewelsSpecs,
|
|
5067
5152
|
...settingsSpecs,
|
|
5068
5153
|
...emailSpecs,
|
|
@@ -5085,6 +5170,7 @@ var HANDLERS = {
|
|
|
5085
5170
|
...filesHandlers,
|
|
5086
5171
|
...dataSourcesHandlers,
|
|
5087
5172
|
...voiceHandlers,
|
|
5173
|
+
...agentHandlers,
|
|
5088
5174
|
...jewelsHandlers,
|
|
5089
5175
|
...settingsHandlers,
|
|
5090
5176
|
...emailHandlers,
|
|
@@ -5107,6 +5193,7 @@ var GROUP_HELP = {
|
|
|
5107
5193
|
files: filesHelp,
|
|
5108
5194
|
datasources: dataSourcesHelp,
|
|
5109
5195
|
voice: voiceHelp,
|
|
5196
|
+
agent: agentHelp,
|
|
5110
5197
|
jewels: jewelsHelp,
|
|
5111
5198
|
settings: settingsHelp,
|
|
5112
5199
|
email: emailHelp,
|
|
@@ -5186,6 +5273,7 @@ Commands:
|
|
|
5186
5273
|
files Store, retrieve, share (signed links) + manage files in the app's stores
|
|
5187
5274
|
datasources Build and query searchable document corpora (RAG)
|
|
5188
5275
|
voice Phone numbers, voice call log + transcripts, voice policy settings
|
|
5276
|
+
agent Agent (chat) conversation log + transcripts
|
|
5189
5277
|
jewels Monitor jewel shadowing; review + approve the proposal queue
|
|
5190
5278
|
settings App settings \u2014 signup allowlist, test accounts, embed origins, toggles
|
|
5191
5279
|
email Email \u2014 delivery log, blast stats, unsubscribes, inbox, custom domains
|
|
@@ -5216,6 +5304,7 @@ var GROUPS = [
|
|
|
5216
5304
|
"files",
|
|
5217
5305
|
"datasources",
|
|
5218
5306
|
"voice",
|
|
5307
|
+
"agent",
|
|
5219
5308
|
"jewels",
|
|
5220
5309
|
"settings",
|
|
5221
5310
|
"email",
|