dofleet 0.1.0__tar.gz
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.
- dofleet-0.1.0/.depot/workflows/gerbang.yml +21 -0
- dofleet-0.1.0/.github/workflows/ci.yml +20 -0
- dofleet-0.1.0/.github/workflows/release.yml +74 -0
- dofleet-0.1.0/.gitignore +8 -0
- dofleet-0.1.0/.pagar/baseline.json +124 -0
- dofleet-0.1.0/.pagar/config.json +4 -0
- dofleet-0.1.0/02-DECISIONS.md +94 -0
- dofleet-0.1.0/CHANGELOG.md +26 -0
- dofleet-0.1.0/LICENSE +21 -0
- dofleet-0.1.0/NEXT.md +13 -0
- dofleet-0.1.0/PKG-INFO +258 -0
- dofleet-0.1.0/README.md +236 -0
- dofleet-0.1.0/README.ms.md +71 -0
- dofleet-0.1.0/action.yml +72 -0
- dofleet-0.1.0/assets/banner-dark.svg +12 -0
- dofleet-0.1.0/assets/banner-light.svg +12 -0
- dofleet-0.1.0/assets/demo.gif +0 -0
- dofleet-0.1.0/assets/logo-dark.svg +13 -0
- dofleet-0.1.0/assets/logo.svg +13 -0
- dofleet-0.1.0/assets/social.png +0 -0
- dofleet-0.1.0/pyproject.toml +47 -0
- dofleet-0.1.0/scripts/action.sh +34 -0
- dofleet-0.1.0/scripts/gate.sh +15 -0
- dofleet-0.1.0/scripts/make-assets.py +76 -0
- dofleet-0.1.0/server.json +37 -0
- dofleet-0.1.0/src/dofleet/__init__.py +3 -0
- dofleet-0.1.0/src/dofleet/__main__.py +3 -0
- dofleet-0.1.0/src/dofleet/api.py +148 -0
- dofleet-0.1.0/src/dofleet/bake.py +65 -0
- dofleet-0.1.0/src/dofleet/budget.py +73 -0
- dofleet-0.1.0/src/dofleet/cli.py +365 -0
- dofleet-0.1.0/src/dofleet/cli_info.py +109 -0
- dofleet-0.1.0/src/dofleet/cli_jobs.py +151 -0
- dofleet-0.1.0/src/dofleet/cloudinit.py +87 -0
- dofleet-0.1.0/src/dofleet/config.py +163 -0
- dofleet-0.1.0/src/dofleet/data/presets.toml +85 -0
- dofleet-0.1.0/src/dofleet/data/reaper_function.py +132 -0
- dofleet-0.1.0/src/dofleet/data/templates/_volumes.sh +9 -0
- dofleet-0.1.0/src/dofleet/data/templates/desktop.sh +16 -0
- dofleet-0.1.0/src/dofleet/data/templates/docker.sh +7 -0
- dofleet-0.1.0/src/dofleet/data/templates/harden.sh +25 -0
- dofleet-0.1.0/src/dofleet/faas.py +83 -0
- dofleet-0.1.0/src/dofleet/fleet.py +128 -0
- dofleet-0.1.0/src/dofleet/i18n.py +44 -0
- dofleet-0.1.0/src/dofleet/launch.py +35 -0
- dofleet-0.1.0/src/dofleet/locales/en.json +150 -0
- dofleet-0.1.0/src/dofleet/locales/ms.json +150 -0
- dofleet-0.1.0/src/dofleet/mcp_server.py +172 -0
- dofleet-0.1.0/src/dofleet/menu.py +52 -0
- dofleet-0.1.0/src/dofleet/ops.py +319 -0
- dofleet-0.1.0/src/dofleet/placement.py +60 -0
- dofleet-0.1.0/src/dofleet/ready.py +100 -0
- dofleet-0.1.0/src/dofleet/runjob.py +75 -0
- dofleet-0.1.0/src/dofleet/volumes.py +66 -0
- dofleet-0.1.0/tests/fake_do.py +168 -0
- dofleet-0.1.0/tests/test_cli.py +260 -0
- dofleet-0.1.0/tests/test_logic.py +163 -0
- dofleet-0.1.0/tests/test_more.py +300 -0
- dofleet-0.1.0/uv.lock +405 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Gerbang dofleet di Depot CI (mesin jauh) — dipanggil oleh ~/bin/gerbang-depot.sh (autopilot gerbang_jauh / deploy), bukan push/PR.
|
|
2
|
+
# Dijana `~/bin/depot-workflow.sh` dari ~/ops/depot/templat/gerbang-uv.yml (stack: Python + uv, uv.lock; pelayar Playwright).
|
|
3
|
+
# ⚠ Sandbox memaksa warna: ujian yang mencari teks output CLI perlu NO_COLOR. Tiada rahsia; pelari Depot TIADA /etc/machine-id.
|
|
4
|
+
name: gerbang
|
|
5
|
+
on: workflow_dispatch
|
|
6
|
+
jobs:
|
|
7
|
+
gerbang:
|
|
8
|
+
runs-on: depot-ubuntu-24.04-4
|
|
9
|
+
timeout-minutes: 30
|
|
10
|
+
env:
|
|
11
|
+
NO_COLOR: "1"
|
|
12
|
+
CI: "1"
|
|
13
|
+
TERM: dumb
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: astral-sh/setup-uv@v5
|
|
17
|
+
with:
|
|
18
|
+
version: "0.12.5"
|
|
19
|
+
- run: uv sync --frozen
|
|
20
|
+
- run: uv run --frozen playwright install --with-deps chromium webkit || true
|
|
21
|
+
- run: bash scripts/gate.sh
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: tests
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
pull_request:
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python: ["3.11", "3.12", "3.13"]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: ${{ matrix.python }}
|
|
19
|
+
- run: pip install -e '.[dev]'
|
|
20
|
+
- run: pytest -q
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
# Publishes to PyPI with Trusted Publishing (OIDC, no API token) only when a
|
|
4
|
+
# GitHub Release is published. Configure the "pypi" environment and the
|
|
5
|
+
# trusted publisher on PyPI before the first release.
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [published]
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
18
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
19
|
+
with:
|
|
20
|
+
version: "0.12.24"
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
enable-cache: false # never restore a cache into a publishing job
|
|
23
|
+
# Same build as the CI base-install job (sdist, then the wheel from the sdist).
|
|
24
|
+
- run: uv build
|
|
25
|
+
# README renders on PyPI and the metadata is well-formed.
|
|
26
|
+
- run: uvx twine@7.0.0 check --strict dist/*
|
|
27
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
28
|
+
with:
|
|
29
|
+
name: dist
|
|
30
|
+
path: dist/
|
|
31
|
+
|
|
32
|
+
publish:
|
|
33
|
+
needs: build
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
environment:
|
|
36
|
+
name: pypi
|
|
37
|
+
url: https://pypi.org/p/dofleet
|
|
38
|
+
permissions:
|
|
39
|
+
id-token: write
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
42
|
+
with:
|
|
43
|
+
name: dist
|
|
44
|
+
path: dist/
|
|
45
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
|
46
|
+
|
|
47
|
+
# Official MCP Registry (io.github.aimanmalib/dofleet). Order per the registry docs: the PyPI release must exist first; the
|
|
48
|
+
# registry checks the "mcp-name:" marker in the PyPI description. GitHub OIDC login: no secret needed.
|
|
49
|
+
mcp-registry:
|
|
50
|
+
needs: publish
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
permissions:
|
|
53
|
+
id-token: write
|
|
54
|
+
contents: read
|
|
55
|
+
env:
|
|
56
|
+
MCP_PUBLISHER_VERSION: v1.8.15
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
59
|
+
- uses: sigstore/cosign-installer@756fe2d284c7292c4e9b62c8a28f1e5629c59532 # v4.1.3
|
|
60
|
+
- name: Install mcp-publisher (signature verified)
|
|
61
|
+
run: |
|
|
62
|
+
base="https://github.com/modelcontextprotocol/registry/releases/download/${MCP_PUBLISHER_VERSION}"
|
|
63
|
+
curl -sSfL -o mcp.tgz "$base/mcp-publisher_linux_amd64.tar.gz"
|
|
64
|
+
curl -sSfL -o mcp.tgz.sigstore.json "$base/mcp-publisher_linux_amd64.tar.gz.sigstore.json"
|
|
65
|
+
cosign verify-blob --bundle mcp.tgz.sigstore.json \
|
|
66
|
+
--certificate-identity-regexp '^https://github.com/modelcontextprotocol/registry/' \
|
|
67
|
+
--certificate-oidc-issuer https://token.actions.githubusercontent.com mcp.tgz
|
|
68
|
+
tar xzf mcp.tgz mcp-publisher
|
|
69
|
+
- run: ./mcp-publisher validate
|
|
70
|
+
- run: ./mcp-publisher login github-oidc
|
|
71
|
+
- name: Publish (retries while PyPI catches up with the new version)
|
|
72
|
+
run: |
|
|
73
|
+
for _ in 1 2 3 4 5; do ./mcp-publisher publish && exit 0; sleep 30; done
|
|
74
|
+
exit 1
|
dofleet-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_lalai": {
|
|
3
|
+
"abai": [
|
|
4
|
+
"**/node_modules/**",
|
|
5
|
+
"**/vendor/**",
|
|
6
|
+
"**/dist/**",
|
|
7
|
+
"**/build/**",
|
|
8
|
+
"**/.next/**",
|
|
9
|
+
"**/out/**",
|
|
10
|
+
"**/migrations/**",
|
|
11
|
+
"**/database/migrations/**",
|
|
12
|
+
"**/*.min.*",
|
|
13
|
+
"**/*.lock",
|
|
14
|
+
"**/package-lock.json",
|
|
15
|
+
"**/pnpm-lock.yaml",
|
|
16
|
+
"**/__pycache__/**",
|
|
17
|
+
"**/.venv/**",
|
|
18
|
+
"**/coverage/**",
|
|
19
|
+
"**/.agents/**",
|
|
20
|
+
"**/.claude/skills/**",
|
|
21
|
+
"research/**",
|
|
22
|
+
"**/assets/*-*.js",
|
|
23
|
+
"**/assets/*-*.css"
|
|
24
|
+
],
|
|
25
|
+
"bait_sebaris": 100,
|
|
26
|
+
"corak_dijana": [
|
|
27
|
+
"**/payload-types.ts",
|
|
28
|
+
"**/payload-generated-schema.ts",
|
|
29
|
+
"**/app/(payload)/admin/importMap.js",
|
|
30
|
+
"**/routeTree.gen.ts"
|
|
31
|
+
],
|
|
32
|
+
"corak_ujian": [
|
|
33
|
+
"**/test/**",
|
|
34
|
+
"**/tests/**",
|
|
35
|
+
"**/__tests__/**",
|
|
36
|
+
"**/*.test.*",
|
|
37
|
+
"**/*.spec.*",
|
|
38
|
+
"**/test_*.py",
|
|
39
|
+
"**/*_test.py",
|
|
40
|
+
"**/uji-*",
|
|
41
|
+
"**/uji_*"
|
|
42
|
+
],
|
|
43
|
+
"had_baris": 800,
|
|
44
|
+
"had_baris_ujian": 1500,
|
|
45
|
+
"had_claude_md": 200,
|
|
46
|
+
"had_next_md": 250,
|
|
47
|
+
"had_readme_md": 500,
|
|
48
|
+
"luar": [],
|
|
49
|
+
"penanda_jana": [
|
|
50
|
+
"automatically generated",
|
|
51
|
+
"@generated",
|
|
52
|
+
"auto-generated",
|
|
53
|
+
"autogenerated",
|
|
54
|
+
"this file is generated",
|
|
55
|
+
"this file was generated",
|
|
56
|
+
"code generated by",
|
|
57
|
+
"generated file"
|
|
58
|
+
],
|
|
59
|
+
"pendua_min_baris": 10,
|
|
60
|
+
"rekod_keputusan": [
|
|
61
|
+
"02-DECISIONS.md",
|
|
62
|
+
"DECISIONS.md",
|
|
63
|
+
"docs/02-DECISIONS.md",
|
|
64
|
+
"docs/DECISIONS.md",
|
|
65
|
+
"docs/decisions",
|
|
66
|
+
"docs/adr",
|
|
67
|
+
"adr",
|
|
68
|
+
"doc/adr"
|
|
69
|
+
],
|
|
70
|
+
"sambungan_kod": [
|
|
71
|
+
".py",
|
|
72
|
+
".mjs",
|
|
73
|
+
".cjs",
|
|
74
|
+
".js",
|
|
75
|
+
".jsx",
|
|
76
|
+
".ts",
|
|
77
|
+
".tsx",
|
|
78
|
+
".php",
|
|
79
|
+
".sh",
|
|
80
|
+
".vue",
|
|
81
|
+
".svelte",
|
|
82
|
+
".astro",
|
|
83
|
+
".go",
|
|
84
|
+
".rb",
|
|
85
|
+
".css",
|
|
86
|
+
".scss",
|
|
87
|
+
".mts",
|
|
88
|
+
".cts",
|
|
89
|
+
".kt",
|
|
90
|
+
".kts",
|
|
91
|
+
".java",
|
|
92
|
+
".rs",
|
|
93
|
+
".swift",
|
|
94
|
+
".bash",
|
|
95
|
+
".zsh",
|
|
96
|
+
".less",
|
|
97
|
+
".sass",
|
|
98
|
+
".c",
|
|
99
|
+
".h",
|
|
100
|
+
".cc",
|
|
101
|
+
".cpp",
|
|
102
|
+
".hpp",
|
|
103
|
+
".cs",
|
|
104
|
+
".inc",
|
|
105
|
+
".pl",
|
|
106
|
+
".pm",
|
|
107
|
+
".lua",
|
|
108
|
+
".dart",
|
|
109
|
+
".scala",
|
|
110
|
+
".ex",
|
|
111
|
+
".exs",
|
|
112
|
+
".groovy",
|
|
113
|
+
".ps1"
|
|
114
|
+
],
|
|
115
|
+
"sasaran_baris": 400
|
|
116
|
+
},
|
|
117
|
+
"metrik": {
|
|
118
|
+
"baris": {},
|
|
119
|
+
"dijana": {},
|
|
120
|
+
"meta": {},
|
|
121
|
+
"pendua": {}
|
|
122
|
+
},
|
|
123
|
+
"versi": 1
|
|
124
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Decisions
|
|
2
|
+
|
|
3
|
+
## D1 (23 Nov 2026): rewrite, not a cleanup of do-manager
|
|
4
|
+
The old private `aimanmalib/do-manager` was a menu around the same calls `doctl` already makes, plus a Windows RDP
|
|
5
|
+
script and unrelated files (a TikTok view bot, a baked-in password, PyInstaller .exe files). Cleaning it up would still
|
|
6
|
+
leave a weaker doctl. Owner asked for a new repo with new behaviour. The new tool targets one job doctl does not do:
|
|
7
|
+
short-lived droplets that get deleted on time. No code or history is carried over; the old repo stays private.
|
|
8
|
+
|
|
9
|
+
## D2: expiry lives in DigitalOcean tags, not a local database
|
|
10
|
+
`dofleet` + `dofleet-exp-<unix time>`. Any machine with the token can reap; nothing to lose if the laptop dies.
|
|
11
|
+
`reap` refuses droplets without the `dofleet` marker tag, so a stray `dofleet-exp-*` tag on a hand-made droplet is ignored.
|
|
12
|
+
Undo: `dofleet extend NAME --keep` removes the timer.
|
|
13
|
+
|
|
14
|
+
## D3: httpx directly instead of pydo (the official Python client)
|
|
15
|
+
dofleet uses about 15 endpoints. A thin client keeps the install small and lets the tests run against an
|
|
16
|
+
`httpx.MockTransport` fake with no network. Revisit if the endpoint list grows past what one file can hold.
|
|
17
|
+
|
|
18
|
+
## D4: setup templates are shell scripts, not cloud-config YAML
|
|
19
|
+
Composable with `#include`, readable by anyone, no YAML dependency. cloud-init runs a `#!/bin/bash` user_data as-is.
|
|
20
|
+
Placeholder values are limited to a safe character set because they are pasted into shell.
|
|
21
|
+
|
|
22
|
+
## D5: owner's fixed values
|
|
23
|
+
1. Bilingual: every user-facing string in `locales/en.json` + `locales/ms.json`; a test fails when keys or placeholders differ.
|
|
24
|
+
2. Product-grade UX: menu for non-CLI users, plan + cost shown before anything is created, typed confirmation above a cost limit.
|
|
25
|
+
3. Change without code: presets, fallback chains, timers, limits and language live in `data/presets.toml`,
|
|
26
|
+
overridden by the user's `config.toml`; setup scripts are files.
|
|
27
|
+
4. Small modules (each under 400 lines), decisions here, undo noted per decision.
|
|
28
|
+
|
|
29
|
+
## D6: region order beats size order in fallback
|
|
30
|
+
A user who asks for Singapore would rather get the AMD twin in Singapore than the basic size in Bangalore.
|
|
31
|
+
|
|
32
|
+
## D7 (23 Nov 2026): red team against a real account, and what changed
|
|
33
|
+
Measured on a real DigitalOcean account (sgp1, 3 droplets created and deleted, total cost under $0.10):
|
|
34
|
+
- **Lockout:** account with no SSH key + `harden` (PermitRootLogin prohibit-password, password auth off) = the emailed root
|
|
35
|
+
password is useless and the box is unreachable. Fix: upload the local public key when the account has none; with no key
|
|
36
|
+
anywhere keep root + password login on (`root_login`, `password_auth` template vars). Test: `test_up_without_any_key_*`.
|
|
37
|
+
- **"Ready" too early:** port 22 opened about a minute before cloud-init finished (ops user missing). Fix: poll
|
|
38
|
+
`cloud-init status` over SSH; `unknown` (no working key) falls back to the port check.
|
|
39
|
+
- **Duplicate droplets:** POST /droplets was retried on 5xx. A 5xx on create can still create droplets. Fix: POST retries on 429 only.
|
|
40
|
+
- **`down '*'`** would delete droplets made by hand. Fix: patterns skip unmanaged droplets unless `--any`; exact names/ids always work.
|
|
41
|
+
- **Volumes:** attaching at create did not mount anything (filesystem stayed empty, nothing in `df`). Fix: our own mount step
|
|
42
|
+
(`_volumes.sh`), run before the template. Selective destroy works but is asynchronous (volume gone 30 to 90 s later).
|
|
43
|
+
- **Key name leaked the host name** (`dofleet-ip-<host ip>`). Fix: name = hash of the key.
|
|
44
|
+
Verified on the droplet: cloud-init `done`, sudo without password, ufw active, fail2ban active, `passwordauthentication no`,
|
|
45
|
+
password login refused, root by key works; desktop: xrdp active, 3389 reachable, generated password matches /etc/shadow and is
|
|
46
|
+
not in cloud-init-output.log; volume mounted at `/mnt/<name>`. Not verified: a full graphical RDP session.
|
|
47
|
+
|
|
48
|
+
## D8: the author's own setup stays out of this repo
|
|
49
|
+
The author runs `reap` from cron on a server and keeps a private preset for a disaster-recovery drill (a box with two 100 GB
|
|
50
|
+
volumes). Those live in a separate private config, not here, so the tool and its defaults stay generic.
|
|
51
|
+
|
|
52
|
+
## D9 (23 Nov 2026): run, budget, Functions reaper, MCP, bake, GitHub Action, GPU rule
|
|
53
|
+
All seven were exercised on the live account the same day:
|
|
54
|
+
- `run tiny --sync --pull --env`: 2.3 min end to end, output streamed, result file pulled, droplet gone. Found: a second
|
|
55
|
+
run seconds after a key upload got 422 "already in use" because the key list lags; keys are now looked up by MD5
|
|
56
|
+
fingerprint (`GET /account/keys/<fp>`), which matched `ssh-keygen -E md5`.
|
|
57
|
+
- budget: `budget_usd = 0.001` refused the create before any API write.
|
|
58
|
+
- Functions reaper: namespace + python:3.12 action + SCHEDULED trigger. A droplet with a 1 min timer was deleted by the
|
|
59
|
+
Function at 21:15:47 while the host cron had last run at 21:10, so the Function did it. The namespace key is only
|
|
60
|
+
returned on create, so install deletes and recreates the `dofleet` namespace (idempotent). The reaper code is a
|
|
61
|
+
standalone stdlib file because the runtime has nothing else.
|
|
62
|
+
- MCP: a real `claude -p` session created `tiny`, ran a command, deleted it, and was refused `desktop` by policy.
|
|
63
|
+
Hand-written JSON-RPC (no SDK dependency); the agent only sees droplets tagged `dofleet`.
|
|
64
|
+
- bake: snapshot of a 10 GB droplet took 34 s; `up --baked` was ready in 40 s (vs about 150 s) with the harden setup intact.
|
|
65
|
+
- GitHub Action: `scripts/action.sh` run locally with Actions-style env created and deleted `pr-42` and wrote ip/name outputs.
|
|
66
|
+
Inputs reach the script as env vars, never pasted into shell. Not yet run on GitHub itself (repo is private).
|
|
67
|
+
- GPU: this account has no GPU sizes, so the error now says so (`err.size_unknown`) instead of "sold out".
|
|
68
|
+
Other finds: Rich swallowed `[tor1, nyc2]` in error text as markup (now escaped); DigitalOcean reuses IPs, so every
|
|
69
|
+
droplet gets its own known_hosts file instead of a shared one.
|
|
70
|
+
|
|
71
|
+
## D10 (23 Nov 2026): second red team (independent reviewer) and fixes
|
|
72
|
+
An independent review (code only, no conclusions handed over) reported 15 findings; the two high ones and one medium were
|
|
73
|
+
reproduced on the fake API before fixing (verify script: extend glob tagged a hand-made `web-prod`; an MCP agent deleted a
|
|
74
|
+
human's `db`; a missing argument crashed the MCP server). Fixed, each with a regression test:
|
|
75
|
+
- `extend` only acts on dofleet droplets and never adds the `dofleet` tag (a timer would hand a foreign droplet to the reaper).
|
|
76
|
+
- MCP agents only see droplets they created (`dofleet-mcp` tag; `scope = "all"` to widen); any exception becomes an error reply;
|
|
77
|
+
extend checks the budget. Verified live: the agent could not exec on or delete `human-db`, and could on its own `agent-box`.
|
|
78
|
+
- Orphan volumes: age counted from a `dofleet-detached-<time>` tag set when a sweep first sees the volume detached, not from creation.
|
|
79
|
+
- Budget includes what running droplets will still cost (to their timer or month end) and is checked again after a dearer fallback.
|
|
80
|
+
- Reapers re-read each droplet just before deleting (an `extend` in between wins); the Function treats 422 as "already going".
|
|
81
|
+
- `install-reaper` creates the new namespace first and removes the old one only after it works. Measured: labels must be unique
|
|
82
|
+
per account (422 "label already in use"), so new namespaces get `dofleet-<unix time>`; the fake API now enforces that too.
|
|
83
|
+
`--every` must map to a valid cron (5m..30m, 1h..12h, 1d).
|
|
84
|
+
- `run`: droplets are tracked as soon as they exist (cleanup even if waiting fails); results unpacked with tarfile filter
|
|
85
|
+
"data" (test with a `../../escaped.txt` member); `--env` names validated. Volume names get a random suffix.
|
|
86
|
+
- GitHub Action: `version` via env, `args` for run = one shell string, `down --missing-ok` instead of `|| true`, the runner key
|
|
87
|
+
is always added (`DOFLEET_UPLOAD_KEY=always`), a generated password is masked and kept out of step outputs.
|
|
88
|
+
Not changed: the desktop password still travels in user data (readable by processes on that droplet); documented in README.
|
|
89
|
+
|
|
90
|
+
## D11: logo, banner, demo
|
|
91
|
+
Mark = a droplet holding a countdown ring; the amber dot marks time already gone. Colours avoid DigitalOcean's blue on purpose
|
|
92
|
+
(no confusion with their brand). Wordmark and tagline are outlined paths (Space Grotesk, OFL) because GitHub does not load
|
|
93
|
+
fonts inside SVG. `scripts/make-assets.py` rebuilds banner-{light,dark}.svg and social.png. The demo GIF is a real recording
|
|
94
|
+
(asciinema + agg), with spinner time compressed; nothing in it is staged.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (unreleased)
|
|
4
|
+
|
|
5
|
+
First version. Rewritten from scratch; it shares no code with the private scripts it replaces.
|
|
6
|
+
|
|
7
|
+
- `up` with presets, sold-out fallback across sizes and regions, cost shown before confirm, wait until the port answers
|
|
8
|
+
- Expiry timers as droplet tags, `reap` for cron, `extend`
|
|
9
|
+
- `ls` with spend so far and time left, `cost`, `sizes`, `down`, `restart`, `ssh`, `whoami`
|
|
10
|
+
- Setup templates: harden, docker, desktop (XFCE over RDP)
|
|
11
|
+
- English and Bahasa Melayu output, `--json` everywhere, numbered menu
|
|
12
|
+
- Block storage volumes (`volumes` / `--volume`): mounted on boot, deleted with the droplet, orphans reaped
|
|
13
|
+
- Accounts without an SSH key: local public key uploaded; with no key at all, root password login stays on
|
|
14
|
+
- "Ready" waits for cloud-init to finish (over SSH); setup failures are reported
|
|
15
|
+
- `run`: one job on a fresh droplet (copy up, run, copy back, delete), exit code passed through
|
|
16
|
+
- Month budget (`budget_usd`, `budget_action`): blocks creates, reaper can stop the fleet; GPU sizes need a timer
|
|
17
|
+
- `install-reaper`: the reaper as a scheduled DigitalOcean Function (no local cron needed)
|
|
18
|
+
- `mcp`: MCP server so AI agents can borrow droplets under a policy, without the token
|
|
19
|
+
- `bake` / `up --baked` / `snapshots`: boot from a finished setup in about 40 s
|
|
20
|
+
- GitHub Action (`action.yml`) for CI jobs and pull request previews
|
|
21
|
+
- `gpu` preset; per-droplet known_hosts (DigitalOcean reuses IPs); SSH key looked up by fingerprint
|
|
22
|
+
- Logo, light/dark banner, social preview, real demo GIF in the README; security model section
|
|
23
|
+
- Second red team: extend/MCP scoping, detached-volume clock, committed spend in the budget, reaper re-check before delete,
|
|
24
|
+
new-before-old reaper install, safe tar extraction, Action input hardening (02-DECISIONS.md D10)
|
|
25
|
+
- Safety: glob patterns in `down` skip droplets dofleet did not make (`--any` to include); create is never retried after 5xx;
|
|
26
|
+
`reap` keeps going when one delete fails and treats 404 as done; `notify_cmd` hook
|
dofleet-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aiman Malib
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
dofleet-0.1.0/NEXT.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# NEXT (start here)
|
|
2
|
+
|
|
3
|
+
State: PUBLIC since 23 Nov 2026 (CI green on 3.11 to 3.13, social preview set). Not on PyPI yet. Every feature was run against a live
|
|
4
|
+
account (02-DECISIONS.md D7, D9, D10). Operator notes for the author's own server live outside this repo.
|
|
5
|
+
|
|
6
|
+
1. Release v0.1.0. Needs a PyPI pending publisher (project `dofleet`, owner `aimanmalib`, repo `dofleet`, workflow `release.yml`,
|
|
7
|
+
environment `pypi`). Either the owner adds it once by hand, or (long-term) the owner creates a PyPI MACHINE account and puts it in
|
|
8
|
+
the key vault; then a session runs `wakil masuk pypi` and adds publishers itself (recipe ~/peranan/wakil/laman.json `pypi`). Then: `gh release create v0.1.0 --generate-notes` → `release.yml` builds, runs
|
|
9
|
+
`twine check`, publishes to PyPI (Trusted Publishing), then publishes `server.json` to the official MCP Registry (GitHub OIDC).
|
|
10
|
+
Check after: https://pypi.org/p/dofleet and `mcp-publisher` / registry search for `io.github.aimanmalib/dofleet`.
|
|
11
|
+
2. After PyPI is live: PR to punkpeye/awesome-mcp-servers; run the GitHub Action once for real (`uses: aimanmalib/dofleet@main`).
|
|
12
|
+
3. Recognition: Write for DOnations pitch (topic idea: "Never pay for a forgotten droplet again", built on `run` + budget + reaper).
|
|
13
|
+
4. Not yet verified: a graphical RDP session to `desktop`; GPU presets on an account with GPU access.
|