@jupyterlite/ai 0.18.0 → 0.19.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.
Files changed (108) hide show
  1. package/lib/chat-commands/clear.d.ts +1 -0
  2. package/lib/chat-commands/index.d.ts +1 -0
  3. package/lib/chat-commands/skills.d.ts +2 -1
  4. package/lib/chat-model-handler.d.ts +3 -1
  5. package/lib/chat-model.d.ts +46 -8
  6. package/lib/chat-model.js +51 -21
  7. package/lib/completion/completion-provider.d.ts +3 -1
  8. package/lib/completion/completion-provider.js +1 -2
  9. package/lib/completion/index.d.ts +1 -0
  10. package/lib/components/clear-button.d.ts +1 -0
  11. package/lib/components/clear-button.js +3 -4
  12. package/lib/components/completion-status.d.ts +1 -0
  13. package/lib/components/completion-status.js +5 -4
  14. package/lib/components/index.d.ts +1 -0
  15. package/lib/components/model-select.d.ts +1 -0
  16. package/lib/components/model-select.js +62 -67
  17. package/lib/components/save-button.d.ts +1 -0
  18. package/lib/components/save-button.js +4 -5
  19. package/lib/components/stop-button.d.ts +1 -0
  20. package/lib/components/stop-button.js +3 -4
  21. package/lib/components/tool-select.d.ts +3 -1
  22. package/lib/components/tool-select.js +47 -60
  23. package/lib/components/usage-display.d.ts +4 -2
  24. package/lib/components/usage-display.js +50 -61
  25. package/lib/diff-manager.d.ts +3 -1
  26. package/lib/index.d.ts +3 -2
  27. package/lib/index.js +28 -17
  28. package/lib/models/settings-model.d.ts +3 -1
  29. package/lib/rendered-message-outputarea.d.ts +1 -0
  30. package/lib/tokens.d.ts +18 -640
  31. package/lib/tokens.js +2 -31
  32. package/lib/widgets/ai-settings.d.ts +3 -1
  33. package/lib/widgets/ai-settings.js +185 -349
  34. package/lib/widgets/main-area-chat.d.ts +1 -0
  35. package/lib/widgets/provider-config-dialog.d.ts +2 -1
  36. package/lib/widgets/provider-config-dialog.js +102 -167
  37. package/package.json +111 -258
  38. package/src/chat-commands/skills.ts +2 -2
  39. package/src/chat-model-handler.ts +6 -4
  40. package/src/chat-model.ts +66 -19
  41. package/src/completion/completion-provider.ts +6 -6
  42. package/src/components/clear-button.tsx +0 -2
  43. package/src/components/completion-status.tsx +2 -2
  44. package/src/components/model-select.tsx +1 -1
  45. package/src/components/stop-button.tsx +0 -2
  46. package/src/components/tool-select.tsx +10 -9
  47. package/src/components/usage-display.tsx +4 -2
  48. package/src/diff-manager.ts +4 -3
  49. package/src/index.ts +62 -44
  50. package/src/models/settings-model.ts +6 -6
  51. package/src/tokens.ts +23 -788
  52. package/src/widgets/ai-settings.tsx +14 -11
  53. package/src/widgets/provider-config-dialog.tsx +8 -8
  54. package/LICENSE +0 -30
  55. package/README.md +0 -49
  56. package/lib/agent.d.ts +0 -280
  57. package/lib/agent.js +0 -1103
  58. package/lib/icons.d.ts +0 -3
  59. package/lib/icons.js +0 -8
  60. package/lib/providers/built-in-providers.d.ts +0 -21
  61. package/lib/providers/built-in-providers.js +0 -233
  62. package/lib/providers/generated-model-info.d.ts +0 -8
  63. package/lib/providers/generated-model-info.js +0 -502
  64. package/lib/providers/model-info.d.ts +0 -6
  65. package/lib/providers/model-info.js +0 -91
  66. package/lib/providers/models.d.ts +0 -37
  67. package/lib/providers/models.js +0 -28
  68. package/lib/providers/provider-registry.d.ts +0 -49
  69. package/lib/providers/provider-registry.js +0 -72
  70. package/lib/providers/provider-tools.d.ts +0 -36
  71. package/lib/providers/provider-tools.js +0 -93
  72. package/lib/skills/index.d.ts +0 -4
  73. package/lib/skills/index.js +0 -7
  74. package/lib/skills/parse-skill.d.ts +0 -25
  75. package/lib/skills/parse-skill.js +0 -69
  76. package/lib/skills/skill-loader.d.ts +0 -25
  77. package/lib/skills/skill-loader.js +0 -133
  78. package/lib/skills/skill-registry.d.ts +0 -31
  79. package/lib/skills/skill-registry.js +0 -100
  80. package/lib/skills/types.d.ts +0 -29
  81. package/lib/skills/types.js +0 -5
  82. package/lib/tools/commands.d.ts +0 -11
  83. package/lib/tools/commands.js +0 -154
  84. package/lib/tools/skills.d.ts +0 -9
  85. package/lib/tools/skills.js +0 -73
  86. package/lib/tools/tool-registry.d.ts +0 -35
  87. package/lib/tools/tool-registry.js +0 -55
  88. package/lib/tools/web.d.ts +0 -8
  89. package/lib/tools/web.js +0 -196
  90. package/src/agent.ts +0 -1431
  91. package/src/icons.ts +0 -11
  92. package/src/providers/built-in-providers.ts +0 -241
  93. package/src/providers/generated-model-info.ts +0 -508
  94. package/src/providers/model-info.ts +0 -145
  95. package/src/providers/models.ts +0 -76
  96. package/src/providers/provider-registry.ts +0 -88
  97. package/src/providers/provider-tools.ts +0 -179
  98. package/src/skills/index.ts +0 -14
  99. package/src/skills/parse-skill.ts +0 -91
  100. package/src/skills/skill-loader.ts +0 -175
  101. package/src/skills/skill-registry.ts +0 -137
  102. package/src/skills/types.ts +0 -37
  103. package/src/tools/commands.ts +0 -210
  104. package/src/tools/skills.ts +0 -84
  105. package/src/tools/tool-registry.ts +0 -63
  106. package/src/tools/web.ts +0 -238
  107. package/src/types.d.ts +0 -4
  108. package/style/icons/jupyternaut-lite.svg +0 -7
