@caddis/cli 0.4.101 → 0.4.103

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 (41) hide show
  1. package/README.md +8 -0
  2. package/bundles/antigravity-plugin/plugin.json +1 -1
  3. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_exit.cpython-311.pyc +0 -0
  4. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_file_lock.cpython-311.pyc +0 -0
  5. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_frontmatter.cpython-311.pyc +0 -0
  6. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_redact.cpython-311.pyc +0 -0
  7. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_roadmap.cpython-311.pyc +0 -0
  8. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_rows.cpython-311.pyc +0 -0
  9. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_status.cpython-311.pyc +0 -0
  10. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_tidy.cpython-311.pyc +0 -0
  11. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_todo.cpython-311.pyc +0 -0
  12. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_workstreams.cpython-311.pyc +0 -0
  13. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc +0 -0
  14. package/bundles/antigravity-plugin/scripts/caddis_guide.json +9 -9
  15. package/bundles/antigravity-plugin/scripts/caddis_todo.py +9 -3
  16. package/bundles/antigravity-plugin/skills/_registry.md +2 -1
  17. package/bundles/antigravity-plugin/skills/graph-email/SKILL.md +3 -3
  18. package/bundles/{antigravity-plugin-extras/skills/graph-email → antigravity-plugin/skills/send-email}/SKILL.md +9 -2
  19. package/bundles/{antigravity-plugin-extras/skills/graph-email → antigravity-plugin/skills/send-email}/email.toml.example +1 -1
  20. package/bundles/antigravity-plugin-extras/plugin.json +1 -1
  21. package/bundles/antigravity-plugin-extras/skills/_registry.md +0 -1
  22. package/bundles/codex/.codex/skills/devops/send-email/SKILL.md +60 -0
  23. package/bundles/codex/.codex/skills/devops/send-email/email.toml.example +44 -0
  24. package/bundles/codex/.codex/skills/devops/send-email/scripts/send_email.py +432 -0
  25. package/bundles/manifest.json +3 -3
  26. package/dist/cli.js +894 -234
  27. package/dist/export/assets/{export-or4yLaQm.css → export-DKXFSE8J.css} +1 -1
  28. package/dist/export/index.html +2 -2
  29. package/dist/ui/assets/{Activity-BH0Scw-H.js → Activity-B816JVqx.js} +1 -1
  30. package/dist/ui/assets/{Guide-f5f2DrlU.js → Guide-CnL1DiTr.js} +1 -1
  31. package/dist/ui/assets/Palette-BKM_A64G.js +11 -0
  32. package/dist/ui/assets/{RoadmapTab-BqLBt4fW.js → RoadmapTab-DhC4-kqv.js} +1 -1
  33. package/dist/ui/assets/{external-link-BFMu4CXk.js → external-link-DagTFCsV.js} +1 -1
  34. package/dist/ui/assets/index-Bj5qA-fq.js +226 -0
  35. package/dist/ui/assets/{index-h1dmppYX.css → index-FqnApO4t.css} +1 -1
  36. package/dist/ui/index.html +2 -2
  37. package/package.json +1 -1
  38. package/dist/ui/assets/Palette-cTwLWgn4.js +0 -11
  39. package/dist/ui/assets/index-39J2d1qv.js +0 -226
  40. /package/bundles/{antigravity-plugin-extras/skills/graph-email → antigravity-plugin/skills/send-email}/scripts/send_email.py +0 -0
  41. /package/dist/export/assets/{export-Cb3BXZCo.js → export-B1Le4b3E.js} +0 -0
package/README.md CHANGED
@@ -132,6 +132,14 @@ caddis update --extras # add extras to an existing install
132
132
  The first run. Detects, shows exactly what it is about to run, asks, then installs. `--yes` skips
133
133
  the prompt for CI.
134
134
 
135
+ ### `caddis email`
136
+
137
+ `caddis email setup` is the guided one-time setup for the send-email skill. It asks for the provider (Graph or SMTP), the sender
138
+ mailbox and the secrets, writes `~/.caddis/email.toml` (settings only) and, if you enter values, `~/.caddis/email.env` (mode 0600), then
139
+ runs the check. A secret is never printed and never goes into `email.toml`. An existing file is replaced only on a yes or `--force`.
140
+ For scripts, use `--provider --sender --env-file --tenant-id --client-id --yes`; the secret comes from `CADDIS_EMAIL_CLIENT_SECRET`
141
+ (SMTP: `CADDIS_EMAIL_SMTP_PASSWORD`) or the env file, never a flag. `caddis email check` runs the skill's `send_email.py --check`.
142
+
135
143
  ### `caddis hub`
