workspace-write
Send or draft Gmail and create or edit Google Drive files, Docs and Calendar events through a dedicated shared Workspace identity.
- License 许可
- MIT
- 所属仓库
- pymc-labs/daimon
- 最近更新
- 2026-11-14
- Stars
- ★ 24
- Forks
- 8
01 前言 Front Matter
- name
- workspace-write
- description
- Send or draft Gmail and create or edit Google Drive files, Docs and Calendar events through a dedicated shared Workspace identity.
02 资源文件 3
- 参考文档references/requests.md2.0 KB
- 脚本scripts/workflow_io.py6.8 KB
- 脚本scripts/workspace_write.py6.0 KB
03 SKILL.md 正文
Use for a concrete user's requested write. Reads already available through a
connected tool need no new credential. This script acts as the operator-bound
Google identity, normally daimon@, and never as the requester. Run on the
operator's dedicated workspace-writer agent; do not add shared credentials to
default Daimon. Every user of a bound agent can mint its tokens and use their
scopes directly. Script refusals do not restrict arbitrary sandbox code.
Call get_cli_token("gcloud"); the token lasts about one hour. Its tool result
enters model context and the session transcript. The literal token in the bash
tool command also passes through the transcript and may appear in the shell's
own command arguments. This route does not keep tokens out of transcripts.
The script itself reads stdin, does not accept a token argument, and redacts
errors. Do not echo the token or persist it to a file. Google tokens require
an agent binding and either the matching account’s authorized-user JSON
(google_user_json plus google_user_email) or a service-account key
(google_sa_json) with domain-wide delegation. With a user credential, bind only scopes the sign-in was granted, such as gmail.modify, calendar, drive, documents and presentations (each under https://www.googleapis.com/auth/); any other scope makes Google refuse the refresh with invalid_scope.
Ordinary chat carries the signed
identity. Missing setup is an operator error; never request a refresh
token or run gws auth.
Write non-secret request JSON to a working file. Replace the script/request paths and token placeholder below with the actual values from this task. Use a quoted heredoc delimiter so the shell does not expand token characters:
python3 /path/to/workspace-write/scripts/workspace_write.py /root/work/request.json <<'DAIMON_GOOGLE_ACCESS_TOKEN'
PASTE_EXACT_GET_CLI_TOKEN_RESULT_HERE
DAIMON_GOOGLE_ACCESS_TOKEN
This passes the token to the script's stdin, not its argv. Python standard
library only. Never put request files or credentials in /mnt/session/outputs.
Read references/requests.md for schemas. There is no
generic command, raw URL or HTTP passthrough.
Respect the requested recipients, resources and changes. Missing targets are an error; never infer “my” from the shared identity. Sharing, permission changes, permanent file deletion, Calendar deletion and Drive moves are unsupported. A clear user request authorizes that scope; do not add an extra approval step. Do not schedule these writes as unattended routines.
On success report the returned resource ID. An error/timeout can mean a write applied; inspect the target using available reads before retrying. Never automatically retry sends, creates or other writes. Failure output is redacted.
04 同仓库更多 Skills
daimon-context
Use when the user asks about team context, project status, decisions, or discussions that live in Slack or Discord, or names a daimon. Routes the question to the right daimon servers and merges their answers.
qa-echo-skill
QA fixture skill. When asked for the QA echo phrase, reply ECHO-SKILL-OK.
workspace-setup
First-time workspace setup and agent-roster operations for a Daimon workspace — working repo, keys, skills, MCP servers, routines, and which changes need an admin.
toggl-edits
Update or bulk edit stopped Toggl Track entries for an explicitly named workspace member using a shared admin key.
team-etiquette
Post for other people without wasting their time. Use before posting outside this conversation, tagging people outside it, sharing a document, video, audio or slides with others, or creating or editing a routine that posts for or tags others.
slides-workflow
Copy Google Slides templates and edit decks through a shared Workspace identity, then render and visually inspect changed slides.