@@ -1,37 +0,0 @@
1
- /*
2
- * Copyright (c) Jupyter Development Team.
3
- * Distributed under the terms of the Modified BSD License.
4
- */
5
-
6
- /**
7
- * Summary information about a skill.
8
- */
9
- export interface ISkillSummary {
10
- name: string;
11
- description: string;
12
- }
13
-
14
- /**
15
- * Full skill definition loaded from a SKILL.md file or registry.
16
- */
17
- export interface ISkillDefinition extends ISkillSummary {
18
- instructions: string;
19
- resources: string[];
20
- }
21
-
22
- /**
23
- * Result for loading a skill resource.
24
- */
25
- export interface ISkillResourceResult {
26
- name: string;
27
- resource: string;
28
- content?: string;
29
- error?: string;
30
- }
31
-
32
- /**
33
- * Skill registration payload for the skill registry.
34
- */
35
- export interface ISkillRegistration extends ISkillDefinition {
36
- loadResource?: (resource: string) => Promise<ISkillResourceResult>;
37
- }
@@ -1,210 +0,0 @@
1
- import { CommandRegistry } from '@lumino/commands';
2
- import { Widget } from '@lumino/widgets';
3
- import { tool } from 'ai';
4
- import { z } from 'zod';
5
- import type { IAISettingsModel, ITool } from '../tokens';
6
-
7
- interface ICommandEntry {
8
- id: string;
9
- label?: string;
10
- caption?: string;
11
- description?: string;
12
- args?: any;
13
- }
14
-
15
- interface ISearchableField {
16
- value?: string;
17
- weight: number;
18
- }
19
-
20
- /**
21
- * Search commands using case-insensitive term matching across command metadata.
22
- *
23
- * Multi-word queries are split into individual terms, and every term must be
24
- * contained in at least one searchable field. Results are ranked by stronger
25
- * field matches while keeping a stable fallback order.
26
- */
27
- function searchCommands(
28
- commands: ICommandEntry[],
29
- query: string
30
- ): ICommandEntry[] {
31
- const normalizedQuery = query.trim().toLowerCase();
32
- if (!normalizedQuery) {
33
- return commands;
34
- }
35
-
36
- const terms = normalizedQuery.split(/\s+/).filter(Boolean);
37
-
38
- return commands
39
- .map((command, index) => {
40
- const fields: ISearchableField[] = [
41
- { value: command.label, weight: 4 },
42
- { value: command.caption, weight: 3 },
43
- { value: command.id, weight: 2 },
44
- { value: command.description, weight: 1 }
45
- ];
46
-
47
- const normalizedFields = fields.map(field => ({
48
- normalizedValue: field.value?.toLowerCase() ?? '',
49
- weight: field.weight
50
- }));
51
-
52
- const matchesAllTerms = terms.every(term =>
53
- normalizedFields.some(field => field.normalizedValue.includes(term))
54
- );
55
-
56
- if (!matchesAllTerms) {
57
- return null;
58
- }
59
-
60
- const score = normalizedFields.reduce((total, field) => {
61
- if (!field.normalizedValue) {
62
- return total;
63
- }
64
-
65
- let fieldScore = 0;
66
- if (field.normalizedValue.includes(normalizedQuery)) {
67
- fieldScore += field.weight * 4;
68
- } else {
69
- fieldScore +=
70
- terms.filter(term => field.normalizedValue.includes(term)).length *
71
- field.weight;
72
- }
73
-
74
- return total + fieldScore;
75
- }, 0);
76
-
77
- return { command, index, score };
78
- })
79
- .filter(
80
- (
81
- result
82
- ): result is {
83
- command: ICommandEntry;
84
- index: number;
85
- score: number;
86
- } => result !== null
87
- )
88
- .sort((a, b) => b.score - a.score || a.index - b.index)
89
- .map(result => result.command);
90
- }
91
-
92
- /**
93
- * Create a tool to discover all available commands and their metadata
94
- */
95
- export function createDiscoverCommandsTool(commands: CommandRegistry): ITool {
96
- return tool({
97
- title: 'Discover Commands',
98
- description:
99
- 'Discover all available JupyterLab commands with their metadata, arguments, and descriptions',
100
- inputSchema: z.object({
101
- query: z
102
- .string()
103
- .optional()
104
- .nullable()
105
- .describe(
106
- 'Optional search query to filter commands. Supports multi-word queries (whitespace-separated) by requiring each word to be contained in the command id, label, caption, or description. Leave empty to list all commands.'
107
- )
108
- }),
109
- execute: async (input: { query?: string | null }) => {
110
- const { query } = input;
111
-
112
- // Build the full command list first.
113
- const commandIds = commands.listCommands();
114
- const allCommands: ICommandEntry[] = [];
115
-
116
- for (const id of commandIds) {
117
- const description = await commands.describedBy(id);
118
- const label = commands.label(id);
119
- const caption = commands.caption(id);
120
- const usage = commands.usage(id);
121
-
122
- allCommands.push({
123
- id,
124
- label: label || undefined,
125
- caption: caption || undefined,
126
- description: usage || undefined,
127
- args: description?.args || undefined
128
- });
129
- }
130
-
131
- const commandList = query
132
- ? searchCommands(allCommands, query)
133
- : allCommands;
134
-
135
- return {
136
- success: true,
137
- commandCount: commandList.length,
138
- commands: commandList
139
- };
140
- }
141
- });
142
- }
143
-
144
- /**
145
- * Create a tool to execute a specific JupyterLab command.
146
- * Commands in the settings' commandsRequiringApproval list will need approval.
147
- */
148
- export function createExecuteCommandTool(
149
- commands: CommandRegistry,
150
- settingsModel: IAISettingsModel
151
- ): ITool {
152
- return tool({
153
- title: 'Execute Command',
154
- description:
155
- 'Execute a specific JupyterLab command with optional arguments',
156
- inputSchema: z.object({
157
- commandId: z.string().describe('The ID of the command to execute'),
158
- args: z
159
- .record(z.string(), z.unknown())
160
- .optional()
161
- .describe(
162
- 'Optional arguments object to pass to the command (must be an object, not a string)'
163
- )
164
- }),
165
- needsApproval: (input: { commandId: string; args?: any }) => {
166
- const commandsRequiringApproval =
167
- settingsModel.config.commandsRequiringApproval || [];
168
- return commandsRequiringApproval.includes(input.commandId);
169
- },
170
- execute: async (input: { commandId: string; args?: any }) => {
171
- const { commandId, args } = input;
172
-
173
- // Check if command exists
174
- if (!commands.hasCommand(commandId)) {
175
- return {
176
- success: false,
177
- error: `Command '${commandId}' does not exist. Use 'discover_commands' to see available commands.`
178
- };
179
- }
180
-
181
- // Execute the command
182
- const result = await commands.execute(commandId, args);
183
-
184
- // Handle actual Lumino widgets specially by extracting id and title.
185
- // Avoid collapsing plain command results that happen to contain an `id` field.
186
- let serializedResult;
187
- if (result instanceof Widget) {
188
- serializedResult = {
189
- id: result.id,
190
- title: result.title?.label || result.title
191
- };
192
- } else {
193
- // For other objects, try JSON serialization with fallback
194
- try {
195
- serializedResult = JSON.parse(JSON.stringify(result));
196
- } catch {
197
- serializedResult = result
198
- ? '[Complex object - cannot serialize]'
199
- : 'Command executed successfully';
200
- }
201
- }
202
-
203
- return {
204
- success: true,
205
- commandId,
206
- result: serializedResult
207
- };
208
- }
209
- });
210
- }
@@ -1,84 +0,0 @@
1
- import { tool } from 'ai';
2
- import { z } from 'zod';
3
- import { ISkillRegistry, ITool } from '../tokens';
4
-
5
- /**
6
- * Create a tool to discover available skills and their summaries.
7
- */
8
- export function createDiscoverSkillsTool(skillRegistry: ISkillRegistry): ITool {
9
- return tool({
10
- title: 'Discover Skills',
11
- description:
12
- 'Discover available agent skills with their names and descriptions',
13
- inputSchema: z.object({
14
- query: z
15
- .string()
16
- .optional()
17
- .nullable()
18
- .describe('Optional search query to filter skills')
19
- }),
20
- execute: async (input: { query?: string | null }) => {
21
- const filtered = skillRegistry.listSkills(input.query ?? undefined);
22
-
23
- return {
24
- success: true,
25
- skillCount: filtered.length,
26
- skills: filtered
27
- };
28
- }
29
- });
30
- }
31
-
32
- /**
33
- * Create a tool to load skill instructions or a bundled resource.
34
- */
35
- export function createLoadSkillTool(skillRegistry: ISkillRegistry): ITool {
36
- return tool({
37
- title: 'Load Skill',
38
- description:
39
- 'Load a skill definition or a specific resource file bundled with a skill',
40
- inputSchema: z.object({
41
- name: z.string().describe('The name of the skill to load'),
42
- resource: z
43
- .string()
44
- .optional()
45
- .nullable()
46
- .describe(
47
- 'Optional resource path to load from the skill (e.g. references/REFERENCE.md)'
48
- )
49
- }),
50
- execute: async (input: { name: string; resource?: string | null }) => {
51
- const { name, resource } = input;
52
-
53
- if (resource) {
54
- const result = await skillRegistry.getSkillResource(name, resource);
55
- if (result.error) {
56
- return {
57
- success: false,
58
- ...result
59
- };
60
- }
61
- return {
62
- success: true,
63
- ...result
64
- };
65
- }
66
-
67
- const skill = skillRegistry.getSkill(name);
68
- if (!skill) {
69
- return {
70
- success: false,
71
- error: `Skill not found: ${name}`
72
- };
73
- }
74
-
75
- return {
76
- success: true,
77
- name: skill.name,
78
- description: skill.description,
79
- instructions: skill.instructions,
80
- ...(skill.resources.length > 0 && { resources: skill.resources })
81
- };
82
- }
83
- });
84
- }
@@ -1,63 +0,0 @@
1
- import { ISignal, Signal } from '@lumino/signaling';
2
- import { ITool, IToolRegistry, INamedTool } from '../tokens';
3
-
4
- /**
5
- * Implementation of the tool registry for managing AI tools
6
- */
7
- export class ToolRegistry implements IToolRegistry {
8
- /**
9
- * The registered tools as a record (name -> tool mapping).
10
- */
11
- get tools(): Record<string, ITool> {
12
- return { ...this._tools }; // Return a copy to prevent external modification
13
- }
14
-
15
- /**
16
- * The registered named tools array.
17
- */
18
- get namedTools(): INamedTool[] {
19
- return Object.entries(this._tools).map(([name, tool]) => ({ name, tool }));
20
- }
21
-
22
- /**
23
- * A signal triggered when the tools have changed.
24
- */
25
- get toolsChanged(): ISignal<IToolRegistry, void> {
26
- return this._toolsChanged;
27
- }
28
-
29
- /**
30
- * Add a new tool to the registry.
31
- */
32
- add(name: string, tool: ITool): void {
33
- this._tools[name] = tool;
34
- this._toolsChanged.emit();
35
- }
36
-
37
- /**
38
- * Get a tool for a given name.
39
- * Return null if the name is not provided or if there is no registered tool with the
40
- * given name.
41
- */
42
- get(name: string | null): ITool | null {
43
- if (name === null) {
44
- return null;
45
- }
46
- return this._tools[name] || null;
47
- }
48
-
49
- /**
50
- * Remove a tool from the registry by name.
51
- */
52
- remove(name: string): boolean {
53
- if (name in this._tools) {
54
- delete this._tools[name];
55
- this._toolsChanged.emit();
56
- return true;
57
- }
58
- return false;
59
- }
60
-
61
- private _tools: Record<string, ITool> = {};
62
- private _toolsChanged = new Signal<IToolRegistry, void>(this);
63
- }
package/src/tools/web.ts DELETED
@@ -1,238 +0,0 @@
1
- import { tool } from 'ai';
2
- import { z } from 'zod';
3
- import { ITool } from '../tokens';
4
-
5
- const DEFAULT_MAX_CONTENT_CHARS = 20000;
6
- const MAX_ALLOWED_CONTENT_CHARS = 100000;
7
- const DEFAULT_TIMEOUT_MS = 20000;
8
- const MAX_TIMEOUT_MS = 120000;
9
-
10
- interface IReadBodyResult {
11
- content: string;
12
- isTruncated: boolean;
13
- totalChars: number;
14
- totalCharsExact: boolean;
15
- }
16
-
17
- /**
18
- * Read response body text with a character cap.
19
- *
20
- * Stops early once the cap is reached to avoid buffering arbitrarily large
21
- * payloads in memory.
22
- */
23
- async function readResponseText(
24
- response: Response,
25
- maxContentChars: number
26
- ): Promise<IReadBodyResult> {
27
- if (!response.body) {
28
- const body = await response.text();
29
- return {
30
- content: body.slice(0, maxContentChars),
31
- isTruncated: body.length > maxContentChars,
32
- totalChars: body.length,
33
- totalCharsExact: true
34
- };
35
- }
36
-
37
- const reader = response.body.getReader();
38
- const decoder = new TextDecoder();
39
- let content = '';
40
- let totalChars = 0;
41
- let isTruncated = false;
42
- let done = false;
43
-
44
- while (!done) {
45
- const readResult = await reader.read();
46
- done = readResult.done;
47
- if (done) {
48
- continue;
49
- }
50
-
51
- const chunk = decoder.decode(readResult.value, { stream: true });
52
- if (!chunk) {
53
- continue;
54
- }
55
-
56
- totalChars += chunk.length;
57
-
58
- if (!isTruncated) {
59
- const remaining = maxContentChars - content.length;
60
- if (chunk.length <= remaining) {
61
- content += chunk;
62
- } else {
63
- content += chunk.slice(0, remaining);
64
- isTruncated = true;
65
- }
66
- }
67
-
68
- if (isTruncated) {
69
- await reader.cancel();
70
- return {
71
- content,
72
- isTruncated: true,
73
- totalChars,
74
- totalCharsExact: false
75
- };
76
- }
77
- }
78
-
79
- const tail = decoder.decode();
80
- if (tail) {
81
- totalChars += tail.length;
82
- const remaining = maxContentChars - content.length;
83
- if (tail.length <= remaining) {
84
- content += tail;
85
- } else {
86
- content += tail.slice(0, remaining);
87
- isTruncated = true;
88
- }
89
- }
90
-
91
- return {
92
- content,
93
- isTruncated,
94
- totalChars,
95
- totalCharsExact: true
96
- };
97
- }
98
-
99
- /**
100
- * Create a browser-native URL fetch tool.
101
- *
102
- * This is best-effort and subject to normal browser constraints (CORS, CSP,
103
- * mixed content, bot protections).
104
- */
105
- export function createBrowserFetchTool(): ITool {
106
- return tool({
107
- title: 'Browser Fetch',
108
- description:
109
- 'Fetch a URL directly from the browser using HTTP GET for exact URL inspection when CORS/access permits.',
110
- inputSchema: z.object({
111
- url: z.string().describe('HTTP(S) URL to fetch'),
112
- maxContentChars: z
113
- .number()
114
- .int()
115
- .min(1)
116
- .max(MAX_ALLOWED_CONTENT_CHARS)
117
- .optional()
118
- .describe(
119
- `Maximum number of response characters to return (default: ${DEFAULT_MAX_CONTENT_CHARS})`
120
- ),
121
- timeoutMs: z
122
- .number()
123
- .int()
124
- .min(1000)
125
- .max(MAX_TIMEOUT_MS)
126
- .optional()
127
- .describe(
128
- `Timeout in milliseconds (default: ${DEFAULT_TIMEOUT_MS}, max: ${MAX_TIMEOUT_MS})`
129
- )
130
- }),
131
- execute: async (input: {
132
- url: string;
133
- maxContentChars?: number;
134
- timeoutMs?: number;
135
- }) => {
136
- const maxContentChars = Math.min(
137
- input.maxContentChars ?? DEFAULT_MAX_CONTENT_CHARS,
138
- MAX_ALLOWED_CONTENT_CHARS
139
- );
140
- const timeoutMs = Math.min(
141
- input.timeoutMs ?? DEFAULT_TIMEOUT_MS,
142
- MAX_TIMEOUT_MS
143
- );
144
-
145
- let parsedUrl: URL;
146
- try {
147
- parsedUrl = new URL(input.url);
148
- } catch {
149
- return {
150
- success: false,
151
- errorType: 'invalid_url',
152
- error: 'Invalid URL format',
153
- url: input.url
154
- };
155
- }
156
-
157
- if (!['http:', 'https:'].includes(parsedUrl.protocol)) {
158
- return {
159
- success: false,
160
- errorType: 'unsupported_protocol',
161
- error: 'Only http:// and https:// URLs are supported',
162
- url: input.url
163
- };
164
- }
165
-
166
- const controller = new AbortController();
167
- const timeoutHandle = setTimeout(() => controller.abort(), timeoutMs);
168
-
169
- try {
170
- const response = await fetch(parsedUrl.toString(), {
171
- method: 'GET',
172
- credentials: 'omit',
173
- redirect: 'follow',
174
- signal: controller.signal,
175
- headers: {
176
- Accept:
177
- 'text/html,text/plain,application/json,text/markdown,*/*;q=0.8'
178
- }
179
- });
180
-
181
- const contentType = response.headers.get('content-type') || '';
182
- const contentLength = response.headers.get('content-length');
183
- const body = await readResponseText(response, maxContentChars);
184
- const success = response.ok;
185
-
186
- return {
187
- success,
188
- url: response.url,
189
- requestedUrl: parsedUrl.toString(),
190
- status: response.status,
191
- statusText: response.statusText,
192
- contentType,
193
- contentLength,
194
- ...(success
195
- ? {}
196
- : {
197
- errorType: 'http_error',
198
- error: `HTTP ${response.status} ${response.statusText}`
199
- }),
200
- isTruncated: body.isTruncated,
201
- returnedChars: body.content.length,
202
- totalChars: body.totalChars,
203
- totalCharsExact: body.totalCharsExact,
204
- content: body.content,
205
- limitations:
206
- 'Browser fetch is subject to CORS, site bot protections, and browser network policy.'
207
- };
208
- } catch (error) {
209
- if ((error as Error).name === 'AbortError') {
210
- return {
211
- success: false,
212
- errorType: 'timeout',
213
- error: `Request timed out after ${timeoutMs} ms`,
214
- url: parsedUrl.toString()
215
- };
216
- }
217
-
218
- return {
219
- success: false,
220
- errorType: 'network_or_cors',
221
- error:
222
- error instanceof Error && error.message
223
- ? error.message
224
- : 'Fetch failed',
225
- url: parsedUrl.toString(),
226
- likelyCauses: [
227
- 'CORS blocked by the target website',
228
- 'DNS/network resolution failure',
229
- 'TLS/certificate issue',
230
- 'Target server rejected browser access'
231
- ]
232
- };
233
- } finally {
234
- clearTimeout(timeoutHandle);
235
- }
236
- }
237
- });
238
- }
package/src/types.d.ts DELETED
@@ -1,4 +0,0 @@
1
- declare module '*.svg' {
2
- const content: string;
3
- export default content;
4
- }
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg fill="none" version="1.1" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg">
3
- <g>
4
- <circle cx="19" cy="19" r="19" fill="#f7dc1e"/>
5
- <path d="m19.948 6.8365c0.6344-0.21603 1.0908-0.81693 1.0908-1.5244 0-0.88916-0.7208-1.61-1.61-1.61s-1.61 0.72081-1.61 1.61c0 0.70739 0.4562 1.3082 1.0905 1.5243v1.1674h-0.5394c-6.2858 0-11.399 5.1132-11.399 11.399 0 6.2859 5.1133 11.399 11.399 11.399h1.398c6.2859 0 11.399-5.1132 11.399-11.399 0-6.2253-5.0159-11.301-11.219-11.397v-1.1687zm-1.5781 22.163h1.398c5.3669 0 9.7303-4.9787 9.7303-8.3455 0-5.3669-4.3634-9.7303-9.7303-9.7303h-1.398c-5.3668 0-9.7302 4.3634-9.7302 9.7303 0 3.3668 4.3634 8.3455 9.7302 8.3455zm14.522-5.003c0.7341 0 0.7375-0.5123 0.7422-1.2408v-1e-4c0.0012-0.1847 0.0025-0.3833 0.0158-0.591 0.0573-0.8624 0.0739-1.7008 0.0573-2.4892l-0.0033-0.119c-0.0373-1.3318-0.0436-1.5579-1.3047-1.8058l-0.1479-0.0246 0.0015 0.0495c0.0076 0.2465 0.0151 0.493 0.0151 0.739 0 1.8018-0.2712 3.5478-0.773 5.189-0.1363 0.4459 0.3433 0.8629 0.7534 0.6411l0.6436-0.3481zm-27.612 0c-0.73409 0-0.73741-0.5123-0.74215-1.2407-0.0012-0.1848-0.00249-0.3834-0.01581-0.5912-0.0573-0.8624-0.07392-1.7007-0.05731-2.4892l0.00336-0.1189c0.03721-1.3319 0.04352-1.5579 1.3047-1.8058l0.14784-0.0247-0.00151 0.0495c-0.00756 0.2465-0.01511 0.493-0.01511 0.739 0 1.8019 0.27119 3.5478 0.773 5.189 0.13634 0.4459-0.34326 0.8629-0.7534 0.6411l-0.64361-0.3481zm14.242-12.005c-4.6297 0-8.4776 2.9361-9.4584 6.7577-0.13379 0.5212 0.5513 0.6935 0.877 0.2653 1.3829-1.818 3.1418-2.153 4.7068-2.4511 2.1143-0.4027 3.8746-0.7379 3.8746-4.5719z" clip-rule="evenodd" fill="#000" fill-rule="evenodd"/>
6
- </g>
7
- </svg>