136
144
 
137
145
  A local web page (127.0.0.1 only) with your repos, PRs, plans and live sessions. `caddis hub start`
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "caddis",
3
- "version": "1.3.185",
3
+ "version": "1.3.187",
4
4
  "description": "caddis — agent-agnostic dev harness as an Antigravity (agy) plugin: TDD skills + commands, single-sourced with the Claude Code plugin."
5
5
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": 1,
3
- "version": "1.3.184",
4
- "generated": "2026-11-09 10:19 UTC",
3
+ "version": "1.3.186",
4
+ "generated": "2026-11-09 12:53 UTC",
5
5
  "commands": [
6
6
  {
7
7
  "name": "add-rules",
@@ -1812,12 +1812,6 @@
1812
1812
  "description": "Create well-structured conventional commit messages following Conventional Commits standard. Use when committing changes, preparing PRs, or generating changelogs.",
1813
1813
  "core": true
1814
1814
  },
1815
- {
1816
- "name": "graph-email",
1817
- "category": "devops",
1818
- "description": "Email a Markdown file via Microsoft Graph or SMTP. Use to email a draft or note.",
1819
- "core": false
1820
- },
1821
1815
  {
1822
1816
  "name": "monorepo",
1823
1817
  "category": "devops",
@@ -1842,6 +1836,12 @@
1842
1836
  "description": "Use BEFORE deleting a directory tree, scratchpad or git worktree, or \"tidying up\" generated folders, especially on Windows, where deleting through a junction or symlink destroys its target; and to verify a venv or node_modules survived.",
1843
1837
  "core": true
1844
1838
  },
1839
+ {
1840
+ "name": "send-email",
1841
+ "category": "devops",
1842
+ "description": "Email a Markdown file via Microsoft Graph or SMTP. Use to email a draft or note.",
1843
+ "core": true
1844
+ },
1845
1845
  {
1846
1846
  "name": "update-readme",
1847
1847
  "category": "devops",
@@ -2465,7 +2465,7 @@
2465
2465
  "commands": 41,
2466
2466
  "agents": 12,
2467
2467
  "skills": 134,
2468
- "core": 50,
2468
+ "core": 51,
2469
2469
  "hooks": 17
2470
2470
  }
2471
2471
  }
@@ -323,8 +323,11 @@ class _Batch:
323
323
  def get(self, name: str) -> tuple[str, str, bytes] | None:
324
324
  """(oid, type, content) of `name`, or None when git says it is missing."""
325
325
  assert self.proc.stdin is not None and self.proc.stdout is not None
326
- self.proc.stdin.write(name.encode("utf-8") + b"\n")
327
- self.proc.stdin.flush()
326
+ try:
327
+ self.proc.stdin.write(name.encode("utf-8") + b"\n")
328
+ self.proc.stdin.flush()
329
+ except OSError: # git already exited (not a repo): its stdin is closed, so the object is missing
330
+ return None
328
331
  header = self.proc.stdout.readline().split()
329
332
  if len(header) != 3:
330
333
  return None # "<name> missing" (or ambiguous)
@@ -334,7 +337,10 @@ class _Batch:
334
337
 
335
338
  def close(self) -> None:
336
339
  if self.proc.stdin:
337
- self.proc.stdin.close()
340
+ try:
341
+ self.proc.stdin.close()
342
+ except OSError: # a failed write left bytes that cannot reach an exited git
343
+ pass
338
344
  try:
339
345
  self.proc.wait(timeout=10)
340
346
  except subprocess.TimeoutExpired:
@@ -40,9 +40,9 @@
40
40
  | Ci Cd Pipeline | `ci-cd-pipeline/` | CI/CD pipelines for GitHub Actions and Azure DevOps: build and deploy workflows, quality gates, environment promotion and release automation. |
41
41
  | Gh Cli | `gh-cli/` | GitHub CLI operations — issues, PRs, releases, and repo management |
42
42
  | Git Commit | `git-commit/` | Create well-structured conventional commit messages following Conventional Commits standard. Use when committing changes, preparing PRs, or generating changelogs. |
43
- | Graph Email | `graph-email/` | Send a Markdown file as an email through Microsoft Graph or SMTP, as set in ~/.caddis/email.toml. Default recipient is the owner. |
44
43
  | Port To Github | `port-to-github/` | >- |
45
44
  | Safe Cleanup | `safe-cleanup/` | Use BEFORE deleting a directory tree, scratchpad or git worktree, or "tidying up" generated folders, especially on Windows, where deleting through a junction or symlink destroys its target; and to verify a venv or node_modules survived. |
