@sente-labs/cli 0.13.0 → 0.15.0

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.
@@ -0,0 +1,249 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerRegistrationCommands = registerRegistrationCommands;
4
+ const promises_1 = require("node:readline/promises");
5
+ const client_1 = require("../client");
6
+ const identityRef_1 = require("../identityRef");
7
+ const output_1 = require("../output");
8
+ const TERMINAL = new Set(['completed', 'failed']);
9
+ const POLL_INTERVAL_MS = 3000;
10
+ // Cap the client-side wait so `register`/`relogin` can't hang forever if a run wedges. The run
11
+ // controller enforces its own wall-clock (RUN_TIMEOUT_MINUTES+2), so this is a safety net above it;
12
+ // on timeout we return the last-polled (non-terminal) run and tell the user to poll `sente run <id>`.
13
+ const MAX_WAIT_MS = 10 * 60 * 1000;
14
+ /**
15
+ * Poll a run to a terminal (completed/failed) or blocked state, printing a
16
+ * live status line to stderr. Returns the final run — or, on timeout, the
17
+ * last-polled (still-running) run. `--json` suppresses the status line.
18
+ */
19
+ async function waitForRun(client, runId, opts) {
20
+ const deadline = Date.now() + MAX_WAIT_MS;
21
+ let run = await client.request(`/v1/runs/${runId}`);
22
+ let last = '';
23
+ for (;;) {
24
+ if (!opts.json && run.status !== last) {
25
+ process.stderr.write(` ${run.status}…\n`);
26
+ last = run.status;
27
+ }
28
+ if (TERMINAL.has(run.status) || run.status === 'blocked')
29
+ return run;
30
+ if (Date.now() >= deadline)
31
+ return run; // timed out — caller renders "still running"
32
+ await new Promise((r) => setTimeout(r, POLL_INTERVAL_MS));
33
+ run = await client.request(`/v1/runs/${runId}`);
34
+ }
35
+ }
36
+ /**
37
+ * Render the outcome of a finished/blocked run to stderr, and exit non-zero on
38
+ * failure. Shared by `register` and `relogin` (same wait/poll UX). `--json`
39
+ * already emitted the full object, so this only handles the human path.
40
+ */
41
+ function renderRunOutcome(reg, run, opts) {
42
+ (0, output_1.printSuccess)({ registration: reg, run }, () => {
43
+ if (run.status === 'completed') {
44
+ process.stdout.write(`Account ready.\n registration: ${reg.id}\n username: ${reg.username ?? '-'}\n`);
45
+ }
46
+ else if (run.status === 'blocked') {
47
+ const submitGate = run.error?.code === 'SUBMIT_CONFIRMATION_REQUIRED';
48
+ process.stderr.write((submitGate
49
+ ? `Form filled — click the final submit button yourself in the live view, then resume.\n`
50
+ : `Run blocked (${run.error?.code ?? 'unknown'}) — human takeover needed.\n`) +
51
+ (run.liveViewUrl ? ` live view: ${run.liveViewUrl}\n` : '') +
52
+ ` resume: sente run resume ${run.id}\n`);
53
+ }
54
+ else if (run.status === 'failed') {
55
+ process.stderr.write(`Run failed: ${run.error?.code ?? 'unknown'}${run.error?.detail ? ` — ${run.error.detail}` : ''}\n`);
56
+ }
57
+ else {
58
+ // Non-terminal (still running/awaiting_verification) — the client wait timed out, not the run.
59
+ process.stderr.write(`Run still ${run.status} after waiting — check later with:\n sente run ${run.id}\n`);
60
+ }
61
+ }, opts);
62
+ if (run.status !== 'completed')
63
+ process.exit(1);
64
+ }
65
+ /**
66
+ * Decide whether the run pauses for a human to click the final submit. Priority: explicit flag wins;
67
+ * otherwise, in an interactive terminal, ask (default = autonomous); non-interactively (piped, CI,
68
+ * `--json`) default to autonomous with no prompt — matching the API default.
69
+ */
70
+ async function resolveConfirmBeforeSubmit(cmdOpts, opts) {
71
+ if (cmdOpts.confirmBeforeSubmit)
72
+ return true;
73
+ if (cmdOpts.autonomous)
74
+ return false;
75
+ if (opts.json || !process.stdin.isTTY || !process.stdout.isTTY)
76
+ return false;
77
+ const rl = (0, promises_1.createInterface)({ input: process.stdin, output: process.stderr });
78
+ try {
79
+ process.stderr.write('How should the agent handle the final signup submit?\n' +
80
+ ' 1) Autonomously — the agent fills and submits the form itself (default)\n' +
81
+ ' 2) Confirm before submit — the agent fills the form, then you click the final submit in\n' +
82
+ ' the live view yourself (you accept the app’s terms). The run pauses as "blocked" with a\n' +
83
+ ' live-view link; resume it after you submit.\n');
84
+ const ans = (await rl.question('Choose [1/2] (default 1): ')).trim();
85
+ return ans === '2';
86
+ }
87
+ finally {
88
+ rl.close();
89
+ }
90
+ }
91
+ /**
92
+ * `sente register|registrations|relogin|credentials|run` — drive the
93
+ * register/login loop: create third-party accounts under an identity's email
94
+ * and re-auth them (AgentAccount Slice 1). Targets the Sente API
95
+ * (`/v1/registrations`, `/v1/runs`) with the stored API key.
96
+ *
97
+ * Note: `register` is the third-party signup — distinct from `sente login`,
98
+ * which is Auth0 sign-in to Sente itself. Re-auth of a third-party account is
99
+ * `relogin`.
100
+ */
101
+ function registerRegistrationCommands(program, globalOpts) {
102
+ program
103
+ .command('register')
104
+ .description('Register a third-party account under an identity (drives the browser + email verification)')
105
+ .argument('<appUrl>', 'signup URL of the third-party app')
106
+ .requiredOption('--identity <ref>', 'identity id, email, or local-part')
107
+ .option('--username <u>', 'desired username (default: derived server-side)')
108
+ .option('--password <p>', 'desired password (default: generated server-side)')
109
+ .option('--confirm-before-submit', 'pause before the final submit so YOU click it in the live view (you accept the terms)')
110
+ .option('--autonomous', 'fill and submit the form fully autonomously — skips the interactive prompt')
111
+ .option('--no-wait', "return the run id immediately instead of waiting for it to finish")
112
+ .action(async (appUrl, cmdOpts) => {
113
+ const opts = globalOpts();
114
+ try {
115
+ const client = new client_1.GatewayClient();
116
+ const identityId = await (0, identityRef_1.resolveIdentityId)(client, cmdOpts.identity);
117
+ const confirmBeforeSubmit = await resolveConfirmBeforeSubmit(cmdOpts, opts);
118
+ const credentials = {};
119
+ if (cmdOpts.username)
120
+ credentials.username = cmdOpts.username;
121
+ if (cmdOpts.password)
122
+ credentials.password = cmdOpts.password;
123
+ const { registration, run } = await client.request('/v1/registrations', {
124
+ method: 'POST',
125
+ body: {
126
+ identityId,
127
+ appUrl,
128
+ ...(Object.keys(credentials).length ? { credentials } : {}),
129
+ ...(confirmBeforeSubmit ? { confirmBeforeSubmit: true } : {}),
130
+ },
131
+ });
132
+ if (cmdOpts.wait === false) {
133
+ (0, output_1.printSuccess)({ registration, run }, `Started run ${run.id} (registration ${registration.id})`, opts);
134
+ return;
135
+ }
136
+ const final = await waitForRun(client, run.id, opts);
137
+ renderRunOutcome(registration, final, opts);
138
+ }
139
+ catch (err) {
140
+ process.exit((0, output_1.printError)(err, opts));
141
+ }
142
+ });
143
+ program
144
+ .command('registrations')
145
+ .description('List third-party accounts and their latest run status')
146
+ .option('--identity <ref>', 'filter to one identity (id, email, or local-part)')
147
+ .action(async (cmdOpts) => {
148
+ const opts = globalOpts();
149
+ try {
150
+ const client = new client_1.GatewayClient();
151
+ const identityId = cmdOpts.identity ? await (0, identityRef_1.resolveIdentityId)(client, cmdOpts.identity) : undefined;
152
+ const rows = await client.request('/v1/registrations', {
153
+ query: { identityId },
154
+ });
155
+ (0, output_1.printSuccess)(rows, () => {
156
+ if (rows.length === 0) {
157
+ process.stdout.write('No registrations yet. Create one with `sente register <appUrl> --identity <ref>`.\n');
158
+ return;
159
+ }
160
+ for (const r of rows) {
161
+ const runStatus = r.latestRun ? r.latestRun.status : '-';
162
+ process.stdout.write(`${r.appUrl} ${r.status} run:${runStatus} ${r.id}\n`);
163
+ }
164
+ }, opts);
165
+ }
166
+ catch (err) {
167
+ process.exit((0, output_1.printError)(err, opts));
168
+ }
169
+ });
170
+ program
171
+ .command('relogin')
172
+ .description('Re-authenticate an existing third-party account (F4) — not `sente login`, which is Sente sign-in')
173
+ .argument('<registrationId>', 'registration id (reg_…)')
174
+ .option('--no-wait', 'return the run id immediately instead of waiting for it to finish')
175
+ .action(async (registrationId, cmdOpts) => {
176
+ const opts = globalOpts();
177
+ try {
178
+ const client = new client_1.GatewayClient();
179
+ const { registration, run } = await client.request(`/v1/registrations/${registrationId}/login`, { method: 'POST' });
180
+ if (cmdOpts.wait === false) {
181
+ (0, output_1.printSuccess)({ registration, run }, `Started run ${run.id} (registration ${registration.id})`, opts);
182
+ return;
183
+ }
184
+ const final = await waitForRun(client, run.id, opts);
185
+ renderRunOutcome(registration, final, opts);
186
+ }
187
+ catch (err) {
188
+ process.exit((0, output_1.printError)(err, opts));
189
+ }
190
+ });
191
+ program
192
+ .command('credentials')
193
+ .description("Print an account's vaulted username/password/origin (for handoff; audited server-side)")
194
+ .argument('<registrationId>', 'registration id (reg_…)')
195
+ .action(async (registrationId) => {
196
+ const opts = globalOpts();
197
+ try {
198
+ const creds = await new client_1.GatewayClient().request(`/v1/registrations/${registrationId}/credentials`);
199
+ (0, output_1.printSuccess)(creds, () => process.stdout.write(`username: ${creds.username}\npassword: ${creds.password}\norigin: ${creds.origin}\n`), opts);
200
+ }
201
+ catch (err) {
202
+ process.exit((0, output_1.printError)(err, opts));
203
+ }
204
+ });
205
+ const run = program.command('run').description('Inspect and control register/login runs');
206
+ run
207
+ .command('show', { isDefault: true })
208
+ .description("Show a run's status, error, and live-view URL")
209
+ .argument('<runId>', 'run id (run_…)')
210
+ .action(async (runId) => {
211
+ const opts = globalOpts();
212
+ try {
213
+ const r = await new client_1.GatewayClient().request(`/v1/runs/${runId}`);
214
+ (0, output_1.printSuccess)(r, () => process.stdout.write(`${r.type} run ${r.id}\n status: ${r.status}\n error: ${r.error ? `${r.error.code}${r.error.detail ? ` — ${r.error.detail}` : ''}` : '-'}\n live view: ${r.liveViewUrl ?? '-'}\n`), opts);
215
+ }
216
+ catch (err) {
217
+ process.exit((0, output_1.printError)(err, opts));
218
+ }
219
+ });
220
+ run
221
+ .command('resume')
222
+ .description('Resume a blocked run after human takeover in the live view')
223
+ .argument('<runId>', 'run id (run_…)')
224
+ .action(async (runId) => {
225
+ const opts = globalOpts();
226
+ try {
227
+ const r = await new client_1.GatewayClient().request(`/v1/runs/${runId}/resume`, { method: 'POST' });
228
+ (0, output_1.printSuccess)(r, `Resumed run ${r.id} (${r.status})`, opts);
229
+ }
230
+ catch (err) {
231
+ process.exit((0, output_1.printError)(err, opts));
232
+ }
233
+ });
234
+ run
235
+ .command('abort')
236
+ .description('Abort a non-terminal run')
237
+ .argument('<runId>', 'run id (run_…)')
238
+ .action(async (runId) => {
239
+ const opts = globalOpts();
240
+ try {
241
+ const r = await new client_1.GatewayClient().request(`/v1/runs/${runId}/abort`, { method: 'POST' });
242
+ (0, output_1.printSuccess)(r, `Aborted run ${r.id} (${r.status})`, opts);
243
+ }
244
+ catch (err) {
245
+ process.exit((0, output_1.printError)(err, opts));
246
+ }
247
+ });
248
+ }
249
+ //# sourceMappingURL=registration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registration.js","sourceRoot":"","sources":["../../src/commands/registration.ts"],"names":[],"mappings":";;AAiIA,oEAuLC;AAxTD,qDAAyD;AAEzD,sCAA0C;AAC1C,gDAAmD;AACnD,sCAAiE;AAyBjE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;AAClD,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,+FAA+F;AAC/F,oGAAoG;AACpG,sGAAsG;AACtG,MAAM,WAAW,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEnC;;;;GAIG;AACH,KAAK,UAAU,UAAU,CAAC,MAAqB,EAAE,KAAa,EAAE,IAAgB;IAC9E,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,WAAW,CAAC;IAC1C,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAAM,YAAY,KAAK,EAAE,CAAC,CAAC;IACzD,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,SAAS,CAAC;QACR,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;YACtC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC;YAC3C,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC;QACpB,CAAC;QACD,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI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BAAU,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ const token_1 = require("./commands/token");
8
8
  const identity_1 = require("./commands/identity");
