Re-add sync bgl TS files to bgl.json script.
Also perfom one off sync of TS files to bgl.json files.
I updated a2's tsconfig.json to match as closely as possible the module-editor's compiler options
Gemini generated summary of .bgl.json changes
The changes across the *.bgl.json files primarily involve code cleanup within the embedded JavaScript modules and some minor formatting adjustments.
Key Change Types:
-
Widespread Removal of JavaScript Import Statements:
- This is the most common change. Numerous import statements were removed from the code property of modules across almost all *.bgl.json files.
-
Examples:
- packages/a2/bgl/_connector-template.bgl.json: Removed imports like err, ok from "./a2/utils".
- packages/a2/bgl/a2.bgl.json: Extensive removals in modules like entry, join, tool-manager, worker-worker, agent-main, researcher, image-generator, structured-response, template, audio-generator, text-entry, make-code, gemini-prompt, image-editor, introducer, html-generator, render-outputs, lists, connector-manager, and image-utils. Specific utilities like toLLMContent, err, ok, llm, and references to ./common were frequently removed.
- packages/a2/bgl/audio-generator.bgl.json: Removed imports for gemini, various utils, Template, ToolManager, and common.
- packages/a2/bgl/fetch-workbench.bgl.json: Removed @output and @query imports.
- packages/a2/bgl/generate-text.bgl.json: Removed utils like llm and listPrompt.
- packages/a2/bgl/generate.bgl.json: Removed import for ./a2/common.
- packages/a2/bgl/gmail.bgl.json: Removed utils, read, and write imports from configurator, and @describe from get-emails.
- packages/a2/bgl/go-over-list.bgl.json: Extensive removals across most modules, including GeminiPrompt, gemini, common, various utils, report, StructuredResponse, plannerPrompt, getPlan, and types.
- packages/a2/bgl/google-drive.bgl.json: Removed utils from configurator, modified fetch import in api, and removed @describe and utils from connector-save and connector-load.
- packages/a2/bgl/mcp.bgl.json: Removed utils, read, write from configurator, @query from mcp-client, and err from connector-tools.
- packages/a2/bgl/notebooklm-connector.bgl.json: Removed utils, read, and write from configurator.
- packages/a2/bgl/tools.bgl.json: Removed imports like gemini, ToolManager, GeminiPrompt, utils, and fetch from search-web. Removed err from get-weather-tool, tool-search-web, tool-search-maps, and tool-search-enterprise.
- packages/a2/bgl/video-generator.bgl.json: Removed imports for gemini, defaultSafetySettings, utils like err, llm, and common.
- Reason: This likely indicates a refactoring where these dependencies are either no longer needed, are being provided by the execution environment, or the functionality has been inlined.
-
Specific Import Statement Modifications:
- In a few instances, import statements were slightly altered rather than completely removed.
-
Example:
- packages/a2/bgl/a2.bgl.json (gemini-client module): import invokeGemini, {} from "./gemini"; changed to import invokeGemini from "./gemini";.
- packages/a2/bgl/a2.bgl.json (gemini-prompt module): import gemini, {} from "./gemini"; changed to import invokeGemini from "./gemini"; (this might be a correction or a change in how gemini module exports its functions).
- packages/a2/bgl/a2.bgl.json (connector-manager module): import describeConnector, {} from "@describe"; changed to import describeConnector from "@describe";.
- packages/a2/bgl/google-drive.bgl.json (api module): import fetch, {} from "@fetch"; changed to import fetch from "@fetch";.
-
Formatting Changes:
- The tags and exports arrays at the top level of some BGL files were changed from a single-line array to a multi-line array format for better readability.
-
Files Affected:
- packages/a2/bgl/gmail.bgl.json
- packages/a2/bgl/mcp.bgl.json
- packages/a2/bgl/notebooklm-connector.bgl.json
-
Removal of Trailing Newlines:
- Some files had their trailing newline character removed.
-
Files Affected:
- packages/a2/bgl/gmail.bgl.json
- packages/a2/bgl/mcp.bgl.json
- packages/a2/bgl/notebooklm-connector.bgl.json
-
Updates to TypeScript Source in Metadata:
- In packages/a2/bgl/tools.bgl.json, the metadata.source.code (which contains the original TypeScript) for the search-maps and get-weather modules was updated. These changes appear to be related to TypeScript type definitions within the source code.
- search-maps: TypeScript source shows changes related to type definitions, removing SearchMapsOutputs.
- get-weather: TypeScript source shows changes to type definitions.
- In packages/a2/bgl/tools.bgl.json, the metadata.source.code (which contains the original TypeScript) for the search-maps and get-weather modules was updated. These changes appear to be related to TypeScript type definitions within the source code.
Overall, the changes to the .bgl.json files suggest a cleanup and standardization effort, especially concerning the embedded JavaScript code and its dependencies, alongside minor formatting improvements. The introduction of the sync-boards.ts script (seen in other parts of the diff) likely drives the updates to the code and metadata.source.code fields.
Pausing work on this, since it introduces quite a few mysterious changes to bgl.json.
From dmitry
the big problem that I see is that there are diffs in text that I can't explain like why does the fileoverview changes in tools.bgl.json