45
+ | Send Email | `send-email/` | Email a Markdown file via Microsoft Graph or SMTP. Use to email a draft or note. |
46
46
  | Using Git Worktrees | `using-git-worktrees/` | Use when starting feature work that needs isolation from the current workspace, or before executing an implementation plan: creates an isolated git worktree safely. |
47
47
  | Windows Deployment | `windows-deployment/` | Deploy FastAPI + React/Vite apps to Windows Server with NSSM services, IIS or nginx reverse proxy and git-pull. Use for Windows prod deploys, NSSM, reverse proxy setup, dev/prod config, or prod troubleshooting. |
48
48
 
@@ -91,6 +91,7 @@
91
91
  | Gate Preflight | `gate-preflight/` | Deterministic headless preflight — validates a plan against the actual codebase, self-contained (never depends on a skill activating) |
92
92
  | Gate Review | `gate-review/` | Deterministic headless code review — adversarial diff review, self-contained (never depends on a skill activating) |
93
93
  | Glossary | `glossary/` | Define the words this project invented, in one place — .caddis/kb/GLOSSARY.md |
94
+ | Graph Email | `graph-email/` | Send a Markdown file as an email through Microsoft Graph or SMTP, as set in ~/.caddis/email.toml. Default recipient is the owner. |
94
95
  | Handoff | `handoff/` | End-of-session handoff — capture exact state so the next session resumes with zero re-discovery |
95
96
  | Implement | `implement/` | Headless plan executor — implement an approved plan phase-by-phase on the current feature branch, TDD-first, committing per phase |
96
97
  | Install Statusline | `install-statusline/` | Install the caddis status line into Claude Code and agy — one renderer, once per machine |
@@ -3,12 +3,12 @@ name: graph-email
3
3
  description: Send a Markdown file as an email through Microsoft Graph or SMTP, as set in ~/.caddis/email.toml. Default recipient is the owner.
4
4
  ---
5
5
 
6
- Use the `graph-email` skill to send an email.
6
+ Use the `send-email` skill to send an email.
7
7
 
8
8
  Arguments: $ARGUMENTS
9
9
 
10
- 1. Read the skill `graph-email` first and follow it.
11
- 2. If `~/.caddis/email.toml` is missing, or `--check` fails, tell the owner what is missing and stop. Do not guess values.
10
+ 1. Read the skill `send-email` first and follow it.
11
+ 2. If `~/.caddis/email.toml` is missing, or `--check` fails, tell the owner to type `! caddis email setup` in the prompt, then stop. The `!` runs it in their own terminal, so the secret never enters the chat. Name what is missing (setting names only, never values). Do not guess values and do not ask for a secret in the chat.
12
12
  3. The first argument is the Markdown file. If there is none, ask which file, or offer to write one in the project's `comms/` folder.
13
13
  4. Subject: `caddis-<app-name> <subject>`. Take the app name from the project folder. If the owner gave subject words, use them.
14
14
  5. Recipient: the owner's own address unless `--to` is given. If `--to` is any other address, confirm with the owner before sending.
@@ -1,15 +1,22 @@
1
1
  ---
2
- name: graph-email
2
+ name: send-email
3
3
  description: Email a Markdown file via Microsoft Graph or SMTP. Use to email a draft or note.
4
4
  ---
5
5
 
6
- # graph-email
6
+ # send-email
7
7
 
8
8
  Sends one email. The provider is `graph` (Microsoft Graph `sendMail`, client credentials) or `smtp`.
9
9
  The body is a Markdown file. The script turns it into simple HTML. It never prints a secret or a token.
10
10
 
11
11
  ## One-time setup (per machine)
12
12
 
13
+ Run `caddis email setup` in a terminal. In a Claude Code session, type `! caddis email setup` in the prompt: the `!`
14
+ runs it in your terminal, so the secret never enters the chat. It asks for the provider, the sender mailbox and the
15
+ secrets (an env file you already have, or the values, which it saves to `~/.caddis/email.env`). It writes
16
+ `~/.caddis/email.toml`, then runs the check. `caddis email check` repeats the check at any time.
17
+
18
+ Manual setup, if the command is not available:
19
+
13
20
  1. Copy `email.toml.example` from this skill folder to `~/.caddis/email.toml`.
14
21
  2. Set `provider`, `sender` and `env_file`. For SMTP also set the `[smtp]` table.
15
22
  3. Put the secrets in the env file, not in the config file:
