agent-surface 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.
- agent_surface-0.1.0/.github/AGENTS.md +8 -0
- agent_surface-0.1.0/.github/ISSUE_TEMPLATE/bug.yml +40 -0
- agent_surface-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- agent_surface-0.1.0/.github/ISSUE_TEMPLATE/feature.yml +24 -0
- agent_surface-0.1.0/.github/dependabot.yml +16 -0
- agent_surface-0.1.0/.github/pull_request_template.md +14 -0
- agent_surface-0.1.0/.github/workflows/ci.yml +73 -0
- agent_surface-0.1.0/.github/workflows/release.yml +86 -0
- agent_surface-0.1.0/.gitignore +9 -0
- agent_surface-0.1.0/.python-version +1 -0
- agent_surface-0.1.0/AGENTS.md +86 -0
- agent_surface-0.1.0/CONTRIBUTING.md +27 -0
- agent_surface-0.1.0/LICENSE +21 -0
- agent_surface-0.1.0/Makefile +18 -0
- agent_surface-0.1.0/PKG-INFO +326 -0
- agent_surface-0.1.0/README.md +309 -0
- agent_surface-0.1.0/SECURITY.md +13 -0
- agent_surface-0.1.0/docs/AGENTS.md +14 -0
- agent_surface-0.1.0/docs/adoption.md +67 -0
- agent_surface-0.1.0/docs/concepts/hateoas.md +37 -0
- agent_surface-0.1.0/docs/how-to/adopt-an-existing-app.md +40 -0
- agent_surface-0.1.0/docs/how-to/references-and-actions.md +29 -0
- agent_surface-0.1.0/docs/plans/2026-08-18-agent-friendly-repository-design.md +50 -0
- agent_surface-0.1.0/docs/plans/2026-08-18-agent-friendly-repository-implementation.md +75 -0
- agent_surface-0.1.0/docs/plans/2026-08-18-agent-surface-design.md +72 -0
- agent_surface-0.1.0/docs/plans/2026-08-18-agent-surface-implementation.md +115 -0
- agent_surface-0.1.0/docs/plans/2026-08-18-reference-consumer-conformance-design.md +58 -0
- agent_surface-0.1.0/docs/plans/2026-08-18-reference-consumer-conformance-implementation.md +49 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-adaptive-yaml-output-budgets-design.md +168 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-adaptive-yaml-output-budgets-implementation.md +103 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-bookstore-action-descriptions-design.md +19 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-bookstore-action-descriptions.md +53 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-bookstore-sqlite-dogfood-design.md +45 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-bookstore-sqlite-dogfood.md +59 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-bounded-action-discovery-design.md +210 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-bounded-action-discovery-implementation.md +118 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-click-cli-design.md +194 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-click-cli-implementation.md +180 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-developer-experience-design.md +101 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-mcp-v2-adapter-design.md +126 -0
- agent_surface-0.1.0/docs/plans/2026-08-19-mcp-v2-adapter-implementation.md +130 -0
- agent_surface-0.1.0/docs/reference/cli-contract.md +51 -0
- agent_surface-0.1.0/docs/reference/mcp-contract.md +108 -0
- agent_surface-0.1.0/docs/reference/python-api.md +41 -0
- agent_surface-0.1.0/docs/releasing.md +39 -0
- agent_surface-0.1.0/docs/tutorials/bookstore.md +176 -0
- agent_surface-0.1.0/examples/AGENTS.md +9 -0
- agent_surface-0.1.0/examples/__init__.py +1 -0
- agent_surface-0.1.0/examples/bookstore +4 -0
- agent_surface-0.1.0/examples/bookstore-mcp +10 -0
- agent_surface-0.1.0/examples/bookstore.py +580 -0
- agent_surface-0.1.0/examples/bookstore_mcp.py +17 -0
- agent_surface-0.1.0/pyproject.toml +52 -0
- agent_surface-0.1.0/src/agent_surface/AGENTS.md +10 -0
- agent_surface-0.1.0/src/agent_surface/__init__.py +87 -0
- agent_surface-0.1.0/src/agent_surface/actions.py +488 -0
- agent_surface-0.1.0/src/agent_surface/adapters/AGENTS.md +9 -0
- agent_surface-0.1.0/src/agent_surface/adapters/__init__.py +1 -0
- agent_surface-0.1.0/src/agent_surface/adapters/click.py +1352 -0
- agent_surface-0.1.0/src/agent_surface/adapters/mcp.py +362 -0
- agent_surface-0.1.0/src/agent_surface/app.py +49 -0
- agent_surface-0.1.0/src/agent_surface/budgets.py +89 -0
- agent_surface-0.1.0/src/agent_surface/contracts.py +149 -0
- agent_surface-0.1.0/src/agent_surface/discovery.py +143 -0
- agent_surface-0.1.0/src/agent_surface/operations.py +150 -0
- agent_surface-0.1.0/src/agent_surface/outcomes.py +99 -0
- agent_surface-0.1.0/src/agent_surface/references.py +155 -0
- agent_surface-0.1.0/src/agent_surface/rendering.py +247 -0
- agent_surface-0.1.0/src/agent_surface/skills/AGENTS.md +8 -0
- agent_surface-0.1.0/src/agent_surface/skills/__init__.py +20 -0
- agent_surface-0.1.0/src/agent_surface/skills/agent-friendly-cli-design/SKILL.md +79 -0
- agent_surface-0.1.0/src/agent_surface/skills/agent-friendly-cli-design/reference.md +128 -0
- agent_surface-0.1.0/tests/AGENTS.md +9 -0
- agent_surface-0.1.0/tests/__init__.py +1 -0
- agent_surface-0.1.0/tests/fixtures/mcp_stdio_server.py +28 -0
- agent_surface-0.1.0/tests/golden/render-auto.yaml +7 -0
- agent_surface-0.1.0/tests/golden/render-block.yaml +11 -0
- agent_surface-0.1.0/tests/golden/render-flow.yaml +1 -0
- agent_surface-0.1.0/tests/reference_consumer/__init__.py +1 -0
- agent_surface-0.1.0/tests/reference_consumer/domain.py +114 -0
- agent_surface-0.1.0/tests/reference_consumer/integration.py +107 -0
- agent_surface-0.1.0/tests/test_action_catalog.py +100 -0
- agent_surface-0.1.0/tests/test_action_compiler.py +157 -0
- agent_surface-0.1.0/tests/test_action_publisher.py +273 -0
- agent_surface-0.1.0/tests/test_bookstore_example.py +335 -0
- agent_surface-0.1.0/tests/test_budgets.py +93 -0
- agent_surface-0.1.0/tests/test_bundled_skill.py +18 -0
- agent_surface-0.1.0/tests/test_click_discovery.py +192 -0
- agent_surface-0.1.0/tests/test_click_invocation.py +645 -0
- agent_surface-0.1.0/tests/test_click_plans.py +206 -0
- agent_surface-0.1.0/tests/test_click_routing.py +107 -0
- agent_surface-0.1.0/tests/test_contracts.py +70 -0
- agent_surface-0.1.0/tests/test_mcp_imports.py +60 -0
- agent_surface-0.1.0/tests/test_mcp_invocation.py +274 -0
- agent_surface-0.1.0/tests/test_mcp_runtime.py +64 -0
- agent_surface-0.1.0/tests/test_mcp_tools.py +82 -0
- agent_surface-0.1.0/tests/test_operations.py +123 -0
- agent_surface-0.1.0/tests/test_outcomes.py +47 -0
- agent_surface-0.1.0/tests/test_package.py +14 -0
- agent_surface-0.1.0/tests/test_reference_consumer.py +141 -0
- agent_surface-0.1.0/tests/test_reference_consumer_click.py +85 -0
- agent_surface-0.1.0/tests/test_reference_consumer_mcp.py +100 -0
- agent_surface-0.1.0/tests/test_references.py +157 -0
- agent_surface-0.1.0/tests/test_rendering.py +281 -0
- agent_surface-0.1.0/tests/test_repository_metadata.py +345 -0
- agent_surface-0.1.0/uv.lock +1028 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# GitHub automation instructions
|
|
2
|
+
|
|
3
|
+
These instructions extend the repository-root `AGENTS.md` for `.github/`.
|
|
4
|
+
|
|
5
|
+
- Pin actions to immutable commit SHAs and retain least-privilege permissions.
|
|
6
|
+
- Keep CI aligned with the supported Python versions and the local `make check` gate.
|
|
7
|
+
- Releases use GitHub OIDC Trusted Publishing for TestPyPI and PyPI; never store API tokens here.
|
|
8
|
+
- Keep issue and pull-request templates concise, structured, and actionable.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report reproducible incorrect behavior
|
|
3
|
+
title: "bug: "
|
|
4
|
+
labels: [bug]
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: description
|
|
8
|
+
attributes:
|
|
9
|
+
label: What happened?
|
|
10
|
+
description: Include the expected and actual structured result or error.
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: reproduction
|
|
15
|
+
attributes:
|
|
16
|
+
label: Minimal reproduction
|
|
17
|
+
description: Provide the smallest runnable code and command that demonstrates the problem.
|
|
18
|
+
render: python
|
|
19
|
+
validations:
|
|
20
|
+
required: true
|
|
21
|
+
- type: input
|
|
22
|
+
id: version
|
|
23
|
+
attributes:
|
|
24
|
+
label: agent-surface version
|
|
25
|
+
placeholder: 0.1.0
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: input
|
|
29
|
+
id: environment
|
|
30
|
+
attributes:
|
|
31
|
+
label: Environment
|
|
32
|
+
description: Python version, operating system, and relevant adapter versions.
|
|
33
|
+
placeholder: Python 3.12.12, macOS 15
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: context
|
|
38
|
+
attributes:
|
|
39
|
+
label: Additional context
|
|
40
|
+
description: Remove credentials and sensitive payload data.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Propose a focused contract or capability change
|
|
3
|
+
title: "feat: "
|
|
4
|
+
labels: [enhancement]
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: problem
|
|
8
|
+
attributes:
|
|
9
|
+
label: Problem
|
|
10
|
+
description: What agent or human workflow is difficult today?
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: proposal
|
|
15
|
+
attributes:
|
|
16
|
+
label: Proposed contract
|
|
17
|
+
description: Show representative Python, CLI, YAML, MCP, or schema behavior.
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: alternatives
|
|
22
|
+
attributes:
|
|
23
|
+
label: Alternatives considered
|
|
24
|
+
description: Include trade-offs, output bounds, and compatibility concerns when relevant.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: uv
|
|
4
|
+
directory: /
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
groups:
|
|
8
|
+
python-dependencies:
|
|
9
|
+
patterns: ["*"]
|
|
10
|
+
- package-ecosystem: github-actions
|
|
11
|
+
directory: /
|
|
12
|
+
schedule:
|
|
13
|
+
interval: weekly
|
|
14
|
+
groups:
|
|
15
|
+
actions:
|
|
16
|
+
patterns: ["*"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
<!-- What contract or behavior changes, and why? -->
|
|
4
|
+
|
|
5
|
+
## Tests
|
|
6
|
+
|
|
7
|
+
- [ ] Added or updated tests for behavior changes
|
|
8
|
+
- [ ] Observed new tests fail before implementation
|
|
9
|
+
- [ ] Ran `make check`
|
|
10
|
+
- [ ] Updated public and agent-facing documentation where needed
|
|
11
|
+
|
|
12
|
+
## Compatibility
|
|
13
|
+
|
|
14
|
+
<!-- Note schema, YAML, CLI, MCP, packaging, or migration impact. Write “None” if absent. -->
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ci-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
name: Python ${{ matrix.python-version }}
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
python-version: ["3.12", "3.13", "3.14"]
|
|
23
|
+
steps:
|
|
24
|
+
- name: Check out repository
|
|
25
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
26
|
+
with:
|
|
27
|
+
persist-credentials: false
|
|
28
|
+
- name: Set up Python
|
|
29
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
30
|
+
with:
|
|
31
|
+
python-version: ${{ matrix.python-version }}
|
|
32
|
+
- name: Set up uv
|
|
33
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
34
|
+
with:
|
|
35
|
+
enable-cache: true
|
|
36
|
+
cache-suffix: ${{ matrix.python-version }}
|
|
37
|
+
- name: Install locked dependencies
|
|
38
|
+
run: uv sync --frozen --all-extras --dev
|
|
39
|
+
- name: Run tests
|
|
40
|
+
run: uv run pytest
|
|
41
|
+
|
|
42
|
+
quality:
|
|
43
|
+
name: Quality and distributions
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- name: Check out repository
|
|
47
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
48
|
+
with:
|
|
49
|
+
persist-credentials: false
|
|
50
|
+
- name: Set up Python
|
|
51
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
52
|
+
with:
|
|
53
|
+
python-version: "3.12"
|
|
54
|
+
- name: Set up uv
|
|
55
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
56
|
+
with:
|
|
57
|
+
enable-cache: true
|
|
58
|
+
cache-suffix: quality
|
|
59
|
+
- name: Install locked dependencies
|
|
60
|
+
run: uv sync --frozen --all-extras --dev
|
|
61
|
+
- name: Lint
|
|
62
|
+
run: uv run ruff check .
|
|
63
|
+
- name: Type check
|
|
64
|
+
run: uv run mypy src
|
|
65
|
+
- name: Build distributions
|
|
66
|
+
run: uv build
|
|
67
|
+
- name: Validate distribution metadata
|
|
68
|
+
run: uvx twine check dist/*
|
|
69
|
+
- name: Smoke-test the built wheel
|
|
70
|
+
run: |
|
|
71
|
+
python -m venv /tmp/agent-surface-wheel
|
|
72
|
+
/tmp/agent-surface-wheel/bin/pip install dist/*.whl
|
|
73
|
+
/tmp/agent-surface-wheel/bin/python -c "import agent_surface; import importlib.resources as r; assert r.files('agent_surface.skills').joinpath('agent-friendly-cli-design/SKILL.md').is_file()"
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
release:
|
|
6
|
+
types: [published]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
name: Build distributions
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Check out repository
|
|
17
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
18
|
+
with:
|
|
19
|
+
persist-credentials: false
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
- name: Set up uv
|
|
25
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
26
|
+
with:
|
|
27
|
+
enable-cache: true
|
|
28
|
+
- name: Install locked dependencies
|
|
29
|
+
run: uv sync --frozen --all-extras --dev
|
|
30
|
+
- name: Verify release tag
|
|
31
|
+
if: github.event_name == 'release'
|
|
32
|
+
run: >-
|
|
33
|
+
python -c "import os, tomllib;
|
|
34
|
+
version = tomllib.load(open('pyproject.toml', 'rb'))['project']['version'];
|
|
35
|
+
actual = os.environ['GITHUB_REF_NAME']; expected = f'v{version}';
|
|
36
|
+
assert actual == expected, f'release tag {actual!r} must equal {expected!r}'"
|
|
37
|
+
- name: Run release gate and build distributions
|
|
38
|
+
run: make check
|
|
39
|
+
- name: Validate distribution metadata
|
|
40
|
+
run: uvx twine check dist/*
|
|
41
|
+
- name: Store distributions
|
|
42
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
43
|
+
with:
|
|
44
|
+
name: python-package-distributions
|
|
45
|
+
path: dist/
|
|
46
|
+
if-no-files-found: error
|
|
47
|
+
|
|
48
|
+
publish-testpypi:
|
|
49
|
+
name: Publish to TestPyPI
|
|
50
|
+
if: github.event_name == 'workflow_dispatch'
|
|
51
|
+
needs: build
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
environment:
|
|
54
|
+
name: testpypi
|
|
55
|
+
url: https://test.pypi.org/p/agent-surface
|
|
56
|
+
permissions:
|
|
57
|
+
id-token: write
|
|
58
|
+
steps:
|
|
59
|
+
- name: Retrieve distributions
|
|
60
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
61
|
+
with:
|
|
62
|
+
name: python-package-distributions
|
|
63
|
+
path: dist/
|
|
64
|
+
- name: Publish distributions
|
|
65
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
66
|
+
with:
|
|
67
|
+
repository-url: https://test.pypi.org/legacy/
|
|
68
|
+
|
|
69
|
+
publish-pypi:
|
|
70
|
+
name: Publish to PyPI
|
|
71
|
+
if: github.event_name == 'release'
|
|
72
|
+
needs: build
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
environment:
|
|
75
|
+
name: pypi
|
|
76
|
+
url: https://pypi.org/p/agent-surface
|
|
77
|
+
permissions:
|
|
78
|
+
id-token: write
|
|
79
|
+
steps:
|
|
80
|
+
- name: Retrieve distributions
|
|
81
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
82
|
+
with:
|
|
83
|
+
name: python-package-distributions
|
|
84
|
+
path: dist/
|
|
85
|
+
- name: Publish distributions
|
|
86
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
These instructions apply to the entire repository. User instructions take precedence.
|
|
4
|
+
|
|
5
|
+
## Project
|
|
6
|
+
|
|
7
|
+
`agent-surface` is a Python 3.12+ library that projects typed operations through CLI, MCP, and
|
|
8
|
+
schema adapters. Pydantic models and the operation registry are the source of truth. Agent-facing
|
|
9
|
+
responses are YAML-first, bounded, discoverable, and transport-neutral.
|
|
10
|
+
|
|
11
|
+
The core product invariant is HATEOAS: every response should expose a small, relevant, executable
|
|
12
|
+
`next_actions` frontier. Excellent human DX—runnable examples, linked explanations, normal help,
|
|
13
|
+
and precise reference docs—must reinforce rather than weaken that agent contract.
|
|
14
|
+
|
|
15
|
+
## Setup and checks
|
|
16
|
+
|
|
17
|
+
Work from the repository root and use the project venv. Do not install dependencies globally.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
uv sync --frozen --all-extras --dev
|
|
21
|
+
make check
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Useful focused commands:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
uv run pytest tests/test_operations.py -v
|
|
28
|
+
uv run ruff check .
|
|
29
|
+
uv run mypy src
|
|
30
|
+
uv build
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`make check` is the completion gate: tests, Ruff, mypy, and distribution builds must all pass.
|
|
34
|
+
|
|
35
|
+
## Repository map
|
|
36
|
+
|
|
37
|
+
- `src/agent_surface/contracts.py`: stable transport-neutral envelopes and actions
|
|
38
|
+
- `src/agent_surface/budgets.py`: item/byte limits and explicit bounded collections
|
|
39
|
+
- `src/agent_surface/rendering.py`: deterministic adaptive YAML and JSON rendering
|
|
40
|
+
- `src/agent_surface/references.py`: stable custom-object identity and display codecs
|
|
41
|
+
- `src/agent_surface/actions.py`: candidate compilation, policy binding, and cursor discovery
|
|
42
|
+
- `src/agent_surface/operations.py`: typed registration and invocation
|
|
43
|
+
- `src/agent_surface/app.py`: public application/decorator API
|
|
44
|
+
- `src/agent_surface/adapters/`: sibling transport projections; see its scoped `AGENTS.md`
|
|
45
|
+
- `src/agent_surface/skills/`: bundled `SKILL.md`, `reference.md`, and future sidecars
|
|
46
|
+
- `examples/`: executable consumer integrations and end-to-end trajectories
|
|
47
|
+
- `tests/`: executable behavior and package-resource contracts; see scoped instructions
|
|
48
|
+
- `docs/`: tutorials, concepts, how-to guides, references, and approved plans
|
|
49
|
+
- `.github/`: CI, release, dependency, and contributor automation
|
|
50
|
+
- `docs/adoption.md`: consumer domain/integration/transport boundary
|
|
51
|
+
- `docs/plans/`: approved designs and implementation plans
|
|
52
|
+
|
|
53
|
+
## Implementation rules
|
|
54
|
+
|
|
55
|
+
- Use test-driven development for behavior changes: observe RED, implement minimally, then GREEN.
|
|
56
|
+
- Keep public models strict and serializable. Preserve stable error codes and original argv
|
|
57
|
+
boundaries.
|
|
58
|
+
- Keep YAML as the default structured representation. Flow style is preferred for small leaf
|
|
59
|
+
collections; never use ellipsis as an omission marker.
|
|
60
|
+
- Renderers never fabricate pagination and never silently truncate. Domain or integration code
|
|
61
|
+
must supply a concrete continuation action before bounding a collection.
|
|
62
|
+
- Treat `next_actions` as a bounded relevant frontier. Expose totals, truncation, and a concrete
|
|
63
|
+
discovery action instead of expanding high-branch-factor graphs.
|
|
64
|
+
- Introspection is opt-in: decorated methods and Pydantic fields may produce candidates, but
|
|
65
|
+
explicit policy decides which actions are published.
|
|
66
|
+
- Never evaluate properties or descriptors during candidate discovery. Publication is deny-by-default;
|
|
67
|
+
compilation alone never authorizes an action.
|
|
68
|
+
- Never serialize an exhaustive action graph. Page concrete actions or expose one parameterized slot
|
|
69
|
+
source with an immediate continuation.
|
|
70
|
+
- Never use `str(object)` as a stable reference. Use an explicit reference codec.
|
|
71
|
+
- Keep Click and MCP adapters thin; business logic belongs in the shared operation layer.
|
|
72
|
+
- Project CLI and MCP as siblings from the registry; never implement one transport through another.
|
|
73
|
+
- Keep public examples executable and documentation links valid. When output appears in docs, verify
|
|
74
|
+
it against the real command rather than hand-maintaining a divergent shape.
|
|
75
|
+
- Preserve bundled skill sidecars as package data. When they change, test both source access and
|
|
76
|
+
built-wheel contents.
|
|
77
|
+
- Do not commit `.venv/`, `dist/`, caches, credentials, or generated artifacts.
|
|
78
|
+
|
|
79
|
+
## Changes and releases
|
|
80
|
+
|
|
81
|
+
Keep commits focused and include tests for behavior changes. Do not push, publish, or modify a
|
|
82
|
+
release workflow unless the user explicitly requests it. Publishing uses GitHub OIDC Trusted
|
|
83
|
+
Publishing; never add PyPI passwords or API tokens to repository files or workflow secrets.
|
|
84
|
+
|
|
85
|
+
Before handing off, inspect the diff and working tree, run `make check`, and report any checks that
|
|
86
|
+
could not run.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Focused issues and pull requests are welcome. For substantial changes, open an issue or discussion
|
|
4
|
+
first so the operation contract and adapter boundaries can be agreed before implementation.
|
|
5
|
+
|
|
6
|
+
## Development
|
|
7
|
+
|
|
8
|
+
Install [uv](https://docs.astral.sh/uv/), clone the repository, and create the locked Python 3.12+
|
|
9
|
+
environment:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv sync --frozen --all-extras --dev
|
|
13
|
+
make check
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Write a failing test before changing behavior. Keep CLI and MCP adapters thin, preserve structured
|
|
17
|
+
error codes, and follow the YAML and bounded-discovery rules in [AGENTS.md](AGENTS.md).
|
|
18
|
+
|
|
19
|
+
## Pull requests
|
|
20
|
+
|
|
21
|
+
- Keep unrelated changes separate.
|
|
22
|
+
- Explain the user-visible contract change and its motivation.
|
|
23
|
+
- Add or update tests and documentation together with the code.
|
|
24
|
+
- Run `make check` and include any platform-specific limitations in the PR description.
|
|
25
|
+
- Use a concise imperative commit message, such as `feat: add bounded action discovery`.
|
|
26
|
+
|
|
27
|
+
By contributing, you agree that your contribution is licensed under the MIT License.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Allen Day
|
|
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.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.PHONY: sync test lint typecheck build check
|
|
2
|
+
|
|
3
|
+
sync:
|
|
4
|
+
uv sync --frozen --all-extras --dev
|
|
5
|
+
|
|
6
|
+
test:
|
|
7
|
+
uv run pytest
|
|
8
|
+
|
|
9
|
+
lint:
|
|
10
|
+
uv run ruff check .
|
|
11
|
+
|
|
12
|
+
typecheck:
|
|
13
|
+
uv run mypy src
|
|
14
|
+
|
|
15
|
+
build:
|
|
16
|
+
uv build
|
|
17
|
+
|
|
18
|
+
check: test lint typecheck build
|