machina-cli 0.2.27__tar.gz → 0.4.2__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.
- {machina_cli-0.2.27 → machina_cli-0.4.2}/CHANGELOG.md +27 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/PKG-INFO +9 -1
- {machina_cli-0.2.27 → machina_cli-0.4.2}/README.md +8 -0
- machina_cli-0.4.2/docs/agentic-harness-loop.md +821 -0
- machina_cli-0.4.2/docs/harness-loop-kit/PLAYBOOK-SCORECARD.md +124 -0
- machina_cli-0.4.2/docs/harness-loop-kit/README.md +219 -0
- machina_cli-0.4.2/docs/harness-loop-kit/VALIDATION.md +241 -0
- machina_cli-0.4.2/docs/harness-loop-kit/context-verify.py +530 -0
- machina_cli-0.4.2/docs/harness-loop-kit/provision.py +406 -0
- machina_cli-0.4.2/docs/loop-tools-connector.py +95 -0
- machina_cli-0.4.2/docs-site/.gitignore +4 -0
- machina_cli-0.4.2/docs-site/.vitepress/config.mts +98 -0
- machina_cli-0.4.2/docs-site/.vitepress/theme/custom.css +22 -0
- machina_cli-0.4.2/docs-site/.vitepress/theme/index.ts +4 -0
- machina_cli-0.4.2/docs-site/README.md +42 -0
- machina_cli-0.4.2/docs-site/commands/agent.md +36 -0
- machina_cli-0.4.2/docs-site/commands/config.md +24 -0
- machina_cli-0.4.2/docs-site/commands/connector.md +20 -0
- machina_cli-0.4.2/docs-site/commands/credentials.md +28 -0
- machina_cli-0.4.2/docs-site/commands/deploy.md +23 -0
- machina_cli-0.4.2/docs-site/commands/document.md +19 -0
- machina_cli-0.4.2/docs-site/commands/execution.md +24 -0
- machina_cli-0.4.2/docs-site/commands/factory.md +113 -0
- machina_cli-0.4.2/docs-site/commands/login.md +32 -0
- machina_cli-0.4.2/docs-site/commands/loop.md +176 -0
- machina_cli-0.4.2/docs-site/commands/mapping.md +18 -0
- machina_cli-0.4.2/docs-site/commands/org.md +24 -0
- machina_cli-0.4.2/docs-site/commands/project.md +27 -0
- machina_cli-0.4.2/docs-site/commands/prompt.md +18 -0
- machina_cli-0.4.2/docs-site/commands/skills.md +29 -0
- machina_cli-0.4.2/docs-site/commands/sports.md +44 -0
- machina_cli-0.4.2/docs-site/commands/template.md +39 -0
- machina_cli-0.4.2/docs-site/commands/update.md +21 -0
- machina_cli-0.4.2/docs-site/commands/workflow.md +35 -0
- machina_cli-0.4.2/docs-site/guide/authentication.md +52 -0
- machina_cli-0.4.2/docs-site/guide/configuration.md +55 -0
- machina_cli-0.4.2/docs-site/guide/installation.md +62 -0
- machina_cli-0.4.2/docs-site/guide/quickstart.md +47 -0
- machina_cli-0.4.2/docs-site/guide/repl.md +44 -0
- machina_cli-0.4.2/docs-site/guide/running.md +60 -0
- machina_cli-0.4.2/docs-site/index.md +69 -0
- machina_cli-0.4.2/docs-site/package-lock.json +2513 -0
- machina_cli-0.4.2/docs-site/package.json +14 -0
- machina_cli-0.4.2/docs-site/public/favicon.ico +0 -0
- machina_cli-0.4.2/docs-site/public/machina-logo-dark.png +0 -0
- machina_cli-0.4.2/docs-site/public/machina-logo-light.png +0 -0
- machina_cli-0.4.2/docs-site/vercel.json +7 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/pyproject.toml +1 -1
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/__init__.py +1 -1
- machina_cli-0.4.2/src/machina_cli/commands/loop.py +186 -0
- machina_cli-0.4.2/src/machina_cli/commands/org.py +467 -0
- machina_cli-0.4.2/src/machina_cli/loop_client.py +87 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/main.py +3 -1
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/repl.py +2 -0
- machina_cli-0.4.2/tests/test_org_usage.py +203 -0
- machina_cli-0.2.27/docs/factory.md +0 -167
- machina_cli-0.2.27/src/machina_cli/commands/org.py +0 -120
- {machina_cli-0.2.27 → machina_cli-0.4.2}/.github/workflows/ci.yml +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/.github/workflows/release.yml +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/.gitignore +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/CLAUDE.md +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/docs/credentials.md +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/install.ps1 +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/install.sh +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/browser_auth.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/client.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/__init__.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/agent.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/auth.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/config_cmd.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/connect.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/connector.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/credentials.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/deploy.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/document.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/execution.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/factory.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/mapping.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/mcp.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/project.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/prompt.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/skills.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/sports.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/template.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/commands/workflow.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/config.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/factory_client.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/models/__init__.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/project_client.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/src/machina_cli/updater.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/tests/__init__.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/tests/test_cli_output.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/tests/test_connect.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/tests/test_mcp_url.py +0 -0
- {machina_cli-0.2.27 → machina_cli-0.4.2}/tests/test_sports_integration.py +0 -0
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to machina-cli are documented here.
|
|
4
4
|
|
|
5
|
+
## [0.4.2] - 2026-06-29
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **`machina org usage`**: roll up LLM token consumption across an organization's agent executions — the repeatable answer to "how many tokens did this org consume". Token usage is recorded on **agent** executions (`execution_tokens`), not workflow executions, and the Client-API `execution/agent-search` totals are **page-level only**, so the command iterates the org's projects and paginates+sums client-side, broken down by **project, agent, and day**, with the prompt/completion split surfaced (the cost-shape signal — SportingBOT's chat is ~98% prompt tokens). Flags: `--org` (defaults to the selected org), `--project` to scope to one, `--days` window (default 30; a frozen upper bound keeps pagination stable as new runs arrive), `--top`, `--limit`, and `--json`. Unreachable/undeployed projects are skipped and listed under `projects_unreachable` rather than failing the run. Verified end-to-end against the live Entain SportingBOT deployment.
|
|
9
|
+
|
|
10
|
+
## [0.4.1] - 2026-06-26
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Loop retry-with-critique (Cap 8.2).** When the gate passes but the independent evaluator *rejects* a turn's answer, the loop now does ONE bounded repair pass — feeding the rejection reason back into a `loop-repair` prompt — then re-verifies with `loop-evaluate-2` before deciding `idle` vs `needs_review`. Generator/evaluator → generator/evaluator/**repairer**. A *gate* failure is still never repaired (straight to `needs_review`); the repair is bounded to one pass (no loop). `value.verification.repaired` records whether a turn self-healed; the CLI appends `· self-repaired` to the verdict line. Provisioner adds the `loop-repair` + `loop-evaluate-2` prompts.
|
|
14
|
+
|
|
15
|
+
## [0.4.0] - 2026-06-26
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- **Loop verification — the generator/evaluator separation (Cap 8).** A loop turn is now finalized `idle` only after it clears a **deterministic gate** (cheap, code-only — a non-trivial answer, no error marker, and the tool succeeded if one ran) **and** an **independent evaluator** (`loop-evaluate`: a separate prompt with a fresh context + an "assume it's wrong" posture and its own `EVAL_MODEL`). Any failure → **`needs_review`**, the human checkpoint — never a silent pass. The resume path carries an attempt budget (`LOOP_MAX_ATTEMPTS`) so the beat can't re-run a stuck session forever. Verified live against a staging pod.
|
|
19
|
+
- `machina loop` (`run`/`watch`/`say`) now treats `needs_review` as terminal and renders the evaluator's verdict (`✓ verified` / `⚠ needs review — <reason>`).
|
|
20
|
+
- Provisioner `docs/harness-loop-kit/provision.py` gains the `loop-evaluate` prompt, the gate, and the attempt budget; tunable via `EVAL_MODEL` (use a stronger model than the generator in prod) and `LOOP_MAX_ATTEMPTS`.
|
|
21
|
+
- New: `docs/harness-loop-kit/PLAYBOOK-SCORECARD.md` — the loop scored against the Loop-Engineering playbook (the five failure modes, the First-Loop Checklist, the Stripe-Minions pattern) with the live verification results.
|
|
22
|
+
|
|
23
|
+
## [0.3.0] - 2026-06-26
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- **`machina loop …`**: drive a durable agentic turn loop (harness) that runs server-side on Studio primitives, with the CLI as a thin driver/observer (same pattern as `machina factory`). Commands: `run`, `watch`, `say`, `stop`, `sessions`.
|
|
27
|
+
- **Durable**: the loop is a scheduled agent + `harness_session` documents; each turn is persisted before advancing, and the beat resumes a session left `active` (survives crash / async tool / awaiting input). A turn ends at `idle` (awaiting the next `say`).
|
|
28
|
+
- **Multi-turn**: `say` injects a follow-up; prior conversation is fed back to the model. `watch` is turn-aware and streams new turns (incl. `→ tool` / `← result` steps).
|
|
29
|
+
- Server-side resources (prompt/workflow/agent) live in the project's Studio; the CLI reuses the existing project session — no new credential.
|
|
30
|
+
- Architecture + chapter-by-chapter build (caps 1–7) and verified platform contracts: `docs/agentic-harness-loop.md`. Dynamic multi-tool dispatcher reference: `docs/loop-tools-connector.py`.
|
|
31
|
+
|
|
5
32
|
## [0.2.27] - 2026-06-25
|
|
6
33
|
|
|
7
34
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: machina-cli
|
|
3
|
-
Version: 0.2
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: CLI for the Machina AI Agent platform
|
|
5
5
|
Project-URL: Homepage, https://machina.gg
|
|
6
6
|
Project-URL: Repository, https://github.com/machina-sports/machina-cli
|
|
@@ -144,8 +144,16 @@ machina org list --page 2 # Page 2
|
|
|
144
144
|
machina org list --json # Output as JSON
|
|
145
145
|
machina org create <name> # Create organization
|
|
146
146
|
machina org use <org-id> # Set default organization
|
|
147
|
+
machina org usage # Token consumption (last 30d), by project/agent/day
|
|
148
|
+
machina org usage --days 7 # Narrow the window
|
|
149
|
+
machina org usage --project <id> # Scope to one project (faster)
|
|
150
|
+
machina org usage --json # Output as JSON
|
|
147
151
|
```
|
|
148
152
|
|
|
153
|
+
`org usage` rolls up LLM token consumption from agent executions (`execution_tokens`)
|
|
154
|
+
across the organization's projects — broken down by project, agent, and day, with the
|
|
155
|
+
prompt/completion split. Useful for cost/capacity tracking.
|
|
156
|
+
|
|
149
157
|
### Projects
|
|
150
158
|
|
|
151
159
|
```bash
|
|
@@ -112,8 +112,16 @@ machina org list --page 2 # Page 2
|
|
|
112
112
|
machina org list --json # Output as JSON
|
|
113
113
|
machina org create <name> # Create organization
|
|
114
114
|
machina org use <org-id> # Set default organization
|
|
115
|
+
machina org usage # Token consumption (last 30d), by project/agent/day
|
|
116
|
+
machina org usage --days 7 # Narrow the window
|
|
117
|
+
machina org usage --project <id> # Scope to one project (faster)
|
|
118
|
+
machina org usage --json # Output as JSON
|
|
115
119
|
```
|
|
116
120
|
|
|
121
|
+
`org usage` rolls up LLM token consumption from agent executions (`execution_tokens`)
|
|
122
|
+
across the organization's projects — broken down by project, agent, and day, with the
|
|
123
|
+
prompt/completion split. Useful for cost/capacity tracking.
|
|
124
|
+
|
|
117
125
|
### Projects
|
|
118
126
|
|
|
119
127
|
```bash
|