@@ -1,4 +1,4 @@
1
- # Example config for the graph-email skill. Copy to ~/.caddis/email.toml and fill in your values.
1
+ # Example config for the send-email skill. Copy to ~/.caddis/email.toml and fill in your values.
2
2
  #
3
3
  # Precedence for every setting: command-line flag, then environment variable, then this file.
4
4
  # Secrets (Graph client secret, SMTP password) never go in this file. They come from the process
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "caddis-extras",
3
- "version": "1.3.51",
3
+ "version": "1.3.52",
4
4
  "description": "caddis-extras — the long-tail skills for the Antigravity (agy) caddis plugin; install alongside caddis for the full set."
5
5
  }
@@ -52,7 +52,6 @@
52
52
  |-------|------|-------------|
53
53
  | Changelog Generator | `changelog-generator/` | Create user-facing changelogs and release notes from git commit history, grouping changes and rewriting technical commits in plain language. |
54
54
  | Deploy Local | `deploy-local/` | Local deployment loop for Gitea-hosted projects: commit on dev, push, watch the golden CI/build/deploy workflow, check prod, and fix lint/test/pipeline failures until the deploy is healthy. |
55
- | Graph Email | `graph-email/` | Email a Markdown file via Microsoft Graph or SMTP. Use to email a draft or note. |
56
55
  | Monorepo | `monorepo/` | Turborepo and pnpm workspaces: turbo.json tasks, remote caching, shared packages, affected-only CI, apps/ vs packages/ layout, and pitfalls like circular deps, version drift and hoisting. |
57
56
  | Runner Move | `runner-move/` | >- |
