@modelprofile.com/authswitch 6.2.0 → 6.3.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.
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.cli.d.ts +56 -0
- package/dist_ts/classes.cli.js +238 -63
- package/dist_ts/classes.codexpreuse.js +2 -2
- package/dist_ts/classes.tui.js +51 -2
- package/dist_ts/preuse.d.ts +89 -2
- package/dist_ts/preuse.js +107 -2
- package/package.json +1 -1
- package/readme.md +84 -16
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.cli.ts +236 -54
- package/ts/classes.codexpreuse.ts +1 -1
- package/ts/classes.tui.ts +39 -2
- package/ts/preuse.ts +141 -3
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@modelprofile.com/authswitch',
|
|
6
|
-
version: '6.
|
|
6
|
+
version: '6.3.0',
|
|
7
7
|
description: 'Manage Codex, OpenCode and Claude Code accounts with guided switching and live usage status'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSw4QkFBOEI7SUFDcEMsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLDZGQUE2RjtDQUMzRyxDQUFBIn0=
|
package/dist_ts/classes.cli.d.ts
CHANGED
|
@@ -28,7 +28,55 @@ export declare class AuthSwitchCli {
|
|
|
28
28
|
*/
|
|
29
29
|
private settleRunningInstances;
|
|
30
30
|
private commandLogin;
|
|
31
|
+
/**
|
|
32
|
+
* Send the preuse prompt through one named account, through an account chosen here, or through every
|
|
33
|
+
* account of the harness.
|
|
34
|
+
*
|
|
35
|
+
* `--all` walks the harness's own account list, one request at a time, and ends with a table of what
|
|
36
|
+
* each account did; a single named account keeps its own contract, in which anything but a completed
|
|
37
|
+
* prompt is a failure. Neither form switches, refreshes or writes a login.
|
|
38
|
+
*/
|
|
31
39
|
private commandPreuse;
|
|
40
|
+
/**
|
|
41
|
+
* The account picker `preuse` shows without an account reference: one account, all of them, or Back.
|
|
42
|
+
*
|
|
43
|
+
* Choosing one account here is that account's consent, exactly as naming it on the command line is, and
|
|
44
|
+
* it keeps that command's contract. Choosing all of them spends quota on accounts the chooser did not
|
|
45
|
+
* name, so that answer is confirmed once and then runs as `--all` does, table and exit status included.
|
|
46
|
+
*/
|
|
47
|
+
private preuseFromPicker;
|
|
48
|
+
/**
|
|
49
|
+
* The choices an interactive preuse offers: every account, one of them, or Back.
|
|
50
|
+
*
|
|
51
|
+
* The guide and the bare `preuse` command offer the same list with the same wording. An account id is an
|
|
52
|
+
* opaque string, so every choice says which kind of answer it carries instead of relying on a sentinel an
|
|
53
|
+
* id could collide with. A single account is offered alone: "all" of one account is that same account.
|
|
54
|
+
*/
|
|
55
|
+
private preuseChoices;
|
|
56
|
+
/** The accounts an answer names; empty when the chosen account is no longer there. */
|
|
57
|
+
private preuseSelection;
|
|
58
|
+
/** One confirmation, naming what the prompt goes to and that it consumes quota. */
|
|
59
|
+
private confirmPreuse;
|
|
60
|
+
/**
|
|
61
|
+
* One preuse run and its report, for the command line and for the guide.
|
|
62
|
+
*
|
|
63
|
+
* Ctrl+C aborts the run: the account in flight is reported as interrupted and no further account is
|
|
64
|
+
* started, because a prompt that may already have been sent is never repeated. The exit status is 130
|
|
65
|
+
* for an interrupted run, 1 when an account failed -- and, for a single named account, when it was
|
|
66
|
+
* refused -- and 0 otherwise. Usage errors return 2 before anything reaches this.
|
|
67
|
+
*/
|
|
68
|
+
private runPreuse;
|
|
69
|
+
/** One line per event; a run over several accounts numbers each account as it starts. */
|
|
70
|
+
private writePreuseEvent;
|
|
71
|
+
/**
|
|
72
|
+
* The reset schedule one completed prompt reported.
|
|
73
|
+
*
|
|
74
|
+
* Once inference completes, a schedule that could not be read or displayed is reported as exactly that:
|
|
75
|
+
* a completed prompt is never repeated over a lookup or presentation failure.
|
|
76
|
+
*/
|
|
77
|
+
private writePreuseSchedule;
|
|
78
|
+
/** What every account of a run did, in one table. The rows repeat readings the run already took. */
|
|
79
|
+
private writePreuseSummary;
|
|
32
80
|
/**
|
|
33
81
|
* Watch usage and switch automatically; see `AuthSwitchWatch`. SIGINT and SIGTERM end it cleanly with status 0.
|
|
34
82
|
* `--once` runs one check and exits 1 when a switch it attempted did not complete.
|
|
@@ -39,6 +87,14 @@ export declare class AuthSwitchCli {
|
|
|
39
87
|
/** Offer a verified save before presenting the switch picker; declining never switches. */
|
|
40
88
|
private offerToSave;
|
|
41
89
|
private runHarnessGuide;
|
|
90
|
+
/**
|
|
91
|
+
* Preuse from the guide: one account or all of them, confirmed once before anything is sent.
|
|
92
|
+
*
|
|
93
|
+
* The prompt consumes quota, so the confirmation names what it will be sent to, and Back or a declined
|
|
94
|
+
* confirmation returns to the menu having sent nothing. A refusal an adapter states is not a guide
|
|
95
|
+
* failure, so the guide stays open; a failed prompt ends it, as every other failed action does.
|
|
96
|
+
*/
|
|
97
|
+
private guidePreuse;
|
|
42
98
|
private printCurrent;
|
|
43
99
|
private selectActive;
|
|
44
100
|
private reportOutcome;
|