@tacitai/mcp-server 0.7.0 → 0.8.1
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/api-errors.d.ts +102 -0
- package/dist/api-errors.js +165 -0
- package/dist/autonomy.d.ts +46 -0
- package/dist/autonomy.js +118 -0
- package/dist/claude-config.d.ts +139 -0
- package/dist/claude-config.js +339 -0
- package/dist/cli-launch.d.ts +33 -0
- package/dist/cli-launch.js +178 -0
- package/dist/cli-login.d.ts +34 -0
- package/dist/cli-login.js +200 -0
- package/dist/cli-mode.d.ts +47 -0
- package/dist/cli-mode.js +170 -0
- package/dist/cli-profiles.d.ts +37 -0
- package/dist/cli-profiles.js +344 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.js +59 -458
- package/dist/client.d.ts +90 -52
- package/dist/client.js +198 -296
- package/dist/credentials.d.ts +81 -0
- package/dist/credentials.js +291 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +37 -89
- package/dist/oauth.d.ts +1 -1
- package/dist/oauth.js +5 -5
- package/dist/profile-store.d.ts +96 -0
- package/dist/profile-store.js +382 -0
- package/dist/prompt.d.ts +32 -0
- package/dist/prompt.js +99 -0
- package/dist/prompts.d.ts +2 -2
- package/dist/prompts.js +3 -3
- package/dist/server-mode.d.ts +65 -0
- package/dist/server-mode.js +99 -0
- package/dist/setup-migrate.d.ts +35 -0
- package/dist/setup-migrate.js +204 -0
- package/dist/setup.d.ts +41 -66
- package/dist/setup.js +361 -531
- package/dist/signin.d.ts +108 -0
- package/dist/signin.js +595 -0
- package/dist/tools/agents.d.ts +6 -4
- package/dist/tools/agents.js +15 -4
- package/dist/tools/artifacts.d.ts +2 -0
- package/dist/tools/artifacts.js +8 -1
- package/dist/tools/capture.js +2 -2
- package/dist/tools/career.js +2 -2
- package/dist/tools/chronicle.js +7 -7
- package/dist/tools/crews.js +8 -8
- package/dist/tools/errors.d.ts +18 -0
- package/dist/tools/errors.js +73 -1
- package/dist/tools/exec-route.d.ts +34 -0
- package/dist/tools/exec-route.js +101 -27
- package/dist/tools/github.js +2 -2
- package/dist/tools/gm.js +2 -2
- package/dist/tools/iam.js +2 -3
- package/dist/tools/kb.js +2 -2
- package/dist/tools/lake-structure.js +8 -8
- package/dist/tools/lake.js +2 -2
- package/dist/tools/onboarding.js +2 -2
- package/dist/tools/people.js +7 -7
- package/dist/tools/pyramid.js +2 -2
- package/dist/tools/recall.js +2 -2
- package/dist/tools/secretary.d.ts +1 -0
- package/dist/tools/secretary.js +2 -1
- package/dist/tools/synthesize.d.ts +37 -0
- package/dist/tools/synthesize.js +128 -9
- package/dist/tools/voice.d.ts +3 -2
- package/dist/tools/voice.js +70 -18
- package/dist/tools/wiki.js +2 -2
- package/dist/tools/workspaces.js +20 -6
- package/dist/version.d.ts +6 -0
- package/dist/version.js +18 -0
- package/dist/workflow-registry.d.ts +1 -0
- package/dist/workflow-registry.js +21 -0
- package/package.json +4 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* api-errors.ts — the client error-message map (MV-1542c step 1.5).
|
|
3
|
+
*
|
|
4
|
+
* This file is the "Error-message map" table of the mission brief § Error Handling
|
|
5
|
+
* (DEEP-ENGINEERING §4.7), and nothing else. Every string is copied from that table;
|
|
6
|
+
* `<workspace>`, `<date>`, `<name>`, `<host>`, `<path>`, `<reason>`, `<n>`, `<code>` are the
|
|
7
|
+
* only parts filled in at run time.
|
|
8
|
+
*
|
|
9
|
+
* Rules:
|
|
10
|
+
* - Messages never contain a token, a JWT or a password. Callers pass names, hosts and dates only.
|
|
11
|
+
* - This module imports nothing, so client.ts, credentials.ts, signin.ts and tools can all use it.
|
|
12
|
+
*/
|
|
13
|
+
/** Values that fill the `<…>` slots of a message. */
|
|
14
|
+
export interface ErrorContext {
|
|
15
|
+
/** Workspace name, or any label for it. Falls back to "this workspace". */
|
|
16
|
+
workspace?: string | null;
|
|
17
|
+
/** Expiry date, already formatted by the caller. */
|
|
18
|
+
date?: string | null;
|
|
19
|
+
/** Profile name. */
|
|
20
|
+
name?: string | null;
|
|
21
|
+
/** Credential kind that made the call (from whoami `credential_type`). */
|
|
22
|
+
credentialKind?: 'jwt' | 'iam_token' | 'dev_token' | 'api_key' | 'hmac_session' | null;
|
|
23
|
+
/** Where the rejected credential came from: a saved profile or the environment. */
|
|
24
|
+
credentialSource?: 'profile' | 'env' | null;
|
|
25
|
+
/** Name of the environment variable that held a rejected env credential. */
|
|
26
|
+
envVar?: string | null;
|
|
27
|
+
/** `stale_login` is the only reason `SESSION_LOGIN_REQUIRED` carries a distinct string for. */
|
|
28
|
+
reason?: string | null;
|
|
29
|
+
/** The surface the message is for: the CLI/MCP (default) or the sign-in page. */
|
|
30
|
+
surface?: 'cli' | 'page';
|
|
31
|
+
/** Where the call happened: an authenticated tool call or startup (default) or a sign-in step. */
|
|
32
|
+
phase?: 'tool' | 'signin';
|
|
33
|
+
/** The server's own message text; shown for `WEAK_PASSWORD`. */
|
|
34
|
+
serverMessage?: string | null;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* L-10: strip C0/C1 control characters (ANSI escapes, newlines, DEL) from server-supplied text
|
|
38
|
+
* before it is printed or handed to the model. Newlines become a space so one line stays one line.
|
|
39
|
+
*/
|
|
40
|
+
export declare function printable(text: string): string;
|
|
41
|
+
export declare const SIGNIN_TURNED_OFF = "TACIT CLI sign-in is turned off on this server. Ask your workspace owner.";
|
|
42
|
+
export declare const SIGN_IN_AGAIN = "Sign in again: tacit login";
|
|
43
|
+
export declare const OWNER_CHANGE_API_KEY = "Owner changes need your own sign-in or saved login, not an API key or agent session.";
|
|
44
|
+
export declare const OWNER_CHANGE_LEGACY = "Owner changes need a current TACIT login. Run: tacit login";
|
|
45
|
+
export declare const STALE_LOGIN_CLI = "For your security this needs a recent sign-in (within 15 minutes). Sign in again in the browser, then retry.";
|
|
46
|
+
export declare const STALE_LOGIN_PAGE = "For your security, sign in again to approve this request.";
|
|
47
|
+
export declare const OWNER_CANNOT_BE_DISABLED = "Transfer ownership to another member before removing the owner.";
|
|
48
|
+
export declare const WORKSPACE_NOT_ACTIVE = "Your access to that workspace isn't active.";
|
|
49
|
+
export declare const SIGNIN_IN_PROGRESS = "Another sign-in for this computer is finishing. Try again in a moment.";
|
|
50
|
+
export declare const AUTH_BACKEND_UNAVAILABLE = "TACIT is busy and couldn't check your login. Try again shortly.";
|
|
51
|
+
export declare const ACTING_USER_REQUIRED = "This login can't create tokens. Run: tacit login";
|
|
52
|
+
export declare const LEGACY_MINT_OWNER_ONLY = "Developer tokens are retired for members. Run: tacit login";
|
|
53
|
+
export declare const PIN_OFFER = "Sign in with your email and password instead? (y/N)";
|
|
54
|
+
export declare const APPROVAL_TIMEOUT = "No approval received after 3 minutes.";
|
|
55
|
+
export declare const STATE_MISMATCH = "Sign-in check failed. Try again. The browser reply did not match this request.";
|
|
56
|
+
export declare const SIGNIN_DENIED = "Sign-in was denied in the browser.";
|
|
57
|
+
export declare const CODE_EXPIRED = "Sign-in expired or the server restarted. Run tacit login again.";
|
|
58
|
+
export declare const PKCE_MISMATCH = "Sign-in verification failed. Run tacit login again; if it repeats, update @tacitai/mcp-server.";
|
|
59
|
+
export declare const MUST_CHANGE_PIN = "Change your password in TACIT first.";
|
|
60
|
+
export declare const OWNER_SET_PASSWORD_REMOVED = "Owners can't set passwords. TACIT sends the person an invite; they choose their own password.";
|
|
61
|
+
export declare const WEAK_PASSWORD_FALLBACK = "Choose a stronger password.";
|
|
62
|
+
export declare const RATE_LIMITED = "Too many sign-ins for your account in the last hour. Try again later.";
|
|
63
|
+
export declare const SERVER_TOO_OLD = "This TACIT server is older than this version of tacit and can't issue CLI logins. Ask your admin to update it.";
|
|
64
|
+
export declare const SESSION_LOGIN_REQUIRED = "This action needs a browser or password sign-in, not a saved CLI login.";
|
|
65
|
+
export declare const OWNER_FALLBACK_NOT_ALLOWED = "This shared workspace token can't make owner changes. Run: tacit login";
|
|
66
|
+
export declare const SWITCH_NOT_SUPPORTED = "Switch workspaces with `tacit <name>` or `tacit use <name>`.";
|
|
67
|
+
export declare const JWT_IN_PROFILE = "This profile holds a browser login, not a CLI login. Run: tacit login";
|
|
68
|
+
export declare const SIGNED_OUT = "Not signed in. Run: npx @tacitai/mcp-server setup";
|
|
69
|
+
export declare const tokenSuperseded: (c?: ErrorContext) => string;
|
|
70
|
+
export declare const tokenExpired: (c?: ErrorContext) => string;
|
|
71
|
+
export declare const ownerCredentialNotAllowed: (c?: ErrorContext) => string;
|
|
72
|
+
export declare const sessionLoginRequiredStale: (c?: ErrorContext) => string;
|
|
73
|
+
export declare const targetNotActive: (c?: ErrorContext) => string;
|
|
74
|
+
export declare const ambiguousMembership: (c?: ErrorContext) => string;
|
|
75
|
+
export declare const accessRemoved: (c?: ErrorContext) => string;
|
|
76
|
+
export declare const revokeMalformed: (c?: ErrorContext) => string;
|
|
77
|
+
export declare const tokenNotOwned: (c?: ErrorContext) => string;
|
|
78
|
+
export declare const unauthorizedProfile: (c?: ErrorContext) => string;
|
|
79
|
+
export declare const unauthorizedEnv: (c?: ErrorContext) => string;
|
|
80
|
+
export declare const credentialBindingMismatch: (c?: ErrorContext) => string;
|
|
81
|
+
export declare const profileWorkspaceMismatch: (name: string, a: string, b: string) => string;
|
|
82
|
+
export declare const urlConflict: (envHost: string, name: string, profileHost: string) => string;
|
|
83
|
+
export declare const brokenDefaultProfile: (name: string, reason: string) => string;
|
|
84
|
+
export declare const expiredProfile: (workspace: string, date: string) => string;
|
|
85
|
+
export declare const unsafeProfileFile: (name: string, path: string, reason: string) => string;
|
|
86
|
+
export declare const autonomyLookupFailed: (httpStatus: number | string) => string;
|
|
87
|
+
export declare const networkError: (host: string, code: string) => string;
|
|
88
|
+
export declare const evalUserNotSeeded: (c?: ErrorContext) => string;
|
|
89
|
+
/** "Page unreachable / port busy / no browser": a reason line, then the password offer. */
|
|
90
|
+
export declare const pageUnreachable: (reason: string) => string;
|
|
91
|
+
/** "Approval timeout (180 s)": the timeout line, then the password offer. */
|
|
92
|
+
export declare const approvalTimeout: () => string;
|
|
93
|
+
/** True for the codes that mean the member was removed (tool call / startup). */
|
|
94
|
+
export declare function isAccessRemovedCode(code: string | null | undefined): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Map an HTTP status + server error code to the message from the table.
|
|
97
|
+
* Returns null when the table has no row for the pair (callers keep their own text).
|
|
98
|
+
*
|
|
99
|
+
* A 401 with no code is the "old server" row: the profile or environment message,
|
|
100
|
+
* chosen by `ctx.credentialSource` (default: profile).
|
|
101
|
+
*/
|
|
102
|
+
export declare function messageForResponse(status: number, code: string | null, ctx?: ErrorContext): string | null;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* api-errors.ts — the client error-message map (MV-1542c step 1.5).
|
|
3
|
+
*
|
|
4
|
+
* This file is the "Error-message map" table of the mission brief § Error Handling
|
|
5
|
+
* (DEEP-ENGINEERING §4.7), and nothing else. Every string is copied from that table;
|
|
6
|
+
* `<workspace>`, `<date>`, `<name>`, `<host>`, `<path>`, `<reason>`, `<n>`, `<code>` are the
|
|
7
|
+
* only parts filled in at run time.
|
|
8
|
+
*
|
|
9
|
+
* Rules:
|
|
10
|
+
* - Messages never contain a token, a JWT or a password. Callers pass names, hosts and dates only.
|
|
11
|
+
* - This module imports nothing, so client.ts, credentials.ts, signin.ts and tools can all use it.
|
|
12
|
+
*/
|
|
13
|
+
const DEFAULT_WORKSPACE = 'this workspace';
|
|
14
|
+
/**
|
|
15
|
+
* L-10: strip C0/C1 control characters (ANSI escapes, newlines, DEL) from server-supplied text
|
|
16
|
+
* before it is printed or handed to the model. Newlines become a space so one line stays one line.
|
|
17
|
+
*/
|
|
18
|
+
export function printable(text) {
|
|
19
|
+
// eslint-disable-next-line no-control-regex
|
|
20
|
+
return text.replace(/[\u0000-\u001f\u007f-\u009f\u2028\u2029]+/g, ' ').trim();
|
|
21
|
+
}
|
|
22
|
+
function ws(ctx) {
|
|
23
|
+
return ctx.workspace && ctx.workspace.trim() ? printable(ctx.workspace) : DEFAULT_WORKSPACE;
|
|
24
|
+
}
|
|
25
|
+
// ─── Constant rows ───────────────────────────────────────────────────────────
|
|
26
|
+
export const SIGNIN_TURNED_OFF = 'TACIT CLI sign-in is turned off on this server. Ask your workspace owner.';
|
|
27
|
+
export const SIGN_IN_AGAIN = 'Sign in again: tacit login';
|
|
28
|
+
export const OWNER_CHANGE_API_KEY = 'Owner changes need your own sign-in or saved login, not an API key or agent session.';
|
|
29
|
+
export const OWNER_CHANGE_LEGACY = 'Owner changes need a current TACIT login. Run: tacit login';
|
|
30
|
+
export const STALE_LOGIN_CLI = 'For your security this needs a recent sign-in (within 15 minutes). Sign in again in the browser, then retry.';
|
|
31
|
+
export const STALE_LOGIN_PAGE = 'For your security, sign in again to approve this request.';
|
|
32
|
+
export const OWNER_CANNOT_BE_DISABLED = 'Transfer ownership to another member before removing the owner.';
|
|
33
|
+
export const WORKSPACE_NOT_ACTIVE = "Your access to that workspace isn't active.";
|
|
34
|
+
export const SIGNIN_IN_PROGRESS = 'Another sign-in for this computer is finishing. Try again in a moment.';
|
|
35
|
+
export const AUTH_BACKEND_UNAVAILABLE = "TACIT is busy and couldn't check your login. Try again shortly.";
|
|
36
|
+
export const ACTING_USER_REQUIRED = "This login can't create tokens. Run: tacit login";
|
|
37
|
+
export const LEGACY_MINT_OWNER_ONLY = 'Developer tokens are retired for members. Run: tacit login';
|
|
38
|
+
export const PIN_OFFER = 'Sign in with your email and password instead? (y/N)';
|
|
39
|
+
export const APPROVAL_TIMEOUT = 'No approval received after 3 minutes.';
|
|
40
|
+
export const STATE_MISMATCH = 'Sign-in check failed. Try again. The browser reply did not match this request.';
|
|
41
|
+
export const SIGNIN_DENIED = 'Sign-in was denied in the browser.';
|
|
42
|
+
export const CODE_EXPIRED = 'Sign-in expired or the server restarted. Run tacit login again.';
|
|
43
|
+
export const PKCE_MISMATCH = 'Sign-in verification failed. Run tacit login again; if it repeats, update @tacitai/mcp-server.';
|
|
44
|
+
export const MUST_CHANGE_PIN = 'Change your password in TACIT first.';
|
|
45
|
+
export const OWNER_SET_PASSWORD_REMOVED = "Owners can't set passwords. TACIT sends the person an invite; they choose their own password.";
|
|
46
|
+
export const WEAK_PASSWORD_FALLBACK = 'Choose a stronger password.';
|
|
47
|
+
export const RATE_LIMITED = 'Too many sign-ins for your account in the last hour. Try again later.';
|
|
48
|
+
export const SERVER_TOO_OLD = "This TACIT server is older than this version of tacit and can't issue CLI logins. Ask your admin to update it.";
|
|
49
|
+
export const SESSION_LOGIN_REQUIRED = 'This action needs a browser or password sign-in, not a saved CLI login.';
|
|
50
|
+
export const OWNER_FALLBACK_NOT_ALLOWED = "This shared workspace token can't make owner changes. Run: tacit login";
|
|
51
|
+
export const SWITCH_NOT_SUPPORTED = 'Switch workspaces with `tacit <name>` or `tacit use <name>`.';
|
|
52
|
+
export const JWT_IN_PROFILE = 'This profile holds a browser login, not a CLI login. Run: tacit login';
|
|
53
|
+
export const SIGNED_OUT = 'Not signed in. Run: npx @tacitai/mcp-server setup';
|
|
54
|
+
// ─── Rows with slots ─────────────────────────────────────────────────────────
|
|
55
|
+
export const tokenSuperseded = (c = {}) => `This login was replaced by a newer sign-in for ${ws(c)} on a device with the same name. Run: tacit login`;
|
|
56
|
+
export const tokenExpired = (c = {}) => `Your TACIT login for ${ws(c)} expired on ${c.date ?? 'an earlier date'}. Run: tacit login`;
|
|
57
|
+
export const ownerCredentialNotAllowed = (c = {}) => c.credentialKind === 'dev_token' ? OWNER_CHANGE_LEGACY : OWNER_CHANGE_API_KEY;
|
|
58
|
+
export const sessionLoginRequiredStale = (c = {}) => c.surface === 'page' ? STALE_LOGIN_PAGE : STALE_LOGIN_CLI;
|
|
59
|
+
export const targetNotActive = (c = {}) => `Ownership can only go to an active member of ${ws(c)}.`;
|
|
60
|
+
export const ambiguousMembership = (c = {}) => `You have more than one membership in ${ws(c)}. Ask the workspace owner to fix it.`;
|
|
61
|
+
export const accessRemoved = (c = {}) => `Your access to ${ws(c)} was removed.`;
|
|
62
|
+
export const revokeMalformed = (c = {}) => `Could not sign out ${c.name ?? 'this login'} on the server (the request was malformed). It remains valid; update @tacitai/mcp-server.`;
|
|
63
|
+
export const tokenNotOwned = (c = {}) => `The saved login for ${ws(c)} on this computer belongs to a different account. ` +
|
|
64
|
+
`Run: tacit rm ${c.name ?? '<name>'}, then tacit login.`;
|
|
65
|
+
export const unauthorizedProfile = (c = {}) => `Your TACIT login for ${ws(c)} expired or was revoked. Sign in again: tacit login. Then restart Claude Code, or reconnect tacit with /mcp.`;
|
|
66
|
+
export const unauthorizedEnv = (c = {}) => c.envVar && c.envVar !== 'TACIT_TOKEN'
|
|
67
|
+
? `The ${c.envVar} in your environment was rejected (expired or revoked). Replace it, or unset it to use your saved login.`
|
|
68
|
+
: 'The TACIT_TOKEN in your environment was rejected (expired or revoked). Replace it, or unset it to use your saved login.';
|
|
69
|
+
export const credentialBindingMismatch = (c = {}) => `This login is no longer linked to a member of ${ws(c)}. Run: tacit login`;
|
|
70
|
+
export const profileWorkspaceMismatch = (name, a, b) => `Profile ${name} is for ${a} but the token belongs to ${b}. Run: tacit login`;
|
|
71
|
+
export const urlConflict = (envHost, name, profileHost) => `TACIT_API_URL (${envHost}) differs from profile ${name} (${profileHost}). A saved login is only sent to its own server. Unset TACIT_API_URL, or run: tacit login --api-url <url>`;
|
|
72
|
+
export const brokenDefaultProfile = (name, reason) => `Default profile ${name} can't be used: ${reason}. Run: tacit login`;
|
|
73
|
+
export const expiredProfile = (workspace, date) => `Your login for ${workspace} expired on ${date}. Run: tacit login`;
|
|
74
|
+
export const unsafeProfileFile = (name, path, reason) => `Profile ${name} was not loaded: ${path} ${reason}`;
|
|
75
|
+
export const autonomyLookupFailed = (httpStatus) => `Couldn't confirm your TACIT access level (HTTP ${httpStatus}). Try again.`;
|
|
76
|
+
export const networkError = (host, code) => `Can't reach TACIT at ${host} (${code}). This is a connection problem, not a login problem.`;
|
|
77
|
+
export const evalUserNotSeeded = (c = {}) => `Eval service user not seeded for ${ws(c)}. Run the eval script with --ensure-eval-user.`;
|
|
78
|
+
/** "Page unreachable / port busy / no browser": a reason line, then the password offer. */
|
|
79
|
+
export const pageUnreachable = (reason) => `${reason}\n${PIN_OFFER}`;
|
|
80
|
+
/** "Approval timeout (180 s)": the timeout line, then the password offer. */
|
|
81
|
+
export const approvalTimeout = () => `${APPROVAL_TIMEOUT}\n${PIN_OFFER}`;
|
|
82
|
+
// ─── Server code -> message ──────────────────────────────────────────────────
|
|
83
|
+
/** True for the codes that mean the member was removed (tool call / startup). */
|
|
84
|
+
export function isAccessRemovedCode(code) {
|
|
85
|
+
switch (code) {
|
|
86
|
+
case 'MEMBERSHIP_NOT_FOUND':
|
|
87
|
+
case 'ACCOUNT_DISABLED':
|
|
88
|
+
case 'MEMBERSHIP_INACTIVE':
|
|
89
|
+
return true;
|
|
90
|
+
default:
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Map an HTTP status + server error code to the message from the table.
|
|
96
|
+
* Returns null when the table has no row for the pair (callers keep their own text).
|
|
97
|
+
*
|
|
98
|
+
* A 401 with no code is the "old server" row: the profile or environment message,
|
|
99
|
+
* chosen by `ctx.credentialSource` (default: profile).
|
|
100
|
+
*/
|
|
101
|
+
export function messageForResponse(status, code, ctx = {}) {
|
|
102
|
+
const signin = ctx.phase === 'signin';
|
|
103
|
+
switch (code) {
|
|
104
|
+
case 'IAM_SIGNIN_DISABLED':
|
|
105
|
+
case 'IAM_TOKENS_DISABLED':
|
|
106
|
+
return SIGNIN_TURNED_OFF;
|
|
107
|
+
case 'AUTH_BACKEND_UNAVAILABLE':
|
|
108
|
+
return AUTH_BACKEND_UNAVAILABLE;
|
|
109
|
+
case 'WEAK_PASSWORD':
|
|
110
|
+
return ctx.serverMessage && printable(ctx.serverMessage) ? printable(ctx.serverMessage) : WEAK_PASSWORD_FALLBACK;
|
|
111
|
+
case 'OWNER_SET_PASSWORD_REMOVED':
|
|
112
|
+
return OWNER_SET_PASSWORD_REMOVED;
|
|
113
|
+
default:
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
if (signin) {
|
|
117
|
+
switch (code) {
|
|
118
|
+
case 'INVALID_CODE':
|
|
119
|
+
case 'CODE_EXPIRED': return CODE_EXPIRED;
|
|
120
|
+
case 'PKCE_MISMATCH': return PKCE_MISMATCH;
|
|
121
|
+
case 'MUST_CHANGE_PIN': return MUST_CHANGE_PIN;
|
|
122
|
+
case 'RATE_LIMIT_EXCEEDED': return RATE_LIMITED;
|
|
123
|
+
case 'SIGNIN_IN_PROGRESS': return SIGNIN_IN_PROGRESS;
|
|
124
|
+
case 'AMBIGUOUS_MEMBERSHIP': return ambiguousMembership(ctx);
|
|
125
|
+
case 'TOKEN_NOT_OWNED': return tokenNotOwned(ctx);
|
|
126
|
+
case 'MISSING_FIELD': return SERVER_TOO_OLD;
|
|
127
|
+
case 'NOT_A_MEMBER':
|
|
128
|
+
case 'WORKSPACE_INACTIVE':
|
|
129
|
+
case 'MEMBERSHIP_INACTIVE': return WORKSPACE_NOT_ACTIVE;
|
|
130
|
+
default: break;
|
|
131
|
+
}
|
|
132
|
+
if (code === null && (status === 404 || status === 405))
|
|
133
|
+
return SERVER_TOO_OLD;
|
|
134
|
+
if (status === 429 && code === null)
|
|
135
|
+
return RATE_LIMITED;
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
switch (code) {
|
|
139
|
+
case 'TOKEN_REVOKED': return SIGN_IN_AGAIN;
|
|
140
|
+
case 'TOKEN_SUPERSEDED': return tokenSuperseded(ctx);
|
|
141
|
+
case 'TOKEN_EXPIRED': return tokenExpired(ctx);
|
|
142
|
+
case 'OWNER_CREDENTIAL_NOT_ALLOWED': return ownerCredentialNotAllowed(ctx);
|
|
143
|
+
case 'SESSION_LOGIN_REQUIRED':
|
|
144
|
+
return ctx.reason === 'stale_login' ? sessionLoginRequiredStale(ctx) : SESSION_LOGIN_REQUIRED;
|
|
145
|
+
case 'OWNER_CANNOT_BE_DISABLED': return OWNER_CANNOT_BE_DISABLED;
|
|
146
|
+
case 'TARGET_NOT_ACTIVE': return targetNotActive(ctx);
|
|
147
|
+
case 'WORKSPACE_INACTIVE': return WORKSPACE_NOT_ACTIVE;
|
|
148
|
+
case 'AMBIGUOUS_MEMBERSHIP': return ambiguousMembership(ctx);
|
|
149
|
+
case 'SIGNIN_IN_PROGRESS': return SIGNIN_IN_PROGRESS;
|
|
150
|
+
case 'ACTING_USER_REQUIRED': return ACTING_USER_REQUIRED;
|
|
151
|
+
case 'LEGACY_MINT_OWNER_ONLY': return LEGACY_MINT_OWNER_ONLY;
|
|
152
|
+
case 'CREDENTIAL_BINDING_MISMATCH': return credentialBindingMismatch(ctx);
|
|
153
|
+
case 'OWNER_FALLBACK_NOT_ALLOWED': return OWNER_FALLBACK_NOT_ALLOWED;
|
|
154
|
+
case 'INVALID_REQUEST_BODY': return revokeMalformed(ctx);
|
|
155
|
+
case 'TOKEN_NOT_OWNED': return tokenNotOwned(ctx);
|
|
156
|
+
case 'EVAL_USER_NOT_SEEDED': return evalUserNotSeeded(ctx);
|
|
157
|
+
default: break;
|
|
158
|
+
}
|
|
159
|
+
if (isAccessRemovedCode(code))
|
|
160
|
+
return accessRemoved(ctx);
|
|
161
|
+
if (status === 401 && code === null) {
|
|
162
|
+
return ctx.credentialSource === 'env' ? unauthorizedEnv(ctx) : unauthorizedProfile(ctx);
|
|
163
|
+
}
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autonomy lookup (MV-1542c step 1.4, D-51).
|
|
3
|
+
*
|
|
4
|
+
* The level comes from the server, never from a guess:
|
|
5
|
+
* env_override TACIT_AUTONOMY_LEVEL, when set to a valid level (testing / eval escape hatch;
|
|
6
|
+
* the server stays authoritative for every request)
|
|
7
|
+
* hmac_claim the autonomy_level claim inside an HMAC session credential
|
|
8
|
+
* whoami GET /api/v1/auth/whoami
|
|
9
|
+
* people_myself GET /api/v1/people/myself (older servers, share-token principals)
|
|
10
|
+
*
|
|
11
|
+
* A failed lookup is reported, never papered over: the caller gets
|
|
12
|
+
* { error: 'autonomy_unavailable' } and gates every tool (the most restrictive set)
|
|
13
|
+
* until a later call succeeds. Nothing is cached after a failure.
|
|
14
|
+
*
|
|
15
|
+
* This module takes a client by interface and imports nothing at runtime from client.ts,
|
|
16
|
+
* so client.ts can re-export from here without a cycle.
|
|
17
|
+
*/
|
|
18
|
+
import type { TacitClient } from './client.js';
|
|
19
|
+
export type AutonomyLevel = 'GUEST' | 'SCRIBE' | 'MENTAT' | 'TWIN';
|
|
20
|
+
export type AutonomyResult = {
|
|
21
|
+
level: AutonomyLevel;
|
|
22
|
+
source: 'whoami' | 'people_myself' | 'hmac_claim' | 'env_override';
|
|
23
|
+
} | {
|
|
24
|
+
error: 'token_expired';
|
|
25
|
+
message: string;
|
|
26
|
+
} | {
|
|
27
|
+
error: 'autonomy_unavailable';
|
|
28
|
+
message: string;
|
|
29
|
+
httpStatus?: number;
|
|
30
|
+
};
|
|
31
|
+
/** What a lookup needs from a client; TacitClient satisfies it. */
|
|
32
|
+
export type AutonomyProbe = Pick<TacitClient, 'get' | 'whoami' | 'hmacSessionClaims'>;
|
|
33
|
+
export declare function parseAutonomyLevel(raw: unknown): AutonomyLevel;
|
|
34
|
+
export declare function autonomyAtLeast(current: AutonomyLevel, required: AutonomyLevel): boolean;
|
|
35
|
+
type Resolved = Extract<AutonomyResult, {
|
|
36
|
+
level: AutonomyLevel;
|
|
37
|
+
}>;
|
|
38
|
+
export declare function getCachedAutonomy(principal: string): AutonomyLevel | null;
|
|
39
|
+
export declare function rememberAutonomy(principal: string, level: AutonomyLevel, source?: Resolved['source']): void;
|
|
40
|
+
/** Forget cached levels (one principal, or all). A workspace switch can change the level. */
|
|
41
|
+
export declare function clearAutonomyCache(principal?: string): void;
|
|
42
|
+
/** Look the level up once, with no caching. */
|
|
43
|
+
export declare function lookupAutonomy(client: AutonomyProbe, env?: NodeJS.ProcessEnv): Promise<AutonomyResult>;
|
|
44
|
+
/** Cached lookup used by the per-call hook. Only successes are cached. */
|
|
45
|
+
export declare function ensureAutonomy(principal: string, client: AutonomyProbe, env?: NodeJS.ProcessEnv): Promise<AutonomyResult>;
|
|
46
|
+
export {};
|
package/dist/autonomy.js
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autonomy lookup (MV-1542c step 1.4, D-51).
|
|
3
|
+
*
|
|
4
|
+
* The level comes from the server, never from a guess:
|
|
5
|
+
* env_override TACIT_AUTONOMY_LEVEL, when set to a valid level (testing / eval escape hatch;
|
|
6
|
+
* the server stays authoritative for every request)
|
|
7
|
+
* hmac_claim the autonomy_level claim inside an HMAC session credential
|
|
8
|
+
* whoami GET /api/v1/auth/whoami
|
|
9
|
+
* people_myself GET /api/v1/people/myself (older servers, share-token principals)
|
|
10
|
+
*
|
|
11
|
+
* A failed lookup is reported, never papered over: the caller gets
|
|
12
|
+
* { error: 'autonomy_unavailable' } and gates every tool (the most restrictive set)
|
|
13
|
+
* until a later call succeeds. Nothing is cached after a failure.
|
|
14
|
+
*
|
|
15
|
+
* This module takes a client by interface and imports nothing at runtime from client.ts,
|
|
16
|
+
* so client.ts can re-export from here without a cycle.
|
|
17
|
+
*/
|
|
18
|
+
const AUTONOMY_ORDINAL = { GUEST: 0, SCRIBE: 1, MENTAT: 2, TWIN: 3 };
|
|
19
|
+
export function parseAutonomyLevel(raw) {
|
|
20
|
+
if (typeof raw !== 'string' || !raw)
|
|
21
|
+
return 'SCRIBE';
|
|
22
|
+
const upper = raw.toUpperCase();
|
|
23
|
+
if (upper === 'OWNER')
|
|
24
|
+
return 'TWIN';
|
|
25
|
+
if (upper === 'GUEST' || upper === 'SCRIBE' || upper === 'MENTAT' || upper === 'TWIN')
|
|
26
|
+
return upper;
|
|
27
|
+
return 'SCRIBE';
|
|
28
|
+
}
|
|
29
|
+
export function autonomyAtLeast(current, required) {
|
|
30
|
+
return AUTONOMY_ORDINAL[current] >= AUTONOMY_ORDINAL[required];
|
|
31
|
+
}
|
|
32
|
+
/** True only for a string that names a level (parseAutonomyLevel alone maps junk to SCRIBE). */
|
|
33
|
+
function isLevelName(raw) {
|
|
34
|
+
return typeof raw === 'string' && /^(guest|scribe|mentat|twin|owner)$/i.test(raw);
|
|
35
|
+
}
|
|
36
|
+
const autonomyCache = new Map();
|
|
37
|
+
export function getCachedAutonomy(principal) {
|
|
38
|
+
return autonomyCache.get(principal)?.level ?? null;
|
|
39
|
+
}
|
|
40
|
+
export function rememberAutonomy(principal, level, source = 'whoami') {
|
|
41
|
+
autonomyCache.set(principal, { level, source });
|
|
42
|
+
}
|
|
43
|
+
/** Forget cached levels (one principal, or all). A workspace switch can change the level. */
|
|
44
|
+
export function clearAutonomyCache(principal) {
|
|
45
|
+
if (principal === undefined)
|
|
46
|
+
autonomyCache.clear();
|
|
47
|
+
else
|
|
48
|
+
autonomyCache.delete(principal);
|
|
49
|
+
}
|
|
50
|
+
// ─── Lookup ──────────────────────────────────────────────────────────────────
|
|
51
|
+
const TOKEN_EXPIRED_MESSAGE = 'Your TACIT login was rejected (expired or revoked). Run: tacit login';
|
|
52
|
+
function unavailable(httpStatus) {
|
|
53
|
+
const where = httpStatus === undefined ? "can't reach TACIT" : `HTTP ${httpStatus}`;
|
|
54
|
+
return {
|
|
55
|
+
error: 'autonomy_unavailable',
|
|
56
|
+
message: `Couldn't confirm your TACIT access level (${where}). Try again.`,
|
|
57
|
+
...(httpStatus === undefined ? {} : { httpStatus }),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function statusOf(err) {
|
|
61
|
+
const status = err?.statusCode;
|
|
62
|
+
return typeof status === 'number' ? status : undefined;
|
|
63
|
+
}
|
|
64
|
+
/** Look the level up once, with no caching. */
|
|
65
|
+
export async function lookupAutonomy(client, env = process.env) {
|
|
66
|
+
const override = env['TACIT_AUTONOMY_LEVEL']?.trim();
|
|
67
|
+
if (isLevelName(override))
|
|
68
|
+
return { level: parseAutonomyLevel(override), source: 'env_override' };
|
|
69
|
+
const claims = client.hmacSessionClaims();
|
|
70
|
+
if (claims)
|
|
71
|
+
return { level: parseAutonomyLevel(claims['autonomy_level']), source: 'hmac_claim' };
|
|
72
|
+
let who = null;
|
|
73
|
+
try {
|
|
74
|
+
who = await client.whoami();
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
const status = statusOf(err);
|
|
78
|
+
if (status === 401)
|
|
79
|
+
return { error: 'token_expired', message: TOKEN_EXPIRED_MESSAGE };
|
|
80
|
+
// 404/405: an older server without /auth/whoami; fall through to /people/myself.
|
|
81
|
+
if (status !== undefined && status !== 404 && status !== 405)
|
|
82
|
+
return unavailable(status);
|
|
83
|
+
if (status === undefined)
|
|
84
|
+
return unavailable();
|
|
85
|
+
}
|
|
86
|
+
if (who && isLevelName(who.autonomy_level)) {
|
|
87
|
+
return { level: parseAutonomyLevel(who.autonomy_level), source: 'whoami' };
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
const me = await client.get('/api/v1/people/myself', undefined, 5_000);
|
|
91
|
+
if (isLevelName(me?.['autonomy_level'])) {
|
|
92
|
+
return { level: parseAutonomyLevel(me['autonomy_level']), source: 'people_myself' };
|
|
93
|
+
}
|
|
94
|
+
return unavailable(200);
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
const status = statusOf(err);
|
|
98
|
+
if (status === 401)
|
|
99
|
+
return { error: 'token_expired', message: TOKEN_EXPIRED_MESSAGE };
|
|
100
|
+
if (status === 403) {
|
|
101
|
+
const body = err.body;
|
|
102
|
+
if (typeof body === 'string' && body.includes('people.read')) {
|
|
103
|
+
return { level: 'GUEST', source: 'people_myself' };
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return unavailable(status);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/** Cached lookup used by the per-call hook. Only successes are cached. */
|
|
110
|
+
export async function ensureAutonomy(principal, client, env = process.env) {
|
|
111
|
+
const cached = autonomyCache.get(principal);
|
|
112
|
+
if (cached)
|
|
113
|
+
return cached;
|
|
114
|
+
const result = await lookupAutonomy(client, env);
|
|
115
|
+
if ('level' in result)
|
|
116
|
+
autonomyCache.set(principal, result);
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code config: token-free registration, clash detection, legacy scan (MV-1542c step 1.3).
|
|
3
|
+
*
|
|
4
|
+
* The only thing this module ever registers is an entry that names a profile, never a credential:
|
|
5
|
+
*
|
|
6
|
+
* {"type":"stdio","command":"npx","args":["-y","@tacitai/mcp-server"],"env":{"TACIT_PROFILE":"${TACIT_PROFILE:-}"}}
|
|
7
|
+
*
|
|
8
|
+
* Rules (FEAT-267, design rules 6 and 7):
|
|
9
|
+
* - Claude Code is driven through `claude mcp add-json|remove`, started with execFile (no shell),
|
|
10
|
+
* remove first, then add (`add-json` exits 1 on an existing name).
|
|
11
|
+
* - `~/.claude/mcp.json` is never written (Claude Code does not read it).
|
|
12
|
+
* - The config folder is `CLAUDE_CONFIG_DIR` when set, else `~` (its file is `<folder>/.claude.json`).
|
|
13
|
+
* - `.claude.json` is read, never edited here (a running `claude` can write the same file).
|
|
14
|
+
* - A token read from an old entry stays in memory in `LegacyEntry.token`; it is never put in argv,
|
|
15
|
+
* env, a message or a log line.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ENTRY_NAME = "tacit";
|
|
18
|
+
export declare const PACKAGE_NAME = "@tacitai/mcp-server";
|
|
19
|
+
export interface StdioEntry {
|
|
20
|
+
type: 'stdio';
|
|
21
|
+
command: string;
|
|
22
|
+
args: string[];
|
|
23
|
+
env: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
export declare const GENERIC_ENTRY: StdioEntry;
|
|
26
|
+
export declare function genericEntryJson(): string;
|
|
27
|
+
/** On-demand launch (P6.1): inline `--mcp-config` value that names the profile literally. Never a token. */
|
|
28
|
+
export declare function onDemandMcpConfig(profile: string): string;
|
|
29
|
+
export interface ConfigFolder {
|
|
30
|
+
/** Folder Claude Code reads (`CLAUDE_CONFIG_DIR`, or `~`). */
|
|
31
|
+
dir: string;
|
|
32
|
+
/** `<dir>/.claude.json`. */
|
|
33
|
+
configFile: string;
|
|
34
|
+
/** True for `~` (no `CLAUDE_CONFIG_DIR` is passed to `claude`). */
|
|
35
|
+
isDefault: boolean;
|
|
36
|
+
/** Where Claude Code keeps copies of its config. */
|
|
37
|
+
backupsDir: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function folderFor(dir: string | null): ConfigFolder;
|
|
40
|
+
export declare function activeConfigFolder(env?: NodeJS.ProcessEnv): ConfigFolder;
|
|
41
|
+
/**
|
|
42
|
+
* Every Claude config folder on this machine: the active one first, then `~` (when `~/.claude.json`
|
|
43
|
+
* exists), `~/.claude` (when it holds a `.claude.json`) and each real `~/.claude-*` directory the user owns.
|
|
44
|
+
*/
|
|
45
|
+
export declare function listConfigFolders(env?: NodeJS.ProcessEnv): ConfigFolder[];
|
|
46
|
+
export declare function readClaudeJson(file: string): Record<string, unknown> | null;
|
|
47
|
+
export type EntryState = 'absent' | 'generic' | 'foreign';
|
|
48
|
+
export type LoadMode = 'always' | 'on-demand' | 'conflict';
|
|
49
|
+
/** State of the user-scope `tacit` entry in a folder's `.claude.json`. */
|
|
50
|
+
export declare function userEntryState(folder: ConfigFolder): EntryState;
|
|
51
|
+
/** Mode is derived from the entry, never stored (P3.4). */
|
|
52
|
+
export declare function loadMode(folder: ConfigFolder): LoadMode;
|
|
53
|
+
export interface RunResult {
|
|
54
|
+
code: number | null;
|
|
55
|
+
stdout: string;
|
|
56
|
+
stderr: string;
|
|
57
|
+
missing: boolean;
|
|
58
|
+
}
|
|
59
|
+
export declare function envFor(folder: ConfigFolder | undefined, base?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
60
|
+
/** execFile, never a shell. `missing` is true when the program is not on PATH. */
|
|
61
|
+
export declare function run(command: string, args: string[], opts?: {
|
|
62
|
+
folder?: ConfigFolder;
|
|
63
|
+
cwd?: string;
|
|
64
|
+
env?: NodeJS.ProcessEnv;
|
|
65
|
+
timeoutMs?: number;
|
|
66
|
+
}): Promise<RunResult>;
|
|
67
|
+
export declare function findOnPath(command: string, env?: NodeJS.ProcessEnv): string | null;
|
|
68
|
+
export type RegisterStatus = 'added' | 'already' | 'foreign' | 'no-claude' | 'failed';
|
|
69
|
+
export interface RegisterResult {
|
|
70
|
+
status: RegisterStatus;
|
|
71
|
+
detail?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Register the generic token-free user entry. An existing generic entry is left alone ('already'); a
|
|
75
|
+
* foreign one is never overwritten unless the caller got consent (`replaceForeign`). Remove, then add.
|
|
76
|
+
*/
|
|
77
|
+
export declare function registerUserEntry(folder: ConfigFolder, opts?: {
|
|
78
|
+
replaceForeign?: boolean;
|
|
79
|
+
env?: NodeJS.ProcessEnv;
|
|
80
|
+
}): Promise<RegisterResult>;
|
|
81
|
+
export declare function removeUserEntry(folder: ConfigFolder, opts?: {
|
|
82
|
+
env?: NodeJS.ProcessEnv;
|
|
83
|
+
}): Promise<{
|
|
84
|
+
status: 'removed' | 'absent' | 'no-claude' | 'failed';
|
|
85
|
+
detail?: string;
|
|
86
|
+
}>;
|
|
87
|
+
/** Remove-then-add one named entry (migration). `entry` must be token-free. Local scope runs in `cwd`. */
|
|
88
|
+
export declare function replaceEntry(folder: ConfigFolder, name: string, scope: 'user' | 'local', entry: Record<string, unknown>, opts?: {
|
|
89
|
+
cwd?: string;
|
|
90
|
+
env?: NodeJS.ProcessEnv;
|
|
91
|
+
}): Promise<RegisterResult>;
|
|
92
|
+
/** `claude --help` probe (P6.1 step 4). */
|
|
93
|
+
export declare function probeClaude(opts?: {
|
|
94
|
+
env?: NodeJS.ProcessEnv;
|
|
95
|
+
}): Promise<{
|
|
96
|
+
ok: boolean;
|
|
97
|
+
missing: boolean;
|
|
98
|
+
supportsMcpConfig: boolean;
|
|
99
|
+
subcommands: string[];
|
|
100
|
+
reason?: string;
|
|
101
|
+
}>;
|
|
102
|
+
export interface Clash {
|
|
103
|
+
scope: 'local' | 'project';
|
|
104
|
+
file: string;
|
|
105
|
+
path: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* A server named `tacit` that would load next to ours: local-scope entries for the cwd and each ancestor
|
|
109
|
+
* (both the given and the realpath form), and `.mcp.json` in the cwd and each ancestor up to `$HOME`.
|
|
110
|
+
*/
|
|
111
|
+
export declare function findClashes(cwd: string, folder: ConfigFolder): Clash[];
|
|
112
|
+
export type TokenShape = 'jwt' | 'hmac' | 'legacy' | 'iam' | 'api_key' | 'unknown';
|
|
113
|
+
/** Shape only, for reporting; the value is never printed. */
|
|
114
|
+
export declare function tokenShape(t: string): TokenShape;
|
|
115
|
+
export interface LegacyEntry {
|
|
116
|
+
scope: 'user' | 'local' | 'project' | 'legacy-file';
|
|
117
|
+
folder: ConfigFolder;
|
|
118
|
+
file: string;
|
|
119
|
+
/** Project path for local scope, folder of the `.mcp.json` for project scope. */
|
|
120
|
+
projectPath?: string;
|
|
121
|
+
name: string;
|
|
122
|
+
entry: Record<string, unknown>;
|
|
123
|
+
/** In memory only. Never log, print or pass on. */
|
|
124
|
+
token: string;
|
|
125
|
+
shape: TokenShape;
|
|
126
|
+
apiUrl?: string;
|
|
127
|
+
workspaceId?: string;
|
|
128
|
+
gitTracked: boolean;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Every token-bearing TACIT server in: user and local scope of each folder, the `.mcp.json` of the cwd and
|
|
132
|
+
* its ancestors up to `$HOME`, and the legacy `~/.claude/mcp.json`. Read only.
|
|
133
|
+
*/
|
|
134
|
+
export declare function scanLegacyEntries(folders: ConfigFolder[], cwd: string): Promise<LegacyEntry[]>;
|
|
135
|
+
/** Backup files Claude Code keeps that still contain a `TACIT_TOKEN` key. */
|
|
136
|
+
export declare function countBackupsWithToken(folder: ConfigFolder): {
|
|
137
|
+
total: number;
|
|
138
|
+
withToken: number;
|
|
139
|
+
};
|