58
57
  | Safe Cleanup | `safe-cleanup/` | Use BEFORE deleting a directory tree, scratchpad or git worktree, or "tidying up" generated folders, especially on Windows, where deleting through a junction or symlink destroys its target; and to verify a venv or node_modules survived. |
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: send-email
3
+ description: Email a Markdown file via Microsoft Graph or SMTP. Use to email a draft or note.
4
+ ---
5
+
6
+ # send-email
7
+
8
+ Sends one email. The provider is `graph` (Microsoft Graph `sendMail`, client credentials) or `smtp`.
9
+ The body is a Markdown file. The script turns it into simple HTML. It never prints a secret or a token.
10
+
11
+ ## One-time setup (per machine)
12
+
13
+ Run `caddis email setup` in a terminal. In a Claude Code session, type `! caddis email setup` in the prompt: the `!`
14
+ runs it in your terminal, so the secret never enters the chat. It asks for the provider, the sender mailbox and the
15
+ secrets (an env file you already have, or the values, which it saves to `~/.caddis/email.env`). It writes
16
+ `~/.caddis/email.toml`, then runs the check. `caddis email check` repeats the check at any time.
17
+
18
+ Manual setup, if the command is not available:
19
+
20
+ 1. Copy `email.toml.example` from this skill folder to `~/.caddis/email.toml`.
21
+ 2. Set `provider`, `sender` and `env_file`. For SMTP also set the `[smtp]` table.
22
+ 3. Put the secrets in the env file, not in the config file:
23
+ - graph: three keys. The default names are `ALERT_GRAPH_TENANT_ID`, `ALERT_GRAPH_CLIENT_ID`, `ALERT_GRAPH_CLIENT_SECRET`. Change the names in the `[graph]` table if your file uses other names.
24
+ - smtp: one key. The default name is `EMAIL_SMTP_PASSWORD`. Change it with `password_key`.
25
+ 4. Check the setup. This sends nothing and prints no secret:
26
+ `python -I scripts/send_email.py --check`
27
+
28
+ Every setting can be overridden. The order is: command-line flag, then environment variable, then the config file.
29
+ The variables are `CADDIS_EMAIL_PROVIDER`, `CADDIS_EMAIL_SENDER`, `CADDIS_EMAIL_ENV_FILE`, `CADDIS_EMAIL_CONFIG`
30
+ and `CADDIS_EMAIL_SMTP_HOST`, `_PORT`, `_SECURITY`, `_USERNAME`, `_TIMEOUT`. The flags are `--provider`, `--sender`,
31
+ `--env-file`, `--config`, `--smtp-host`, `--smtp-port`, `--smtp-security` (`starttls`, `ssl` or `none`),
32
+ `--smtp-username`, `--smtp-timeout`. The old names `GRAPH_EMAIL_ENV_FILE` and `GRAPH_EMAIL_SENDER` still work.
33
+ Secrets can also be set as process environment variables. They win over the env file.
34
+ With smtp security `none`, the script refuses a username or password and exits with code 2. Use `starttls` or `ssl`.
35
+ For a local test relay only, set `allow_insecure_auth = true` (a boolean) in the `[smtp]` table.
36
+
37
+ ## Steps
38
+
39
+ 1. Write the email as a Markdown file in the project's `comms/` folder (a copy stays in the repo).
40
+ - Put `<!-- email-start -->` before the greeting and `<!-- email-end -->` after the sign-off. Only that part is sent.
41
+ - Write plain, short sentences. No em dashes, no arrows, no emoji, no check marks.
42
+ 2. Subject line: `caddis-<app-name> <short subject>`, for example `caddis-myapp Data request for the weekly report`.
43
+ 3. Dry run. It sends nothing, needs no credentials and writes `<file>.preview.html`:
44
+ `python -I scripts/send_email.py --dry-run --to x@example.com --subject t --body-file <file.md>`
45
+ Read the preview, then delete it.
46
+ 4. Send:
47
+ `python -I scripts/send_email.py --to <address> --subject '<subject>' --body-file <file.md> [--attach <file> ...]`
48
+ `--to` can repeat. Graph HTTP 202 means Graph accepted the mail. An SMTP "accepted" means the server took it.
49
+ Neither proves the inbox received it.
50
+ 5. Tell the owner what was sent, to whom, and the subject.
51
+
52
+ ## Rules
53
+
54
+ - **Default recipient is the owner's own address.** The owner forwards it. Send to a team only when the owner says so
55
+ in this request. Sending to any other address is an outward action: confirm first.
56
+ - Never put personal data, secrets, payment data or customer text in the body.
57
+ - Errors show the provider, the HTTP or SMTP status code and the error name. Do not retry in a loop.
58
+ - Exit codes: 0 done, 1 provider error, 2 missing or invalid setting.
59
+
60
+ Script: `scripts/send_email.py` in this skill folder (Python 3.11 or later, standard library only).
@@ -0,0 +1,44 @@
1
+ # Example config for the send-email skill. Copy to ~/.caddis/email.toml and fill in your values.
2
+ #
3
+ # Precedence for every setting: command-line flag, then environment variable, then this file.
4
+ # Secrets (Graph client secret, SMTP password) never go in this file. They come from the process
5
+ # environment or from the env file named by `env_file` below.
6
+
7
+ # Which sender to use: "graph" (Microsoft Graph sendMail) or "smtp". Default: "graph".
8
+ # Env var: CADDIS_EMAIL_PROVIDER. Flag: --provider.
9
+ provider = "graph"
10
+
11
+ # The mailbox or address the mail is sent from.
12
+ # Env var: CADDIS_EMAIL_SENDER. Flag: --sender.
13
+ sender = ""
14
+
15
+ # Path to an env file (KEY=value lines) that holds the secrets. Use a literal string
16
+ # (single quotes) so a Windows path needs no escaping.
17
+ # Env var: CADDIS_EMAIL_ENV_FILE. Flag: --env-file.
18
+ env_file = ""
19
+
20
+ [graph]
21
+ # The NAMES of the keys in the env file (or environment) that hold the values.
22
+ # These are the defaults. Change them only if your env file uses other names.
23
+ tenant_id_key = "ALERT_GRAPH_TENANT_ID"
24
+ client_id_key = "ALERT_GRAPH_CLIENT_ID"
25
+ client_secret_key = "ALERT_GRAPH_CLIENT_SECRET"
26
+
27
+ [smtp]
28
+ # Used when provider = "smtp".
29
+ # Env vars: CADDIS_EMAIL_SMTP_HOST, _PORT, _SECURITY, _USERNAME, _TIMEOUT.
30
+ # Flags: --smtp-host, --smtp-port, --smtp-security, --smtp-username, --smtp-timeout.
31
+ host = ""
32
+ # "starttls" (port 587), "ssl" (port 465) or "none" (port 25, no encryption).
33
+ security = "starttls"
34
+ # With security "none", the script refuses to send a username or password. Set this to true
35
+ # (a boolean, not a string) only for a local test relay. File only: no env var or flag.
36
+ # allow_insecure_auth = false
37
+ # Leave out `port` to use the default for the security mode.
38
+ # port = 587
39
+ # Leave empty if the server needs no login.
40
+ username = ""
41
+ # The NAME of the key that holds the password (in the environment or the env file).
42
+ password_key = "EMAIL_SMTP_PASSWORD"
43
+ # Seconds to wait for the server.
44
+ timeout = 30