@madewithremy/admin 0.1.28 → 0.1.30
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/README.md +1 -1
- package/dist/index.d.ts +209 -35
- package/dist/index.js +73 -51
- package/dist/index.js.map +1 -1
- package/dist/prod.js +105 -18
- package/package.json +2 -2
package/dist/prod.js
CHANGED
|
@@ -6455,6 +6455,86 @@ Notes:
|
|
|
6455
6455
|
'remy-admin requests get <requestId>' for that call's input, output, stdout
|
|
6456
6456
|
and error. Client tools run in the browser, so they have no requestId.`;
|
|
6457
6457
|
|
|
6458
|
+
// src/ops/tasks.ts
|
|
6459
|
+
function list10(ctx, params = {}) {
|
|
6460
|
+
return call(
|
|
6461
|
+
ctx,
|
|
6462
|
+
"GET",
|
|
6463
|
+
`/_internal/v2/apps/${ctx.appId}/task-traces${qs(params)}`
|
|
6464
|
+
);
|
|
6465
|
+
}
|
|
6466
|
+
function get9(ctx, traceId) {
|
|
6467
|
+
return call(
|
|
6468
|
+
ctx,
|
|
6469
|
+
"GET",
|
|
6470
|
+
`/_internal/v2/apps/${ctx.appId}/task-traces/${seg(traceId)}`
|
|
6471
|
+
);
|
|
6472
|
+
}
|
|
6473
|
+
|
|
6474
|
+
// src/commands/tasks.ts
|
|
6475
|
+
var tasksSpecs = {
|
|
6476
|
+
"tasks list": {
|
|
6477
|
+
usage: "Usage: remy-admin tasks list [--limit 20] [--cursor <nextCursor>]",
|
|
6478
|
+
flags: {
|
|
6479
|
+
limit: { type: "number", min: 1, max: 100 },
|
|
6480
|
+
cursor: { type: "string" }
|
|
6481
|
+
}
|
|
6482
|
+
},
|
|
6483
|
+
"tasks get": {
|
|
6484
|
+
usage: "Usage: remy-admin tasks get <traceId>",
|
|
6485
|
+
positionals: [{ name: "traceId", required: true }]
|
|
6486
|
+
}
|
|
6487
|
+
};
|
|
6488
|
+
async function list11(ctx, a) {
|
|
6489
|
+
out(
|
|
6490
|
+
await list10(ctx, {
|
|
6491
|
+
limit: a.num("limit"),
|
|
6492
|
+
cursor: a.str("cursor")
|
|
6493
|
+
})
|
|
6494
|
+
);
|
|
6495
|
+
}
|
|
6496
|
+
async function get10(ctx, a) {
|
|
6497
|
+
out(await get9(ctx, a.req("traceId")));
|
|
6498
|
+
}
|
|
6499
|
+
var tasksHandlers = {
|
|
6500
|
+
"tasks list": list11,
|
|
6501
|
+
"tasks get": get10
|
|
6502
|
+
};
|
|
6503
|
+
var tasksHelp = `remy-admin tasks \u2014 Log of the app's task agents (runTask), kept 90 days.
|
|
6504
|
+
|
|
6505
|
+
Subcommands:
|
|
6506
|
+
list Every task run, newest started first (transcripts excluded)
|
|
6507
|
+
get One run with its full transcript
|
|
6508
|
+
|
|
6509
|
+
Usage:
|
|
6510
|
+
remy-admin tasks list [--limit 20] [--cursor <nextCursor>]
|
|
6511
|
+
remy-admin tasks get <traceId>
|
|
6512
|
+
|
|
6513
|
+
Notes:
|
|
6514
|
+
Transcripts are how you iterate on a task agent: after a run, read 'get' for
|
|
6515
|
+
what the model was given, what it decided each turn, and which tools ran with
|
|
6516
|
+
which arguments, then fix the prompt and tool descriptions from that
|
|
6517
|
+
evidence rather than from guesses. The id is 'result.traceId' from runTask(),
|
|
6518
|
+
and the list's 'traceId'. An unknown id is 'task_trace_not_found' (404).
|
|
6519
|
+
|
|
6520
|
+
In the list, 'outcome' says how the run ended: 'answered' (the last turn
|
|
6521
|
+
replied), 'in_progress', 'stopped' (it asked for tools and nothing followed),
|
|
6522
|
+
or 'error' (a model call failed). 'toolErrorCount' and 'hasTurnError' point at
|
|
6523
|
+
the runs worth opening, 'requestId' is the method execution that started the
|
|
6524
|
+
task, and 'devSession' is true for your own runs through the dev tunnel.
|
|
6525
|
+
'billingCost' is in nanodollars.
|
|
6526
|
+
|
|
6527
|
+
In a transcript, the first message is the task's input; 'assistant' messages
|
|
6528
|
+
are the model's turns (with 'turn', 'stopReason' and any 'thinking');
|
|
6529
|
+
'user' messages carrying 'toolCallId' are tool results. A method tool's
|
|
6530
|
+
result also carries a 'requestId' \u2014 pass it to
|
|
6531
|
+
'remy-admin requests get <requestId>' for that call's input, output, stdout
|
|
6532
|
+
and error.
|
|
6533
|
+
|
|
6534
|
+
Examples:
|
|
6535
|
+
remy-admin tasks list --limit 10
|
|
6536
|
+
remy-admin tasks get 0b9e\u2026`;
|
|
6537
|
+
|
|
6458
6538
|
// src/ops/events.ts
|
|
6459
6539
|
function channelsList(ctx, params = {}) {
|
|
6460
6540
|
return call(
|
|
@@ -7396,14 +7476,14 @@ async function resolveDomainId(ctx, direction, domain) {
|
|
|
7396
7476
|
}
|
|
7397
7477
|
return match.id;
|
|
7398
7478
|
}
|
|
7399
|
-
function
|
|
7479
|
+
function list12(ctx, params = {}) {
|
|
7400
7480
|
return call(
|
|
7401
7481
|
ctx,
|
|
7402
7482
|
"GET",
|
|
7403
7483
|
`/_internal/v2/apps/${ctx.appId}/outbound-email/messages${qs(params)}`
|
|
7404
7484
|
);
|
|
7405
7485
|
}
|
|
7406
|
-
function
|
|
7486
|
+
function get11(ctx, messageId) {
|
|
7407
7487
|
return call(
|
|
7408
7488
|
ctx,
|
|
7409
7489
|
"GET",
|
|
@@ -7595,7 +7675,7 @@ var emailSpecs = {
|
|
|
7595
7675
|
};
|
|
7596
7676
|
async function emailList(ctx, a) {
|
|
7597
7677
|
out(
|
|
7598
|
-
await
|
|
7678
|
+
await list12(ctx, {
|
|
7599
7679
|
status: a.str("status"),
|
|
7600
7680
|
kind: a.str("kind"),
|
|
7601
7681
|
recipient: a.str("recipient"),
|
|
@@ -7609,7 +7689,7 @@ async function emailList(ctx, a) {
|
|
|
7609
7689
|
);
|
|
7610
7690
|
}
|
|
7611
7691
|
async function emailGet(ctx, a) {
|
|
7612
|
-
out(await
|
|
7692
|
+
out(await get11(ctx, a.req("messageId")));
|
|
7613
7693
|
}
|
|
7614
7694
|
async function emailStats(ctx, a) {
|
|
7615
7695
|
out(await stats2(ctx, { start: a.str("start"), end: a.str("end") }));
|
|
@@ -7759,10 +7839,12 @@ Notes:
|
|
|
7759
7839
|
method run, errors) with 'requests get <id>'.
|
|
7760
7840
|
|
|
7761
7841
|
Custom domains \u2014 two independent directions:
|
|
7762
|
-
'domains' govern the From address
|
|
7763
|
-
dnsInstructions:
|
|
7764
|
-
|
|
7765
|
-
|
|
7842
|
+
'domains' govern the From address. 'add' returns
|
|
7843
|
+
dnsInstructions.records: the DNS records to publish, each
|
|
7844
|
+
marked required or not (on the cloud, three DKIM CNAMEs
|
|
7845
|
+
and a recommended SPF TXT) \u2014 hand these to the user to
|
|
7846
|
+
create at their DNS host, then 'verify <domain>' to
|
|
7847
|
+
re-check now.
|
|
7766
7848
|
'list' also returns effectiveSender: what the app currently
|
|
7767
7849
|
sends as, and which tier that address comes from.
|
|
7768
7850
|
'inbound-domains' receive mail at the user's own domain via one MX record
|
|
@@ -7771,7 +7853,7 @@ Custom domains \u2014 two independent directions:
|
|
|
7771
7853
|
with no setup; a custom inbound domain is optional polish.
|
|
7772
7854
|
|
|
7773
7855
|
uiStatus per domain: pending (records not confirmed yet \u2014 sending verification
|
|
7774
|
-
can take minutes after the
|
|
7856
|
+
can take minutes after the records resolve), verified, or action_needed (check
|
|
7775
7857
|
verificationErrors; sending verification expires unstarted after ~72h \u2014 fix
|
|
7776
7858
|
the records and 'verify' again).
|
|
7777
7859
|
|
|
@@ -7785,7 +7867,7 @@ Examples:
|
|
|
7785
7867
|
`;
|
|
7786
7868
|
|
|
7787
7869
|
// src/ops/cron.ts
|
|
7788
|
-
function
|
|
7870
|
+
function list13(ctx, params = {}) {
|
|
7789
7871
|
return call(
|
|
7790
7872
|
ctx,
|
|
7791
7873
|
"GET",
|
|
@@ -7814,7 +7896,7 @@ var cronSpecs = {
|
|
|
7814
7896
|
}
|
|
7815
7897
|
};
|
|
7816
7898
|
async function cronList(ctx, a) {
|
|
7817
|
-
out(await
|
|
7899
|
+
out(await list13(ctx, { runs: a.num("runs") }));
|
|
7818
7900
|
}
|
|
7819
7901
|
async function cronRun(ctx, a) {
|
|
7820
7902
|
out(await run2(ctx, a.req("route")));
|
|
@@ -7853,14 +7935,14 @@ var POLL_MS5 = 3e3;
|
|
|
7853
7935
|
function base6(appId) {
|
|
7854
7936
|
return `/_internal/v2/apps/${appId}/infra`;
|
|
7855
7937
|
}
|
|
7856
|
-
function
|
|
7938
|
+
function list14(ctx, params) {
|
|
7857
7939
|
return call(
|
|
7858
7940
|
ctx,
|
|
7859
7941
|
"GET",
|
|
7860
7942
|
`${base6(ctx.appId)}${params?.includeDestroyed ? "?includeDestroyed=true" : ""}`
|
|
7861
7943
|
);
|
|
7862
7944
|
}
|
|
7863
|
-
function
|
|
7945
|
+
function get12(ctx, params) {
|
|
7864
7946
|
return call(
|
|
7865
7947
|
ctx,
|
|
7866
7948
|
"GET",
|
|
@@ -7930,7 +8012,7 @@ async function waitForPhase(ctx, params) {
|
|
|
7930
8012
|
const wanted = new Set(params.phases);
|
|
7931
8013
|
const arrived = (resource2) => wanted.has(resource2.phase) && (params.until?.(resource2) ?? true);
|
|
7932
8014
|
const outcome = await pollUntil(
|
|
7933
|
-
async () => (await
|
|
8015
|
+
async () => (await get12(ctx, { id: params.id })).resource,
|
|
7934
8016
|
(resource2) => arrived(resource2) || resource2.phase === "failed",
|
|
7935
8017
|
{
|
|
7936
8018
|
timeoutMs,
|
|
@@ -8045,10 +8127,10 @@ async function waitAndReport2(ctx, a, id, phases, summary2, until) {
|
|
|
8045
8127
|
}
|
|
8046
8128
|
}
|
|
8047
8129
|
async function infraList(ctx, a) {
|
|
8048
|
-
out(await
|
|
8130
|
+
out(await list14(ctx, { includeDestroyed: a.bool("include-destroyed") }));
|
|
8049
8131
|
}
|
|
8050
8132
|
async function infraGet(ctx, a) {
|
|
8051
|
-
out(await
|
|
8133
|
+
out(await get12(ctx, { id: a.req("id") }));
|
|
8052
8134
|
}
|
|
8053
8135
|
var FOLLOW_POLL_MS = 4e3;
|
|
8054
8136
|
async function infraLogs(ctx, a) {
|
|
@@ -8493,6 +8575,7 @@ var SPECS = {
|
|
|
8493
8575
|
...dataSourceMappersSpecs,
|
|
8494
8576
|
...voiceSpecs,
|
|
8495
8577
|
...agentSpecs,
|
|
8578
|
+
...tasksSpecs,
|
|
8496
8579
|
...eventsSpecs,
|
|
8497
8580
|
...jewelsSpecs,
|
|
8498
8581
|
...settingsSpecs,
|
|
@@ -8523,6 +8606,7 @@ var HANDLERS = {
|
|
|
8523
8606
|
...dataSourceMappersHandlers,
|
|
8524
8607
|
...voiceHandlers,
|
|
8525
8608
|
...agentHandlers,
|
|
8609
|
+
...tasksHandlers,
|
|
8526
8610
|
...eventsHandlers,
|
|
8527
8611
|
...jewelsHandlers,
|
|
8528
8612
|
...settingsHandlers,
|
|
@@ -8549,6 +8633,7 @@ var GROUP_HELP = {
|
|
|
8549
8633
|
datasources: dataSourcesHelp,
|
|
8550
8634
|
voice: voiceHelp,
|
|
8551
8635
|
agent: agentHelp,
|
|
8636
|
+
tasks: tasksHelp,
|
|
8552
8637
|
events: eventsHelp,
|
|
8553
8638
|
jewels: jewelsHelp,
|
|
8554
8639
|
settings: settingsHelp,
|
|
@@ -8632,6 +8717,7 @@ Commands:
|
|
|
8632
8717
|
datasources Build and query searchable document corpora (RAG)
|
|
8633
8718
|
voice Phone numbers, voice call log + transcripts, voice policy settings
|
|
8634
8719
|
agent Agent (chat) conversation log + transcripts
|
|
8720
|
+
tasks Task agent (runTask) log + transcripts
|
|
8635
8721
|
events Realtime events \u2014 live tail, test publish, channel activity
|
|
8636
8722
|
jewels Monitor jewel shadowing; review + approve the proposal queue
|
|
8637
8723
|
settings App settings \u2014 signup allowlist, test accounts, embed origins, toggles
|
|
@@ -8647,7 +8733,7 @@ with a dash, use --name=value; to pass a positional beginning with a dash, put
|
|
|
8647
8733
|
-- before it.
|
|
8648
8734
|
|
|
8649
8735
|
All output is JSON. Configuration is read from environment variables
|
|
8650
|
-
(MINDSTUDIO_API_KEY,
|
|
8736
|
+
(MINDSTUDIO_API_KEY, MINDSTUDIO_BASE_URL) and mindstudio.json (appId).`;
|
|
8651
8737
|
var GROUPS = [
|
|
8652
8738
|
"requests",
|
|
8653
8739
|
"crashes",
|
|
@@ -8666,6 +8752,7 @@ var GROUPS = [
|
|
|
8666
8752
|
"datasources",
|
|
8667
8753
|
"voice",
|
|
8668
8754
|
"agent",
|
|
8755
|
+
"tasks",
|
|
8669
8756
|
"events",
|
|
8670
8757
|
"jewels",
|
|
8671
8758
|
"settings",
|
|
@@ -8763,7 +8850,7 @@ async function main() {
|
|
|
8763
8850
|
apiKey,
|
|
8764
8851
|
appId: appIdOverride ?? loadWorkspaceAppId(),
|
|
8765
8852
|
originAppId,
|
|
8766
|
-
baseUrl: process.env["
|
|
8853
|
+
baseUrl: process.env["MINDSTUDIO_BASE_URL"] || DEFAULT_BASE_URL
|
|
8767
8854
|
};
|
|
8768
8855
|
return HANDLERS[route.key](ctx, a);
|
|
8769
8856
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@madewithremy/admin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"description": "Admin SDK + CLI for managing production Remy apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"json5": "^2.2.3"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@types/node": "^
|
|
56
|
+
"@types/node": "^26.6.1",
|
|
57
57
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
58
58
|
"tsup": "^8",
|
|
59
59
|
"typescript": "npm:@typescript/typescript6@^6.0.2"
|