gravity-cli 0.4.2__tar.gz → 0.4.4__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.
- gravity_cli-0.4.2/README.md → gravity_cli-0.4.4/PKG-INFO +22 -25
- gravity_cli-0.4.2/PKG-INFO → gravity_cli-0.4.4/README.md +5 -42
- gravity_cli-0.4.4/RELEASING.md +125 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/pyproject.toml +1 -1
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/tests/test_manifest.py +9 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/pyproject.toml +2 -2
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/BUILDER_GUIDE.md +2 -10
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/uv.lock +2 -2
- gravity_cli-0.4.2/dist-schema/.gitignore +0 -1
- gravity_cli-0.4.2/dist-schema/gravity_schema-0.4.2-py3-none-any.whl +0 -0
- gravity_cli-0.4.2/dist-schema/gravity_schema-0.4.2.tar.gz +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/.env.example +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/.github/workflows/ci.yml +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/.github/workflows/release.yml +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/.gitignore +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/AGENT_STANDARD.md +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/LICENSE +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/NOTICE +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/TEMPLATES.md +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/LICENSE +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/NOTICE +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/README.md +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/__init__.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/__main__.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/catalog.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/catalog.yaml +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/catalog_imported.yaml +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/contract.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/cron.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/errors.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/export.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/gen_catalog.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/manifest.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/validation.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/schema/manifest.schema.json +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/tests/conftest.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/tests/test_catalog_parity.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/tests/test_cron.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/tests/test_errors.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/tests/test_json_schema.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/tests/test_kind_outputs.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/tests/test_slots.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/tests/test_validation.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/__init__.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/__main__.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/_runner_script.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/api.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/cli.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/commands/__init__.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/commands/adapt.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/commands/build.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/commands/guide.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/commands/init.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/commands/login.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/commands/push.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/commands/run.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/commands/runs.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/commands/schedule.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/commands/tools.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/commands/validate.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/config.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/manifest.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/project.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/chat/.gitignore +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/chat/manifest.yaml +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/chat/requirements.txt +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/chat/src/agent.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/deepagent/.gitignore +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/deepagent/manifest.yaml +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/deepagent/requirements.txt +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/deepagent/src/agent.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/minimal/.gitignore +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/minimal/manifest.yaml +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/minimal/requirements.txt +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/minimal/src/agent.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/structured/.gitignore +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/structured/manifest.yaml +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/structured/requirements.txt +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/structured/src/agent.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/structured/src/gateway.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/structured/src/nodes/agent.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/structured/src/prompts.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/structured/src/state.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/timeline.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/ui.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/starter/manifest.yaml +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/starter/requirements.txt +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/starter/src/agent.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/starter/src/summary.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/starter/tests/test_summary.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/tests/conftest.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/tests/test_adapt.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/tests/test_api.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/tests/test_build_push.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/tests/test_gateway_token.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/tests/test_manifest_integration.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/tests/test_run.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/tests/test_templates.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/tests/test_timeline.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/tests/test_ui.py +0 -0
- {gravity_cli-0.4.2 → gravity_cli-0.4.4}/tests/test_welcome.py +0 -0
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: gravity-cli
|
|
3
|
+
Version: 0.4.4
|
|
4
|
+
Summary: gravity cli — init, run, and push python agents to the Gravity marketplace
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
License-File: NOTICE
|
|
8
|
+
Requires-Python: >=3.12
|
|
9
|
+
Requires-Dist: gravity-schema==0.4.4
|
|
10
|
+
Requires-Dist: httpx>=0.27.0
|
|
11
|
+
Requires-Dist: keyring>=25.0.0
|
|
12
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
13
|
+
Requires-Dist: rich>=13.9.0
|
|
14
|
+
Requires-Dist: typer>=0.15.0
|
|
15
|
+
Requires-Dist: uv>=0.8.0
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
1
18
|
<h1 align="center">Gravity CLI</h1>
|
|
2
19
|
|
|
3
20
|
<p align="center">
|
|
@@ -625,7 +642,7 @@ outputs: # extra formats the platform renders and deliv
|
|
|
625
642
|
| `runtime.timeout_seconds` | no | `300` | 10 to 28800. |
|
|
626
643
|
| `dependencies.lockfile` | no | `requirements.lock` | Compiled by `gravity validate`; ships with the agent. |
|
|
627
644
|
| `inputs[]` | no | none | Up to 50. Each has `name` (a lowercase identifier, the key in `state["inputs"]`), `type`, `label`, and optionally `required`, `default`, `options`, `accept`. |
|
|
628
|
-
| `inputs[].type` | **yes** | | `text`, `textarea`, `number`, `boolean`, `static-dropdown` (needs `options`), `email`, `url`, `date`, `secret` (an API key
|
|
645
|
+
| `inputs[].type` | **yes** | | `text`, `textarea`, `number`, `boolean`, `static-dropdown` (needs `options`), `email`, `url`, `date`, `secret` (an API key, password or other confidential value) or `file` (no `default`; `accept` lists extensions such as `[pdf, csv]`). |
|
|
629
646
|
| `permissions.tools` | no | none | Up to 50 catalog names, such as `gmail.read`. Run `gravity tools` for the list. |
|
|
630
647
|
| `permissions.models.tier` | no | `standard` | `standard` or `premium`. |
|
|
631
648
|
| `approvals.required_for` | no | none | Tools that pause until a person approves. Each must also be declared under `permissions.tools` or a slot adapter. |
|
|
@@ -639,27 +656,6 @@ outputs: # extra formats the platform renders and deliv
|
|
|
639
656
|
|
|
640
657
|
Unknown fields are rejected rather than ignored, so a typo is reported instead of silently dropped.
|
|
641
658
|
|
|
642
|
-
### Secret inputs
|
|
643
|
-
|
|
644
|
-
**API keys and passwords: use `type: secret`**, never `text`. The user types it into a masked box;
|
|
645
|
-
the platform seals it with AWS KMS the moment it is submitted, keeps it out of every API response,
|
|
646
|
-
log and stored checkpoint, and decrypts it only to hand it to your running agent as
|
|
647
|
-
`state["inputs"]["<name>"]`, exactly like any other input. A secret input cannot have a `default`,
|
|
648
|
-
holds at most 4096 bytes, and is meant for the user's own credential for a service your agent
|
|
649
|
-
calls (their Supadata or Notion key), not for a key of yours: yours never goes in the agent or its
|
|
650
|
-
manifest. Two rules for your code: don't put the key in `result` or `corpus` (they are shown
|
|
651
|
-
to the user and stored in clear), and don't copy it into your own objects or logs: the platform
|
|
652
|
-
can hide it in the state it checkpoints, not wherever your code sends it. When the user schedules
|
|
653
|
-
the agent, they re-enter the key to change it; it is never shown back.
|
|
654
|
-
|
|
655
|
-
```yaml
|
|
656
|
-
inputs:
|
|
657
|
-
- name: supadata_api_key
|
|
658
|
-
type: secret
|
|
659
|
-
label: "Your Supadata API key"
|
|
660
|
-
required: true
|
|
661
|
-
```
|
|
662
|
-
|
|
663
659
|
## An agent project
|
|
664
660
|
|
|
665
661
|
```
|
|
@@ -735,8 +731,9 @@ Real tools act on a connected account. Connect one with `gravity-gateway connect
|
|
|
735
731
|
|
|
736
732
|
## What's new
|
|
737
733
|
|
|
738
|
-
- **0.4.
|
|
739
|
-
- **0.4.
|
|
734
|
+
- **0.4.4** Same code as 0.4.3, released from this repository so the GitHub release, the tag and PyPI line up again. Adds `RELEASING.md`.
|
|
735
|
+
- **0.4.3** Documents the `secret` input type and the `supadata.get_transcript` tool.
|
|
736
|
+
- **0.4.1** New input type `secret` for an API key, password or other confidential value. New built-in tool `supadata.get_transcript` (`gravity tools supadata`).
|
|
740
737
|
|
|
741
738
|
## Limitations
|
|
742
739
|
|
|
@@ -777,7 +774,7 @@ Every pull request and every push to `main` runs [`ci.yml`](.github/workflows/ci
|
|
|
777
774
|
- both test suites on Ubuntu and Windows, with Python 3.12 and 3.13
|
|
778
775
|
- a build of both packages, installed into a clean environment and used for real
|
|
779
776
|
|
|
780
|
-
To release:
|
|
777
|
+
To release, follow [RELEASING.md](RELEASING.md), which has every command and what to do when a step fails. In short:
|
|
781
778
|
|
|
782
779
|
1. Set the new version in three places: `version` in `pyproject.toml`, `version` in `packages/gravity-schema/pyproject.toml`, and the `gravity-schema==` pin in `pyproject.toml`. Run `uv lock`, then merge to `main`.
|
|
783
780
|
2. Tag the merge commit and push the tag. A tag containing `rc`, such as `v0.2.0rc1`, publishes to TestPyPI. Any other `v*` tag, such as `v0.2.0`, publishes to PyPI and creates a GitHub Release.
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: gravity-cli
|
|
3
|
-
Version: 0.4.2
|
|
4
|
-
Summary: gravity cli — init, run, and push python agents to the Gravity marketplace
|
|
5
|
-
License-Expression: Apache-2.0
|
|
6
|
-
License-File: LICENSE
|
|
7
|
-
License-File: NOTICE
|
|
8
|
-
Requires-Python: >=3.12
|
|
9
|
-
Requires-Dist: gravity-schema==0.4.2
|
|
10
|
-
Requires-Dist: httpx>=0.27.0
|
|
11
|
-
Requires-Dist: keyring>=25.0.0
|
|
12
|
-
Requires-Dist: python-dotenv>=1.0.0
|
|
13
|
-
Requires-Dist: rich>=13.9.0
|
|
14
|
-
Requires-Dist: typer>=0.15.0
|
|
15
|
-
Requires-Dist: uv>=0.8.0
|
|
16
|
-
Description-Content-Type: text/markdown
|
|
17
|
-
|
|
18
1
|
<h1 align="center">Gravity CLI</h1>
|
|
19
2
|
|
|
20
3
|
<p align="center">
|
|
@@ -642,7 +625,7 @@ outputs: # extra formats the platform renders and deliv
|
|
|
642
625
|
| `runtime.timeout_seconds` | no | `300` | 10 to 28800. |
|
|
643
626
|
| `dependencies.lockfile` | no | `requirements.lock` | Compiled by `gravity validate`; ships with the agent. |
|
|
644
627
|
| `inputs[]` | no | none | Up to 50. Each has `name` (a lowercase identifier, the key in `state["inputs"]`), `type`, `label`, and optionally `required`, `default`, `options`, `accept`. |
|
|
645
|
-
| `inputs[].type` | **yes** | | `text`, `textarea`, `number`, `boolean`, `static-dropdown` (needs `options`), `email`, `url`, `date`, `secret` (an API key
|
|
628
|
+
| `inputs[].type` | **yes** | | `text`, `textarea`, `number`, `boolean`, `static-dropdown` (needs `options`), `email`, `url`, `date`, `secret` (an API key, password or other confidential value) or `file` (no `default`; `accept` lists extensions such as `[pdf, csv]`). |
|
|
646
629
|
| `permissions.tools` | no | none | Up to 50 catalog names, such as `gmail.read`. Run `gravity tools` for the list. |
|
|
647
630
|
| `permissions.models.tier` | no | `standard` | `standard` or `premium`. |
|
|
648
631
|
| `approvals.required_for` | no | none | Tools that pause until a person approves. Each must also be declared under `permissions.tools` or a slot adapter. |
|
|
@@ -656,27 +639,6 @@ outputs: # extra formats the platform renders and deliv
|
|
|
656
639
|
|
|
657
640
|
Unknown fields are rejected rather than ignored, so a typo is reported instead of silently dropped.
|
|
658
641
|
|
|
659
|
-
### Secret inputs
|
|
660
|
-
|
|
661
|
-
**API keys and passwords: use `type: secret`**, never `text`. The user types it into a masked box;
|
|
662
|
-
the platform seals it with AWS KMS the moment it is submitted, keeps it out of every API response,
|
|
663
|
-
log and stored checkpoint, and decrypts it only to hand it to your running agent as
|
|
664
|
-
`state["inputs"]["<name>"]`, exactly like any other input. A secret input cannot have a `default`,
|
|
665
|
-
holds at most 4096 bytes, and is meant for the user's own credential for a service your agent
|
|
666
|
-
calls (their Supadata or Notion key), not for a key of yours: yours never goes in the agent or its
|
|
667
|
-
manifest. Two rules for your code: don't put the key in `result` or `corpus` (they are shown
|
|
668
|
-
to the user and stored in clear), and don't copy it into your own objects or logs: the platform
|
|
669
|
-
can hide it in the state it checkpoints, not wherever your code sends it. When the user schedules
|
|
670
|
-
the agent, they re-enter the key to change it; it is never shown back.
|
|
671
|
-
|
|
672
|
-
```yaml
|
|
673
|
-
inputs:
|
|
674
|
-
- name: supadata_api_key
|
|
675
|
-
type: secret
|
|
676
|
-
label: "Your Supadata API key"
|
|
677
|
-
required: true
|
|
678
|
-
```
|
|
679
|
-
|
|
680
642
|
## An agent project
|
|
681
643
|
|
|
682
644
|
```
|
|
@@ -752,8 +714,9 @@ Real tools act on a connected account. Connect one with `gravity-gateway connect
|
|
|
752
714
|
|
|
753
715
|
## What's new
|
|
754
716
|
|
|
755
|
-
- **0.4.
|
|
756
|
-
- **0.4.
|
|
717
|
+
- **0.4.4** Same code as 0.4.3, released from this repository so the GitHub release, the tag and PyPI line up again. Adds `RELEASING.md`.
|
|
718
|
+
- **0.4.3** Documents the `secret` input type and the `supadata.get_transcript` tool.
|
|
719
|
+
- **0.4.1** New input type `secret` for an API key, password or other confidential value. New built-in tool `supadata.get_transcript` (`gravity tools supadata`).
|
|
757
720
|
|
|
758
721
|
## Limitations
|
|
759
722
|
|
|
@@ -794,7 +757,7 @@ Every pull request and every push to `main` runs [`ci.yml`](.github/workflows/ci
|
|
|
794
757
|
- both test suites on Ubuntu and Windows, with Python 3.12 and 3.13
|
|
795
758
|
- a build of both packages, installed into a clean environment and used for real
|
|
796
759
|
|
|
797
|
-
To release:
|
|
760
|
+
To release, follow [RELEASING.md](RELEASING.md), which has every command and what to do when a step fails. In short:
|
|
798
761
|
|
|
799
762
|
1. Set the new version in three places: `version` in `pyproject.toml`, `version` in `packages/gravity-schema/pyproject.toml`, and the `gravity-schema==` pin in `pyproject.toml`. Run `uv lock`, then merge to `main`.
|
|
800
763
|
2. Tag the merge commit and push the tag. A tag containing `rc`, such as `v0.2.0rc1`, publishes to TestPyPI. Any other `v*` tag, such as `v0.2.0`, publishes to PyPI and creates a GitHub Release.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Releasing gravity-cli and gravity-schema
|
|
2
|
+
|
|
3
|
+
Both packages live in this repository and always ship together at the same version. The only way to publish is a tag on `main`. Nothing is uploaded to PyPI by hand.
|
|
4
|
+
|
|
5
|
+
## 1. Make the change on a branch
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git checkout main && git pull
|
|
9
|
+
git checkout -b <your-branch>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Edit code, tests and docs. If you touched the manifest model in `packages/gravity-schema`, regenerate the committed JSON schema, or the schema tests fail:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
cd packages/gravity-schema && uv run python -m gravity_schema && cd ../..
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## 2. Check locally before you push
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
uv run ruff check .
|
|
22
|
+
uv run pytest -q
|
|
23
|
+
cd packages/gravity-schema && uv run pytest -q && cd ../..
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
All green, or it does not go up.
|
|
27
|
+
|
|
28
|
+
## 3. Bump the version in both packages
|
|
29
|
+
|
|
30
|
+
Three places must carry the same number:
|
|
31
|
+
|
|
32
|
+
| File | Line |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `pyproject.toml` | `version = "X.Y.Z"` |
|
|
35
|
+
| `pyproject.toml` | `"gravity-schema==X.Y.Z"` under `dependencies` |
|
|
36
|
+
| `packages/gravity-schema/pyproject.toml` | `version = "X.Y.Z"` |
|
|
37
|
+
|
|
38
|
+
Then refresh the lockfile:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
uv lock
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Patch for fixes and docs, minor for new commands or manifest fields. Check PyPI first so a number is never reused:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
curl -s https://pypi.org/pypi/gravity-cli/json | python -c "import sys,json;print(json.load(sys.stdin)['info']['version'])"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 4. Open a pull request against `main`
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
git push -u origin <your-branch>
|
|
54
|
+
gh pr create --base main
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
CI runs lint, package and the tests on Ubuntu and Windows with Python 3.12 and 3.13. Merge when green.
|
|
58
|
+
|
|
59
|
+
## 5. Tag the merge commit on `main`
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
git checkout main && git pull
|
|
63
|
+
git tag vX.Y.Z
|
|
64
|
+
git push origin vX.Y.Z
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The release workflow (`.github/workflows/release.yml`) then:
|
|
68
|
+
|
|
69
|
+
1. checks the tag against both versions and the pin, and stops if any disagree;
|
|
70
|
+
2. reruns the full CI;
|
|
71
|
+
3. builds both wheels and sdists;
|
|
72
|
+
4. publishes to PyPI through trusted publishing, schema first, then CLI;
|
|
73
|
+
5. creates the GitHub release with the four files attached.
|
|
74
|
+
|
|
75
|
+
Watch it:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
gh run list --workflow release.yml --limit 1
|
|
79
|
+
gh run watch <run-id>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## 6. Verify from a clean install
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
uv tool install --force --refresh gravity-cli==X.Y.Z
|
|
86
|
+
gravity whoami
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Dry run on TestPyPI
|
|
90
|
+
|
|
91
|
+
Any tag containing `rc` publishes to TestPyPI instead of PyPI:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
git tag vX.Y.Zrc1 && git push origin vX.Y.Zrc1
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Use this when you change the workflow itself or the packaging.
|
|
98
|
+
|
|
99
|
+
## If something goes wrong
|
|
100
|
+
|
|
101
|
+
**The guard fails with "tag says X but version is Y".** You tagged before bumping. Delete the tag, fix the versions, retag.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
git tag -d vX.Y.Z && git push origin :refs/tags/vX.Y.Z
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**A job fails on "other side closed" or a download error.** A GitHub hiccup. Rerun the failed jobs, nothing else is needed.
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
gh run rerun <run-id> --failed
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Publish fails with "file already exists".** That version is already on PyPI and cannot be overwritten. Bump and release again.
|
|
114
|
+
|
|
115
|
+
**Wrong code shipped.** Do not delete the PyPI release. Ship a fixed version on top, and yank the bad one on PyPI only if it is harmful.
|
|
116
|
+
|
|
117
|
+
## Rules
|
|
118
|
+
|
|
119
|
+
- No copies of the source in other repositories. Pin the PyPI version in your requirements instead.
|
|
120
|
+
- No PyPI API tokens. The trusted publisher configured for this repository is the only credential. If you hold a token for either package, say so and it gets revoked.
|
|
121
|
+
- Every change is a pull request, however small. Review turnaround is same day.
|
|
122
|
+
|
|
123
|
+
## Record
|
|
124
|
+
|
|
125
|
+
Versions 0.4.1 to 0.4.3 were published to PyPI on 2026-10-08 from a copy of this source kept in the core repository. Their changes were ported back in PR #11. This repository has no tag or GitHub release for them, and the next release from here is 0.4.4.
|
|
@@ -624,3 +624,12 @@ def test_state_size_outside_bounds_rejected(manifest_data, bad):
|
|
|
624
624
|
def test_runtime_python_defaults_to_313(manifest_data):
|
|
625
625
|
del manifest_data["runtime"]["python"]
|
|
626
626
|
assert validate_manifest(manifest_data).runtime.python == "3.12"
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
def test_a_secret_input_cannot_have_a_default(manifest_data):
|
|
630
|
+
manifest_data["inputs"] = [{"name": "api_key", "type": "secret", "label": "Key", "default": "sk-x"}]
|
|
631
|
+
with pytest.raises(ManifestValidationError) as e:
|
|
632
|
+
validate_manifest(manifest_data)
|
|
633
|
+
assert "cannot have a default" in str(e.value)
|
|
634
|
+
del manifest_data["inputs"][0]["default"]
|
|
635
|
+
assert validate_manifest(manifest_data).inputs[0].type.value == "secret"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "gravity-cli"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.4"
|
|
4
4
|
description = "gravity cli — init, run, and push python agents to the Gravity marketplace"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "Apache-2.0"
|
|
7
7
|
license-files = ["LICENSE", "NOTICE"]
|
|
8
8
|
requires-python = ">=3.12"
|
|
9
9
|
dependencies = [
|
|
10
|
-
"gravity-schema==0.4.
|
|
10
|
+
"gravity-schema==0.4.4", # released in lockstep: always the same version as this package
|
|
11
11
|
"typer>=0.15.0",
|
|
12
12
|
"httpx>=0.27.0",
|
|
13
13
|
"rich>=13.9.0",
|
|
@@ -127,16 +127,8 @@ keeps the digest as a draft for the user to send. That's why the fallback in §3
|
|
|
127
127
|
Other input fields you can use: `default:` (a value if the user leaves it blank; not for `file`),
|
|
128
128
|
`options: [a, b]` (for `static-dropdown`), `accept: [pdf, csv]` (for `file`).
|
|
129
129
|
|
|
130
|
-
**API keys and
|
|
131
|
-
|
|
132
|
-
log and stored checkpoint, and decrypts it only to hand it to your running agent as
|
|
133
|
-
`state["inputs"]["<name>"]`, exactly like any other input. A secret input cannot have a `default`,
|
|
134
|
-
holds at most 4096 bytes, and is meant for the user's own credential for a service your agent
|
|
135
|
-
calls (their Supadata or Notion key), not for a key of yours: yours never goes in the agent or its
|
|
136
|
-
manifest. Two rules for your code: don't put the key in `result` or `corpus` (they are shown
|
|
137
|
-
to the user and stored in clear), and don't copy it into your own objects or logs: the platform
|
|
138
|
-
can hide it in the state it checkpoints, not wherever your code sends it. When the user schedules
|
|
139
|
-
the agent, they re-enter the key to change it; it is never shown back.
|
|
130
|
+
**API keys, passwords and other confidential values: use `type: secret`**, never `text`. A secret
|
|
131
|
+
input cannot have a `default`.
|
|
140
132
|
|
|
141
133
|
### 3.2 `requirements.txt`
|
|
142
134
|
|
|
@@ -164,7 +164,7 @@ wheels = [
|
|
|
164
164
|
|
|
165
165
|
[[package]]
|
|
166
166
|
name = "gravity-cli"
|
|
167
|
-
version = "0.4.
|
|
167
|
+
version = "0.4.4"
|
|
168
168
|
source = { editable = "." }
|
|
169
169
|
dependencies = [
|
|
170
170
|
{ name = "gravity-schema" },
|
|
@@ -201,7 +201,7 @@ dev = [
|
|
|
201
201
|
|
|
202
202
|
[[package]]
|
|
203
203
|
name = "gravity-schema"
|
|
204
|
-
version = "0.4.
|
|
204
|
+
version = "0.4.4"
|
|
205
205
|
source = { editable = "packages/gravity-schema" }
|
|
206
206
|
dependencies = [
|
|
207
207
|
{ name = "pydantic" },
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/catalog_imported.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/gen_catalog.py
RENAMED
|
File without changes
|
|
File without changes
|
{gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/gravity_schema/validation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gravity_cli-0.4.2 → gravity_cli-0.4.4}/packages/gravity-schema/tests/test_catalog_parity.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/deepagent/requirements.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/structured/requirements.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gravity_cli-0.4.2 → gravity_cli-0.4.4}/src/gravity_cli/templates/structured/src/nodes/agent.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|