UNPKG

@synstack/reforge

Version:

Runtime tools for interactive DevX with the ReForge IDE extension

1 lines 25.4 kB
{"version":3,"sources":["../src/reforge.index.ts","../src/reforge.bundle.ts","../src/reforge.lib.ts","../src/tool.utils.ts","../src/vscode.lib.ts"],"sourcesContent":["export * as reforge from \"./reforge.bundle.ts\";\nexport * from \"./reforge.lib.ts\";\nexport * from \"./tool.utils.ts\";\n","export {\n getFocusedFile,\n getFocusedFileSelections,\n getOpenedFiles,\n getPinnedFiles,\n notify,\n openFile,\n openFiles,\n pinFiles,\n promptInput,\n promptMultiSelect,\n promptSelect,\n unpinFiles,\n} from \"./reforge.lib.ts\";\n\nexport * as vscode from \"./vscode.lib.ts\";\n","import { z } from \"zod/v4\";\nimport { toolFactory } from \"./tool.utils.ts\";\n\nexport const getFocusedFileConfig = {\n name: \"GET_FOCUSED_FILE\",\n requestSchema: null,\n responseSchema: z.string().nullable(),\n} as const;\n\n/**\n * Retrieve the absolute path to the actively focused file in the editor\n */\nexport const getFocusedFile = toolFactory(getFocusedFileConfig);\n\nexport const getOpenedFilesConfig = {\n name: \"GET_OPENED_FILES\",\n requestSchema: null,\n responseSchema: z.array(z.string()),\n} as const;\n\n// TODO: Return a list of FsFile instances\n/**\n * Retrieve the absolute paths to all opened files in the editor\n *\n * @warning this list also includes the focused file\n */\nexport const getOpenedFiles = toolFactory(getOpenedFilesConfig);\n\nexport const promptSelectConfig = {\n name: \"PROMPT_SELECT\",\n requestSchema: z.object({\n /**\n * The title of the prompt\n */\n title: z.string().optional(),\n /**\n * The options to display in the prompt\n */\n options: z.array(z.string()),\n /**\n * The placeholder text to display in the prompt\n */\n placeHolder: z.string().optional(),\n }),\n responseSchema: z.string().nullable(),\n} as const;\n\n// TODO: Provide a complete API for choices\n/**\n * Prompts the user to select an option from a list of options\n * @returns The selected option or null if the user cancels the prompt\n */\nexport const promptSelect = toolFactory(promptSelectConfig);\n\nexport const promptInputConfig = {\n name: \"PROMPT_INPUT\",\n requestSchema: z.object({\n /**\n * The title of the prompt\n */\n title: z.string().optional(),\n /**\n * The prompt to display in the prompt\n */\n prompt: z.string().optional(),\n /**\n * The placeholder text to display in the prompt\n */\n placeHolder: z.string().optional(),\n /**\n * The default input value\n */\n defaultValue: z.string().optional(),\n /**\n * Whether the input should be a password and masked\n */\n isPassword: z.boolean().optional().default(false),\n }),\n responseSchema: z.string().nullable(),\n} as const;\n\n/**\n * Prompts the user to input a value\n * @returns The input value or null if the user cancels the prompt\n */\nexport const promptInput = toolFactory(promptInputConfig);\n\nexport const promptMultiSelectConfig = {\n name: \"PROMPT_MULTI_SELECT\",\n requestSchema: z.object({\n /**\n * The title of the prompt\n */\n title: z.string().optional(),\n /**\n * The options to display in the prompt\n */\n options: z.array(z.string()),\n /**\n * The placeholder text to display in the prompt\n */\n placeHolder: z.string().optional(),\n }),\n responseSchema: z.array(z.string()),\n} as const;\n\n// TODO: Provide a complete API for choices\n/**\n * Prompts the user to select multiple options from a list of options\n * @returns The selected options as an array\n */\nexport const promptMultiSelect = toolFactory(promptMultiSelectConfig);\n\nexport const notifyConfig = {\n name: \"NOTIFY\",\n requestSchema: z.object({\n /**\n * The title of the notification\n */\n title: z.string().optional(),\n /**\n * The message to display in the notification\n */\n message: z.string(),\n /**\n * The type of notification\n * @default info\n * @argument info - Informational notification\n * @argument warning - Warning notification\n * @argument error - Error notification\n */\n type: z.enum([\"info\", \"warning\", \"error\"]).optional().default(\"info\"),\n /**\n * Buttons values to display in the notification\n */\n buttons: z.array(z.string()).optional(),\n }),\n responseSchema: z.string().nullable(),\n} as const;\n\n/**\n * Displays a notification to the user\n * @returns the button clicked by the user or null if the user dismissed the notification\n */\nexport const notify = toolFactory(notifyConfig);\n\nconst openFileRequest = z\n .object({\n /**\n * @default false\n * Whether to force the file to open even if it is already open\n */\n force: z.boolean().default(false),\n /**\n * Whether to preview the file in the editor\n * @default false\n * @warning Check if the file type is supported by the editor\n */\n preview: z.boolean().optional().default(false),\n /**\n * The column to open the file in\n * @default active\n * @argument active - Open the file in the active column\n * @argument beside - Open the file beside the active column\n * @argument N - Open the file in the Nth column\n */\n column: z\n .union([z.enum([\"active\", \"beside\"]), z.number().min(1).max(9)])\n .optional(),\n })\n .default({\n force: false,\n preview: false,\n column: \"active\",\n });\n\nconst openFileResponse = z.object({\n /**\n * Absolute path to the file\n */\n path: z.string(),\n /**\n * Whether the file is already open in the editor\n */\n isAlreadyOpened: z.boolean(),\n});\n\nexport const openFileConfig = {\n name: \"OPEN_FILE\",\n requestSchema: z.object({\n /**\n * Absolute path to the file\n */\n path: z.string(),\n config: openFileRequest,\n }),\n responseSchema: openFileResponse,\n};\n\n/**\n * Opens a file in the editor\n */\nexport const openFile = toolFactory(openFileConfig);\n\nexport const openFilesConfig = {\n name: \"OPEN_FILES\",\n requestSchema: z.object({\n /**\n * Array of absolute paths to the files to open\n */\n paths: z.array(z.string()),\n config: openFileRequest,\n }),\n /**\n * Array of absolute paths to the files & whether they were already open in the editor\n */\n responseSchema: z.array(openFileResponse),\n};\n\nexport const openFiles = toolFactory(openFilesConfig);\n\nconst selectionPositionSchema = z.object({\n /**\n * The position in the whole file\n */\n character: z.number(),\n /**\n * The line number of the position\n */\n line: z.number(),\n /**\n * The character position within the line\n */\n lineCharacter: z.number(),\n});\n\nexport const getFocusedFileSelectionsConfig = {\n name: \"GET_FOCUSED_FILE_SELECTION\",\n requestSchema: null,\n responseSchema: z\n .object({\n /**\n * Absolute path to the file\n */\n path: z.string(),\n /**\n * Array of active selections in the file\n */\n selections: z.array(\n z.object({\n /**\n * The starting character position of the selection in the file\n */\n start: selectionPositionSchema,\n /**\n * The ending character position of the selection in the file\n */\n end: selectionPositionSchema,\n /**\n * The string content of the selection\n */\n content: z.string(),\n /**\n * The length of the selection\n */\n length: z.number(),\n }),\n ),\n })\n .nullable(),\n};\n\n/**\n * Retrieve the active selections in the actively focused file in the editor\n */\nexport const getFocusedFileSelections = toolFactory(\n getFocusedFileSelectionsConfig,\n);\n\nexport const getPinnedFilesConfig = {\n name: \"GET_PINNED_FILES\",\n requestSchema: null,\n responseSchema: z.array(z.string()),\n};\n\n/**\n * Retrieve the list of pinned files in the editor\n * @returns The list of pinned files\n */\nexport const getPinnedFiles = toolFactory(getPinnedFilesConfig);\n\nexport const pinFilesConfig = {\n name: \"PIN_FILES\",\n requestSchema: z.object({\n paths: z.array(z.string()),\n }),\n responseSchema: z.array(z.string()),\n};\n\n/**\n * Pin a list of files in the editor\n * @returns The list of pinned files\n */\nexport const pinFiles = toolFactory(pinFilesConfig);\n\nexport const unpinFilesConfig = {\n name: \"UNPIN_FILES\",\n requestSchema: z.object({\n paths: z.array(z.string()),\n }),\n responseSchema: z.array(z.string()),\n};\n\n/**\n * Unpin a list of files in the editor\n * @returns The list of pinned files\n */\nexport const unpinFiles = toolFactory(unpinFilesConfig);\n","import { json } from \"@synstack/json\";\nimport * as net from \"net\";\nimport pako from \"pako\";\nimport { z } from \"zod/v4\";\n\nexport const RESPONSE_SUFFIX = \"_RESPONSE\";\n\nconst memoize = <ARGS extends Array<any>, VALUE>(\n fn: (...args: ARGS) => VALUE,\n) => {\n let cache: { data: VALUE } | undefined = undefined;\n return (...args: ARGS) => {\n if (cache === undefined) cache = { data: fn(...args) };\n return cache.data;\n };\n};\n\nexport const getIpcClient = memoize(() => {\n return new Promise<net.Socket>((resolve, reject) => {\n const port = process.env.REFORGE_IPC_PORT;\n\n if (!port)\n throw new Error(\"No IPC port provided, cannot connect to parent process\");\n\n const parsedPort = typeof port === \"string\" ? parseInt(port) : port;\n\n const client = net.connect(parsedPort, \"localhost\", () => {\n client.removeListener(\"error\", reject);\n resolve(client);\n });\n\n client.once(\"error\", reject);\n });\n});\n\nexport interface ToolConfig<\n NAME extends string,\n REQUEST_SCHEMA extends z.ZodType | null,\n RESPONSE_SCHEMA extends z.ZodType = z.ZodAny,\n> {\n name: NAME;\n requestSchema: REQUEST_SCHEMA;\n responseSchema: RESPONSE_SCHEMA;\n}\n\nexport type ToolFn<\n REQUEST_SCHEMA extends z.ZodType | null,\n RESPONSE_SCHEMA extends z.ZodType = z.ZodTypeAny,\n> = REQUEST_SCHEMA extends z.ZodType\n ? (data: z.input<REQUEST_SCHEMA>) => Promise<z.output<RESPONSE_SCHEMA>>\n : () => Promise<z.output<RESPONSE_SCHEMA>>;\n\nexport const baseResponseSchema = z.object({\n type: z.string(),\n id: z.string(),\n status: z.union([z.literal(\"ok\"), z.literal(\"error\")]),\n});\n\nexport const toolFactory = <\n NAME extends string,\n REQUEST_SCHEMA extends z.ZodType | null,\n RESPONSE_SCHEMA extends z.ZodType = z.ZodAny,\n>(\n toolConfig: ToolConfig<NAME, REQUEST_SCHEMA, RESPONSE_SCHEMA>,\n): ToolFn<REQUEST_SCHEMA, RESPONSE_SCHEMA> => {\n const responseName = `${toolConfig.name}${RESPONSE_SUFFIX}` as const;\n const responseSchema = z.discriminatedUnion(\"status\", [\n z.object({\n status: z.literal(\"ok\"),\n type: z.literal(responseName),\n id: z.string(),\n data: toolConfig.responseSchema,\n }),\n z.object({\n status: z.literal(\"error\"),\n type: z.literal(responseName),\n id: z.string(),\n data: z.string(),\n }),\n ]);\n const exec = async (data: unknown) => {\n const validatedData = toolConfig.requestSchema\n ? toolConfig.requestSchema.parse(data)\n : undefined;\n const client = await getIpcClient();\n const id = crypto.randomUUID();\n return new Promise<z.output<RESPONSE_SCHEMA>>((resolve, reject) => {\n const errorHandler = (error: Error) => {\n client.removeListener(\"error\", errorHandler);\n client.removeListener(\"data\", responseHandler);\n reject(error);\n };\n\n const responseHandler = (response: Uint8Array) => {\n const resData = json.deserialize(\n pako.inflate(response, { to: \"string\" }),\n );\n const baseResponse = baseResponseSchema.parse(resData);\n if (baseResponse.type === responseName && baseResponse.id === id) {\n const parsedResponse = responseSchema.parse(resData);\n client.removeListener(\"error\", errorHandler);\n client.removeListener(\"data\", responseHandler);\n // @ts-expect-error - TODO: fix this\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n if (parsedResponse.status === \"ok\") resolve(parsedResponse.data);\n // @ts-expect-error - TODO: fix this\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n else reject(new Error(parsedResponse.data));\n }\n };\n\n client.once(\"error\", errorHandler);\n client.on(\"data\", responseHandler);\n client.write(\n pako.deflate(\n json.serialize({\n type: toolConfig.name,\n id,\n data: validatedData,\n }),\n ),\n );\n });\n };\n\n return exec as ToolFn<REQUEST_SCHEMA, RESPONSE_SCHEMA>;\n};\n","import { z } from \"zod/v4\";\nimport { toolFactory } from \"./tool.utils.ts\";\n\n/**\n * Enumeration of VSCode symbol kinds.\n * These values represent different types of symbols that can be found in code.\n */\nexport const VscodeSymbolKind = {\n File: 0,\n Module: 1,\n Namespace: 2,\n Package: 3,\n Class: 4,\n Method: 5,\n Property: 6,\n Field: 7,\n Constructor: 8,\n Enum: 9,\n Interface: 10,\n Function: 11,\n Variable: 12,\n Constant: 13,\n String: 14,\n Number: 15,\n Boolean: 16,\n Array: 17,\n Object: 18,\n Key: 19,\n Null: 20,\n EnumMember: 21,\n Struct: 22,\n Event: 23,\n Operator: 24,\n TypeParameter: 25,\n} as const;\n\n/**\n * Enumeration of VSCode symbol tags.\n * These values represent additional metadata that can be attached to symbols.\n */\nexport const VscodeSymbolTag = {\n Deprecated: 1,\n} as const;\n\n/**\n * Schema for a position in a text document.\n */\nexport const positionSchema = z.object({\n /** Zero-based line number */\n line: z.number().int().min(0),\n /** Zero-based character offset on the line */\n character: z.number().int().min(0),\n});\n\n/** Type representing a position in a text document */\nexport type Position = z.output<typeof positionSchema>;\n\n/**\n * Schema for a range in a text document.\n */\nexport const rangeSchema = z.object({\n /** The start position of the range */\n start: positionSchema,\n /** The end position of the range */\n end: positionSchema,\n});\n\n/** Type representing a range in a text document */\nexport type Range = z.output<typeof rangeSchema>;\n\n/**\n * Schema for a call hierarchy item.\n * Represents a programming construct that can be part of a call hierarchy.\n */\nexport const callHierarchyItemSchema = z.object({\n /** The symbol kind of the item */\n kind: z.number().int().min(0).max(25),\n /** The name of the item */\n name: z.string(),\n /** Additional details about the item */\n detail: z.string(),\n /** The URI of the document containing the item */\n uri: z.string(),\n /** Optional tags associated with the item */\n tags: z.array(z.number().int()).optional(),\n /** The full range of the item */\n range: rangeSchema,\n /** The range that should be selected when navigating to the item */\n selectionRange: rangeSchema,\n});\n\n/** Type representing a call hierarchy item */\nexport type CallHierarchyItem = z.output<typeof callHierarchyItemSchema>;\n\n/**\n * Configuration for the executeCommand tool.\n * Defines the schema for executing VSCode commands.\n */\nexport const executeCommandConfig = {\n name: \"EXECUTE_COMMAND\",\n requestSchema: z.object({\n /** The vscode command to execute */\n command: z.string(),\n /** List of args to be passed to the command */\n args: z\n .array(\n z.discriminatedUnion(\"type\", [\n z.object({\n type: z.literal(\"path\"),\n value: z.string(),\n }),\n z.object({\n type: z.literal(\"Uri\"),\n value: z.string().describe(\"Absolute path to the file\"),\n }),\n z.object({\n type: z.literal(\"Range\"),\n value: rangeSchema,\n }),\n z.object({\n type: z.literal(\"Position\"),\n value: positionSchema,\n }),\n z.object({\n type: z.literal(\"CallHierarchyItem\"),\n value: callHierarchyItemSchema,\n }),\n z.object({\n type: z.literal(\"primitive\"),\n value: z.union([\n z.string(),\n z.number(),\n z.boolean(),\n z.record(z.string(), z.any()),\n z.array(z.any()),\n ]),\n }),\n ]),\n )\n .optional()\n .default([]),\n }),\n responseSchema: z.any().optional(),\n};\n\n/**\n * Executes a command in the VSCode editor.\n * Allows calling bundled VSCode commands as well as commands from other extensions.\n *\n * @template OUTPUT - The expected output type of the command\n * @param {z.input<typeof executeCommandConfig.requestSchema>} args - The command arguments\n * @returns {Promise<OUTPUT>} A promise that resolves with the command's output\n */\nexport const executeCommand = toolFactory(executeCommandConfig) as <\n OUTPUT = any,\n>(\n args: z.input<typeof executeCommandConfig.requestSchema>,\n) => Promise<OUTPUT>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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