@mcpher/gas-fakes 2.3.18 → 2.5.2
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/README.md +15 -32
- package/package.json +1 -2
- package/src/cli/app.js +30 -2
- package/src/cli/server.js +32 -0
- package/src/cli/setup.js +24 -0
- package/src/cli/togas.js +176 -0
- package/src/index.js +2 -0
- package/src/services/common/fakeui.js +45 -0
- package/src/services/content/app.js +3 -0
- package/src/services/content/contentservice.js +14 -0
- package/src/services/content/textoutput.js +45 -0
- package/src/services/documentapp/fakedocumentapp.js +1 -1
- package/src/services/enums/contentenums.js +15 -0
- package/src/services/enums/htmlenums.js +13 -0
- package/src/services/enums/scriptenums.js +6 -0
- package/src/services/formapp/fakeformapp.js +5 -0
- package/src/services/html/app.js +9 -0
- package/src/services/html/consumerworker.js +129 -0
- package/src/services/html/googlescriptrun.js +91 -0
- package/src/services/html/htmloutput.js +127 -0
- package/src/services/html/htmloutputmetatag.js +14 -0
- package/src/services/html/htmlservice.js +94 -0
- package/src/services/html/htmltemplate.js +63 -0
- package/src/services/html/serverworker.js +135 -0
- package/src/services/html/webapp.js +266 -0
- package/src/services/html/worker.js +63 -0
- package/src/services/libhandlerapp/fakelibrary.js +2 -2
- package/src/services/scriptapp/app.js +44 -0
- package/src/services/scriptapp/fakeauthorizationinfo.js +22 -0
- package/src/services/slidesapp/fakeslidesapp.js +5 -0
- package/src/services/spreadsheetapp/fakebooleancondition.js +14 -2
- package/src/services/spreadsheetapp/fakegradientcondition.js +1 -1
- package/src/services/spreadsheetapp/fakeovergridimage.js +25 -0
- package/src/services/spreadsheetapp/fakesheet.js +23 -1
- package/src/services/spreadsheetapp/fakespreadsheet.js +68 -11
- package/src/services/spreadsheetapp/fakespreadsheetapp.js +70 -9
- package/src/services/stores/fakestores.js +7 -0
- package/src/support/auth.js +2 -0
- package/src/support/proxies.js +1 -1
- package/src/support/sxauth.js +20 -12
- package/src/support/utils.js +480 -200
- package/src/support/workersync/sxhtml.js +8 -0
- package/src/support/workersync/synchronizer.js +8 -1
- package/src/support/workersync/worker.js +5 -0
- package/api-docs/kdrive_api.json +0 -69958
- package/appsscript.json +0 -102
- package/gf_agent/README.md +0 -101
- package/gf_agent/SKILL.md +0 -484
- package/gf_agent/documentation.md +0 -105
- package/gf_agent/gf-agent-contributor/SKILL.md +0 -56
- package/gf_agent/index.md +0 -21
- package/gf_agent/knowledge/00-execution-context.md +0 -5
- package/gf_agent/knowledge/01-drive.md +0 -12
- package/gf_agent/knowledge/02-syntax.md +0 -14
- package/gf_agent/knowledge/03-auth.md +0 -15
- package/gf_agent/knowledge/04-advanced.md +0 -46
- package/gf_agent/knowledge/05-sheets-forms.md +0 -27
- package/gf_agent/knowledge/06-jdbc-cloudsql.md +0 -21
- package/gf_agent/knowledge/07-jdbc-auth-details.md +0 -30
- package/gf_agent/knowledge/08-docs-limitations.md +0 -4
- package/gf_agent/knowledge/09-orchestrator-pattern.md +0 -55
- package/gf_agent/knowledge/10-sandbox-security.md +0 -62
- package/gf_agent/knowledge/11-chart-builder-limitations.md +0 -15
- package/gf_agent/knowledge/12-gmail-eventual-consistency.md +0 -13
- package/gf_agent/knowledge/13-advanced-services-discovery.md +0 -29
- package/gf_agent/knowledge/14-utilities-parity.md +0 -13
- package/gf_agent/knowledge/15-logging-efficiency.md +0 -15
- package/gf_agent/knowledge/README.md +0 -16
- package/gf_agent/scripts/SKILL.template.md +0 -63
- package/gf_agent/scripts/builder.js +0 -118
- package/gf_agent/skills/base.md +0 -156
- package/gf_agent/skills/cache.md +0 -20
- package/gf_agent/skills/calendar.md +0 -780
- package/gf_agent/skills/charts.md +0 -127
- package/gf_agent/skills/document.md +0 -6752
- package/gf_agent/skills/drive.md +0 -423
- package/gf_agent/skills/forms.md +0 -4036
- package/gf_agent/skills/gmail.md +0 -576
- package/gf_agent/skills/jdbc.md +0 -3101
- package/gf_agent/skills/lock.md +0 -20
- package/gf_agent/skills/properties.md +0 -19
- package/gf_agent/skills/script.md +0 -50
- package/gf_agent/skills/slides.md +0 -5054
- package/gf_agent/skills/spreadsheet.md +0 -56075
- package/gf_agent/skills/urlfetch.md +0 -28
- package/gf_agent/skills/utilities.md +0 -50
- package/gf_agent/skills/xml.md +0 -270
- package/skills-lock.json +0 -10
- package/src/services/documentapp/fakeui.js +0 -27
package/appsscript.json
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"timeZone": "Europe/London",
|
|
3
|
-
"exceptionLogging": "STACKDRIVER",
|
|
4
|
-
"runtimeVersion": "V8",
|
|
5
|
-
"oauthScopes": [
|
|
6
|
-
"openid",
|
|
7
|
-
"https://www.googleapis.com/auth/userinfo.email",
|
|
8
|
-
"https://www.googleapis.com/auth/cloud-platform",
|
|
9
|
-
"https://www.googleapis.com/auth/drive",
|
|
10
|
-
"https://www.googleapis.com/auth/sqlservice",
|
|
11
|
-
"https://www.googleapis.com/auth/script.external_request",
|
|
12
|
-
"https://www.googleapis.com/auth/spreadsheets",
|
|
13
|
-
"https://www.googleapis.com/auth/documents",
|
|
14
|
-
"https://www.googleapis.com/auth/presentations",
|
|
15
|
-
"https://www.googleapis.com/auth/forms",
|
|
16
|
-
"https://mail.google.com/",
|
|
17
|
-
"https://www.googleapis.com/auth/calendar"
|
|
18
|
-
],
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"libraries": [
|
|
21
|
-
{
|
|
22
|
-
"userSymbol": "bmPreFiddler",
|
|
23
|
-
"version": "34",
|
|
24
|
-
"libraryId": "13JUFGY18RHfjjuKmIRRfvmGlCYrEkEtN6uUm-iLUcxOUFRJD-WBX-tkR",
|
|
25
|
-
"developmentMode": false
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"userSymbol": "bmUnitTester",
|
|
29
|
-
"version": "20",
|
|
30
|
-
"libraryId": "1zOlHMOpO89vqLPe5XpC-wzA9r5yaBkWt_qFjKqFNsIZtNJ-iUjBYDt-x"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"userSymbol": "bmIs",
|
|
34
|
-
"version": "1",
|
|
35
|
-
"libraryId": "1tFa7Gc68142wiiZaNmj0zA-ELDHh0q31eDXodeeCf1LxRR1LeSr3opAd"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"userSymbol": "bmFiddler",
|
|
39
|
-
"version": "30",
|
|
40
|
-
"libraryId": "13EWG4-lPrEf34itxQhAQ7b9JEbmCBfO8uE4Mhr99CHi3Pw65oxXtq-rU",
|
|
41
|
-
"developmentMode": false
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"userSymbol": "bmGasFlexCache",
|
|
45
|
-
"libraryId": "1R_r9n4EGctvA8lWBZVeuT66mgaKBRV5IxfIsD_And-ra2H16iNXVWva0",
|
|
46
|
-
"version": "10"
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"enabledAdvancedServices": [
|
|
50
|
-
{
|
|
51
|
-
"userSymbol": "Sheets",
|
|
52
|
-
"version": "v4",
|
|
53
|
-
"serviceId": "sheets"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"userSymbol": "Docs",
|
|
57
|
-
"version": "v1",
|
|
58
|
-
"serviceId": "docs"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"userSymbol": "Slides",
|
|
62
|
-
"version": "v1",
|
|
63
|
-
"serviceId": "slides"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"userSymbol": "Gmail",
|
|
67
|
-
"version": "v1",
|
|
68
|
-
"serviceId": "gmail"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"userSymbol": "Chat",
|
|
72
|
-
"version": "v1",
|
|
73
|
-
"serviceId": "chat"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"userSymbol": "People",
|
|
77
|
-
"version": "v1",
|
|
78
|
-
"serviceId": "peopleapi"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"userSymbol": "Tasks",
|
|
82
|
-
"version": "v1",
|
|
83
|
-
"serviceId": "tasks"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"userSymbol": "Calendar",
|
|
87
|
-
"version": "v3",
|
|
88
|
-
"serviceId": "calendar"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"userSymbol": "WorkspaceEvents",
|
|
92
|
-
"version": "v1",
|
|
93
|
-
"serviceId": "workspaceevents"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"userSymbol": "Drive",
|
|
97
|
-
"version": "v3",
|
|
98
|
-
"serviceId": "drive"
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
}
|
package/gf_agent/README.md
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
# gf_agent - Google Apps Script Local Automation Agent
|
|
2
|
-
|
|
3
|
-
`gf_agent` is an interactive agent for Gemini CLI that allows you to automate Google Workspace tasks locally using [gas-fakes](https://github.com/brucemcpherson/gas-fakes).
|
|
4
|
-
|
|
5
|
-
*For full project details, see the [main gas-fakes README](../README.md).*
|
|
6
|
-
|
|
7
|
-
## Requirements & Setup
|
|
8
|
-
|
|
9
|
-
Before using the agent or the MCP tools, you **must** configure your local environment to allow access to your Google Workspace account:
|
|
10
|
-
|
|
11
|
-
1. **Manifest File**: You need a local `appsscript.json` file in your directory containing the necessary `oauthScopes` you intend to use.
|
|
12
|
-
2. **Initialization**: Run `gas-fakes init` to generate a `.env` file and configure your auth parameters.
|
|
13
|
-
3. **Authentication**: Run `gas-fakes auth` to log in and generate the tokens required to run the scripts.
|
|
14
|
-
|
|
15
|
-
## Installation & Integration
|
|
16
|
-
|
|
17
|
-
*Note: You can skip these manual steps if you already chose to install the Gemini skills during the `gas-fakes init` process. The `init` command will automatically detect if you are in a local clone and link the skills appropriately.*
|
|
18
|
-
|
|
19
|
-
### 1. Install the Skill Agent
|
|
20
|
-
|
|
21
|
-
**For General Users:**
|
|
22
|
-
You can install the `gf_agent` directly from this repository. To install **only** this skill:
|
|
23
|
-
```bash
|
|
24
|
-
gemini skills install https://github.com/brucemcpherson/gas-fakes.git --path gf_agent
|
|
25
|
-
```
|
|
26
|
-
*Note: This repository contains multiple specialized skills (for development, maintenance, etc.). Omitting the `--path` flag will install all of them.*
|
|
27
|
-
|
|
28
|
-
**For Contributors & Developers:**
|
|
29
|
-
Do **not** use the `install` command with the remote URL, as it will download a cached copy that is difficult to edit. Because `gf_agent` is a subfolder of the main `gas-fakes` repository, use Git Sparse Checkout to isolate it:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
mkdir gf_agent_standalone && cd gf_agent_standalone
|
|
33
|
-
git init
|
|
34
|
-
git remote add origin https://github.com/brucemcpherson/gas-fakes.git
|
|
35
|
-
git config core.sparseCheckout true
|
|
36
|
-
echo "gf_agent/*" >> .git/info/sparse-checkout
|
|
37
|
-
git pull origin main
|
|
38
|
-
gemini skills link ./gf_agent
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### 2. Configure the MCP Server
|
|
42
|
-
To use Google Workspace services as tools within Gemini CLI, add the MCP server to your settings.
|
|
43
|
-
|
|
44
|
-
The easiest way is to use the built-in command (assuming you installed `gas-fakes` globally):
|
|
45
|
-
```bash
|
|
46
|
-
gemini mcp add --scope project gas-fakes-mcp gas-fakes mcp
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
*(Advanced: Alternatively, you can manually add the configuration to your `.gemini/settings.json` file instead of using the command above. See [documentation.md](documentation.md) for the manual JSON structure).*
|
|
50
|
-
|
|
51
|
-
### 3. Requirements
|
|
52
|
-
Ensure dependencies are installed in your workspace:
|
|
53
|
-
```bash
|
|
54
|
-
npm install
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Usage
|
|
58
|
-
|
|
59
|
-
Once the MCP server is configured, you don't need to use any special prefixes or agent names. Simply describe what you want to do in plain English:
|
|
60
|
-
|
|
61
|
-
- "Create a sheet called 'Latest Drive Files' and add my recently created Drive files to it."
|
|
62
|
-
- "Find latest 5 emails from 'Martin Hawksey' and summarize them in a Google Doc."
|
|
63
|
-
- "Add a meeting with Martin Hawksey to my calendar for tomorrow at 10am. Subject is gas-fakes agent"
|
|
64
|
-
- "Find my airports spreadsheet, and using the sheet with the most data, list to the console the 5 highest airports sorted by elevation high to low, and convert elevation to meters.
|
|
65
|
-
|
|
66
|
-
The LLM will automatically:
|
|
67
|
-
1. Identify the correct Google Workspace services needed.
|
|
68
|
-
2. Generate the appropriate Apps Script code.
|
|
69
|
-
3. Execute it locally via `gas-fakes`.
|
|
70
|
-
4. Confirm the results to you.
|
|
71
|
-
|
|
72
|
-
## Antigravity & MCP Integration
|
|
73
|
-
|
|
74
|
-
`gas-fakes` can also act as an MCP (Model Context Protocol) server for tools like Antigravity. To launch the MCP server:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
gas-fakes mcp
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
This allows Antigravity or other MCP-compatible clients to call Google Workspace tools directly through `gas-fakes`.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## Why use gf_agent?
|
|
84
|
-
|
|
85
|
-
- **Fast Iteration**: Test your automation logic without waiting for the Apps Script IDE or deployment.
|
|
86
|
-
- **Security**: Run tasks locally using your own Google credentials (via ADC) without uploading code to a third-party service.
|
|
87
|
-
- **Powerful Integration**: Use Node.js libraries alongside Google Apps Script APIs.
|
|
88
|
-
|
|
89
|
-
## Contributing to gf_agent
|
|
90
|
-
|
|
91
|
-
If you'd like to improve the agent by teaching it new tricks, outlining Apps Script API parity warnings, or documenting best practices, we welcome your contributions!
|
|
92
|
-
|
|
93
|
-
To avoid Git merge conflicts on the large monolithic `SKILL.md` file, the `gf_agent` uses a **modular knowledge base**.
|
|
94
|
-
|
|
95
|
-
1. Clone or fork this repository (or just the `gf_agent` directory).
|
|
96
|
-
2. Create a new Markdown file inside the `gf_agent/knowledge/` directory (e.g., `06-new-feature.md`).
|
|
97
|
-
3. Write your specific instructions or lessons learned in that file.
|
|
98
|
-
4. **Do NOT** attempt to compile `SKILL.md` yourself.
|
|
99
|
-
5. Commit and submit a Pull Request with your new Markdown file.
|
|
100
|
-
|
|
101
|
-
Once merged, the repository maintainers will run the automated pipeline to compile your new knowledge into the master `gf_agent/SKILL.md` for all users! See the [Knowledge Base README](knowledge/README.md) or ask the `gf-agent-contributor` skill for more details.
|