@askthew/mcp-plugin 0.4.10 → 0.4.11

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/install.d.ts CHANGED
@@ -1,44 +1,22 @@
1
1
  export type SupportedHostType = "claude_code" | "codex" | "cursor";
2
- interface HostConfigInput {
2
+ export interface HostConfigInput {
3
3
  hostType: SupportedHostType;
4
- token?: string;
5
- apiUrl: string;
6
- serverName: string;
7
- clientId?: string;
8
- clientLabel?: string;
9
- free?: boolean;
10
- email?: string;
4
+ apiUrl?: string;
5
+ serverName?: string;
11
6
  cwd?: string;
12
7
  serverEntrypoint?: string;
13
8
  }
14
- interface InstallHostConfigInput extends HostConfigInput {
9
+ export interface InstallHostConfigInput extends HostConfigInput {
15
10
  dryRun?: boolean;
16
11
  homeDirectory?: string;
17
- cwd?: string;
18
12
  }
19
- interface UninstallHostConfigInput {
13
+ export interface InstructionInstallInput {
20
14
  hostType: SupportedHostType;
21
- serverName?: string;
22
- cwds?: string[];
23
- dryRun?: boolean;
24
- homeDirectory?: string;
25
15
  cwd?: string;
16
+ dryRun?: boolean;
26
17
  }
27
- export declare const DEFAULT_FREE_SERVER_NAME = "askthew-free";
28
- export declare const DEFAULT_WORKSPACE_SERVER_NAME = "askthew-workspace";
29
- export interface InstallReceipt {
30
- hostType: SupportedHostType;
31
- serverName: string;
32
- settingsPath: string;
33
- cwd: string;
34
- instructionPaths: string[];
35
- dataDir: string;
36
- serverEntrypoint?: string;
37
- installedAt: string;
38
- packageVersion?: string;
39
- }
18
+ export declare const DEFAULT_SERVER_NAME = "askthew";
40
19
  export declare function packageVersion(): string;
41
- export declare function defaultServerNameForTier(free?: boolean): "askthew-free" | "askthew-workspace";
42
20
  export declare function resolveSettingsPath(input: {
43
21
  hostType: SupportedHostType;
44
22
  homeDirectory?: string;
@@ -50,140 +28,76 @@ export declare function createServerEntry(input: HostConfigInput): {
50
28
  ASKTHEW_SERVICE_NAME?: string | undefined;
51
29
  ASKTHEW_APP_PATH?: string | undefined;
52
30
  ASKTHEW_REPO_ROOT?: string | undefined;
53
- ASKTHEW_HOST_TYPE: SupportedHostType;
54
- ASKTHEW_SERVER_NAME: string;
55
- ASKTHEW_REPO_NAME: string;
56
- ASKTHEW_CLIENT_LABEL?: string | undefined;
57
- ASKTHEW_CLIENT_ID?: string | undefined;
58
- ASKTHEW_FREE_MODE: string;
59
31
  ASKTHEW_API_URL: string;
60
- } | {
61
- ASKTHEW_SERVICE_NAME?: string | undefined;
62
- ASKTHEW_APP_PATH?: string | undefined;
63
- ASKTHEW_REPO_ROOT?: string | undefined;
64
32
  ASKTHEW_HOST_TYPE: SupportedHostType;
65
- ASKTHEW_SERVER_NAME: string;
66
33
  ASKTHEW_REPO_NAME: string;
67
- ASKTHEW_CLIENT_LABEL?: string | undefined;
68
- ASKTHEW_CLIENT_ID?: string | undefined;
69
- ASKTHEW_INSTALL_TOKEN: string;
70
- ASKTHEW_API_URL: string;
71
34
  };
72
35
  };
73
36
  export declare function createHostConfigSnippet(input: HostConfigInput): {
74
37
  settingsPath: string;
75
38
  snippet: string;
76
39
  json: string;
40
+ language: "toml";
77
41
  } | {
78
42
  settingsPath: string;
79
43
  snippet: {
80
44
  mcpServers: {
81
- [input.serverName]: {
45
+ [x: string]: {
82
46
  command: string;
83
47
  args: string[];
84
48
  env: {
85
49
  ASKTHEW_SERVICE_NAME?: string | undefined;
86
50
  ASKTHEW_APP_PATH?: string | undefined;
87
51
  ASKTHEW_REPO_ROOT?: string | undefined;
88
- ASKTHEW_HOST_TYPE: SupportedHostType;
89
- ASKTHEW_SERVER_NAME: string;
90
- ASKTHEW_REPO_NAME: string;
91
- ASKTHEW_CLIENT_LABEL?: string | undefined;
92
- ASKTHEW_CLIENT_ID?: string | undefined;
93
- ASKTHEW_FREE_MODE: string;
94
52
  ASKTHEW_API_URL: string;
95
- } | {
96
- ASKTHEW_SERVICE_NAME?: string | undefined;
97
- ASKTHEW_APP_PATH?: string | undefined;
98
- ASKTHEW_REPO_ROOT?: string | undefined;
99
53
  ASKTHEW_HOST_TYPE: SupportedHostType;
100
- ASKTHEW_SERVER_NAME: string;
101
54
  ASKTHEW_REPO_NAME: string;
102
- ASKTHEW_CLIENT_LABEL?: string | undefined;
103
- ASKTHEW_CLIENT_ID?: string | undefined;
104
- ASKTHEW_INSTALL_TOKEN: string;
105
- ASKTHEW_API_URL: string;
106
55
  };
107
56
  };
108
57
  };
109
58
  };
110
59
  json: string;
60
+ language: "json";
111
61
  };
112
- export declare function mergeHostSettings(input: HostConfigInput & {
113
- existingSettings: unknown;
114
- }): {
115
- mcpServers: {
116
- [x: string]: unknown;
117
- };
118
- };
119
- export declare function formatInstallCommand(input: HostConfigInput): string;
120
- export declare function verificationNextStep(hostType: SupportedHostType): string;
121
62
  export declare function installHostConfig(input: InstallHostConfigInput): {
122
63
  settingsPath: string;
123
64
  json: string;
124
65
  wroteFile: boolean;
125
- nextStep: string;
126
- };
127
- export declare function readInstallReceipts(env?: NodeJS.ProcessEnv): InstallReceipt[];
128
- export declare function writeInstallReceipt(receipt: Omit<InstallReceipt, "dataDir" | "installedAt"> & {
129
- dataDir?: string;
130
- installedAt?: string;
131
- }, env?: NodeJS.ProcessEnv): InstallReceipt;
132
- export declare function findInstallReceipts(input: {
133
- hostType: SupportedHostType;
134
- serverName?: string;
135
- }, env?: NodeJS.ProcessEnv): InstallReceipt[];
136
- export declare function removeInstallReceipts(input: {
137
- hostType: SupportedHostType;
138
- serverName?: string;
139
- cwd?: string;
140
- }, env?: NodeJS.ProcessEnv): number;
141
- export declare function uninstallHostConfig(input: UninstallHostConfigInput): {
142
- settingsPath: string;
143
- json: string;
144
- removedServerName: string;
145
- removedServerNames: string[];
146
- foundConfigFile: boolean;
147
- removedServer: boolean;
148
- wroteFile: boolean;
149
66
  };
150
- export declare function upgradePinnedHostConfig(input: {
67
+ export declare function uninstallHostConfig(input: {
151
68
  hostType: SupportedHostType;
152
69
  serverName?: string;
153
- packageSpec?: string;
154
70
  dryRun?: boolean;
155
71
  homeDirectory?: string;
156
72
  cwd?: string;
157
- cwds?: string[];
158
73
  }): {
159
74
  settingsPath: string;
160
- json: string;
161
- packageSpec: string;
162
- foundConfigFile: boolean;
163
- upgradedServer: boolean;
164
- upgradedServerNames: string[];
75
+ removed: boolean;
165
76
  wroteFile: boolean;
166
77
  };
167
- export declare function sendInstallHeartbeat(input: HostConfigInput & {
168
- cwd?: string;
169
- fetchImpl?: typeof fetch;
170
- }): Promise<boolean>;
171
- export declare function installBehaviorInstructions(input: {
172
- hostType: SupportedHostType;
173
- cwd?: string;
174
- dryRun?: boolean;
175
- }): {
176
- path: string;
177
- paths: string[];
78
+ export declare function instructionFileForHost(hostType: SupportedHostType, cwd?: string): string;
79
+ export declare function installBehaviorInstructions(input: InstructionInstallInput): string;
80
+ export declare function writeBehaviorInstructions(input: InstructionInstallInput): {
81
+ filePath: string;
82
+ text: string;
178
83
  wroteFile: boolean;
179
- content: string;
180
84
  };
181
- export declare function uninstallBehaviorInstructions(input: {
85
+ export declare function writeInstallMetadata(input: {
182
86
  hostType: SupportedHostType;
183
- cwd?: string;
184
- dryRun?: boolean;
87
+ apiUrl?: string;
88
+ tier?: "free" | "paid";
89
+ workspaceId?: string | null;
90
+ env?: NodeJS.ProcessEnv;
185
91
  }): {
186
- paths: string[];
187
- wroteFile: boolean;
92
+ host: SupportedHostType;
93
+ version: string;
94
+ api_url: string;
95
+ tier: "free" | "paid";
96
+ workspace_id: string | null;
97
+ last_sync: string;
188
98
  };
189
- export {};
99
+ export declare function formatInstallCommand(input: {
100
+ hostType: SupportedHostType;
101
+ bindToken?: string;
102
+ }): string;
103
+ export declare function dataDirSummary(env?: NodeJS.ProcessEnv): string;