9
9
  const inbox_1 = require("./commands/inbox");
10
10
  const webhook_1 = require("./commands/webhook");
11
+ const registration_1 = require("./commands/registration");
11
12
  const update_1 = require("./update");
12
13
  // Fire-and-forget npm registry check. Cached for 24h. Prints a one-line
13
14
  // nudge to stderr if a newer CLI is available. Never blocks the user's
@@ -31,6 +32,7 @@ const globalOpts = () => program.opts();
31
32
  (0, identity_1.registerIdentityCommands)(program, globalOpts);
32
33
  (0, inbox_1.registerInboxCommands)(program, globalOpts);
33
34
  (0, webhook_1.registerWebhookCommands)(program, globalOpts);
35
+ (0, registration_1.registerRegistrationCommands)(program, globalOpts);
34
36
  program.parseAsync(process.argv).catch((err) => {
35
37
  // Defensive: command actions handle their own errors. This only catches
36
38
  // setup-time errors (e.g. unknown subcommand).
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,4CAAwD;AACxD,8CAA0D;AAC1D,4CAAwD;AACxD,kDAA+D;AAC/D,4CAAyD;AACzD,gDAA6D;AAC7D,qCAA0D;AAG1D,wEAAwE;AACxE,uEAAuE;AACvE,6DAA6D;AAC7D,KAAK,IAAA,0BAAiB,GAAE,CAAC;AAEzB,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,OAAO,CAAC;KACb,WAAW,CAAC,6FAA6F,CAAC;KAC1G,OAAO,CAAC,oBAAW,CAAC;KACpB,MAAM,CAAC,QAAQ,EAAE,oDAAoD,CAAC,CAAC;AAE1E;;;;GAIG;AACH,MAAM,UAAU,GAAG,GAAe,EAAE,CAAC,OAAO,CAAC,I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c,CAAC;AAEhE,IAAA,4BAAoB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC1C,IAAA,8BAAqB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC3C,IAAA,4BAAoB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC1C,IAAA,mCAAwB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC9C,IAAA,6BAAqB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC3C,IAAA,iCAAuB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC7C,IAAA,2CAA4B,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAElD,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IAC7C,wEAAwE;IACxE,+CAA+C;IAC/C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,OAAO,IAAI,GAAG,IAAI,CAAC,CAAC;IACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sente-labs/cli",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "Sente CLI -- give your AI agents managed email identities: create identities, receive and react to email, manage webhooks, from your terminal and Claude Code.",
5
5
  "bin": {
6
6
  "sente": "dist/index.js"