batchor 0.0.1__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.
- batchor-0.0.1/.agents/plugins/marketplace.json +20 -0
- batchor-0.0.1/.agents/skills/batchor-dev/SKILL.md +41 -0
- batchor-0.0.1/.agents/skills/batchor-dev/agents/openai.yaml +7 -0
- batchor-0.0.1/.github/workflows/ci.yml +145 -0
- batchor-0.0.1/.github/workflows/docs.yml +58 -0
- batchor-0.0.1/.github/workflows/publish.yml +56 -0
- batchor-0.0.1/.gitignore +49 -0
- batchor-0.0.1/.pre-commit-config.yaml +16 -0
- batchor-0.0.1/AGENTS.md +37 -0
- batchor-0.0.1/CONTRIBUTING.md +19 -0
- batchor-0.0.1/LICENSE +73 -0
- batchor-0.0.1/PKG-INFO +641 -0
- batchor-0.0.1/README.md +539 -0
- batchor-0.0.1/SUPPORT.md +23 -0
- batchor-0.0.1/VERSIONING.md +20 -0
- batchor-0.0.1/docs/assets/stylesheets/extra.css +22 -0
- batchor-0.0.1/docs/design_docs/ARCHITECTURE.md +437 -0
- batchor-0.0.1/docs/design_docs/BOUNDARY_AND_PHILOSOPHY.md +75 -0
- batchor-0.0.1/docs/design_docs/OPENAI_BATCHING.md +187 -0
- batchor-0.0.1/docs/design_docs/ROADMAP.md +23 -0
- batchor-0.0.1/docs/design_docs/STORAGE_AND_RUNS.md +293 -0
- batchor-0.0.1/docs/design_docs/STORAGE_MIGRATIONS.md +36 -0
- batchor-0.0.1/docs/doc-map.md +40 -0
- batchor-0.0.1/docs/getting-started/cli.md +151 -0
- batchor-0.0.1/docs/getting-started/installation.md +56 -0
- batchor-0.0.1/docs/getting-started/python-api.md +351 -0
- batchor-0.0.1/docs/getting-started/use-cases.md +217 -0
- batchor-0.0.1/docs/index.md +75 -0
- batchor-0.0.1/docs/policies/contributing.md +19 -0
- batchor-0.0.1/docs/policies/support.md +23 -0
- batchor-0.0.1/docs/policies/versioning.md +20 -0
- batchor-0.0.1/docs/reference/api.md +97 -0
- batchor-0.0.1/docs/smoke-test.md +151 -0
- batchor-0.0.1/mkdocs.yml +97 -0
- batchor-0.0.1/plugins/batchor-agent-tools/.codex-plugin/plugin.json +38 -0
- batchor-0.0.1/plugins/batchor-agent-tools/.mcp.json +10 -0
- batchor-0.0.1/plugins/batchor-agent-tools/scripts/batchor_repo_mcp.py +286 -0
- batchor-0.0.1/pyproject.toml +107 -0
- batchor-0.0.1/src/batchor/__init__.py +139 -0
- batchor-0.0.1/src/batchor/artifacts/__init__.py +6 -0
- batchor-0.0.1/src/batchor/artifacts/base.py +90 -0
- batchor-0.0.1/src/batchor/artifacts/local.py +190 -0
- batchor-0.0.1/src/batchor/cli.py +459 -0
- batchor-0.0.1/src/batchor/core/__init__.py +1 -0
- batchor-0.0.1/src/batchor/core/enums.py +147 -0
- batchor-0.0.1/src/batchor/core/exceptions.py +74 -0
- batchor-0.0.1/src/batchor/core/models.py +668 -0
- batchor-0.0.1/src/batchor/core/types.py +76 -0
- batchor-0.0.1/src/batchor/providers/__init__.py +1 -0
- batchor-0.0.1/src/batchor/providers/base.py +217 -0
- batchor-0.0.1/src/batchor/providers/openai.py +227 -0
- batchor-0.0.1/src/batchor/providers/registry.py +154 -0
- batchor-0.0.1/src/batchor/py.typed +1 -0
- batchor-0.0.1/src/batchor/runtime/__init__.py +1 -0
- batchor-0.0.1/src/batchor/runtime/retry.py +177 -0
- batchor-0.0.1/src/batchor/runtime/run_handle.py +252 -0
- batchor-0.0.1/src/batchor/runtime/runner.py +1015 -0
- batchor-0.0.1/src/batchor/runtime/runner_execution.py +753 -0
- batchor-0.0.1/src/batchor/runtime/tokens.py +312 -0
- batchor-0.0.1/src/batchor/runtime/validation.py +374 -0
- batchor-0.0.1/src/batchor/sources/__init__.py +14 -0
- batchor-0.0.1/src/batchor/sources/base.py +170 -0
- batchor-0.0.1/src/batchor/sources/composite.py +160 -0
- batchor-0.0.1/src/batchor/sources/files.py +290 -0
- batchor-0.0.1/src/batchor/storage/__init__.py +1 -0
- batchor-0.0.1/src/batchor/storage/memory.py +732 -0
- batchor-0.0.1/src/batchor/storage/postgres.py +3 -0
- batchor-0.0.1/src/batchor/storage/postgres_store.py +159 -0
- batchor-0.0.1/src/batchor/storage/registry.py +97 -0
- batchor-0.0.1/src/batchor/storage/sqlite.py +33 -0
- batchor-0.0.1/src/batchor/storage/sqlite_codec.py +114 -0
- batchor-0.0.1/src/batchor/storage/sqlite_lifecycle.py +574 -0
- batchor-0.0.1/src/batchor/storage/sqlite_protocol.py +130 -0
- batchor-0.0.1/src/batchor/storage/sqlite_queries.py +404 -0
- batchor-0.0.1/src/batchor/storage/sqlite_results.py +403 -0
- batchor-0.0.1/src/batchor/storage/sqlite_schema.py +101 -0
- batchor-0.0.1/src/batchor/storage/sqlite_store.py +140 -0
- batchor-0.0.1/src/batchor/storage/state.py +46 -0
- batchor-0.0.1/src/batchor/storage/state_models.py +864 -0
- batchor-0.0.1/tests/integration/test_batchor_live_openai.py +154 -0
- batchor-0.0.1/tests/integration/test_batchor_runner.py +1576 -0
- batchor-0.0.1/tests/unit/test_agent_tooling.py +49 -0
- batchor-0.0.1/tests/unit/test_batchor_architecture.py +78 -0
- batchor-0.0.1/tests/unit/test_batchor_artifacts.py +51 -0
- batchor-0.0.1/tests/unit/test_batchor_cli.py +356 -0
- batchor-0.0.1/tests/unit/test_batchor_openai_provider.py +164 -0
- batchor-0.0.1/tests/unit/test_batchor_retry.py +29 -0
- batchor-0.0.1/tests/unit/test_batchor_sources.py +297 -0
- batchor-0.0.1/tests/unit/test_batchor_sqlite_storage_flow.py +393 -0
- batchor-0.0.1/tests/unit/test_batchor_storage.py +22 -0
- batchor-0.0.1/tests/unit/test_batchor_storage_contracts.py +201 -0
- batchor-0.0.1/tests/unit/test_batchor_tokens.py +130 -0
- batchor-0.0.1/tests/unit/test_batchor_validation.py +174 -0
- batchor-0.0.1/uv.lock +1503 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "batchor-local",
|
|
3
|
+
"interface": {
|
|
4
|
+
"displayName": "Batchor Local"
|
|
5
|
+
},
|
|
6
|
+
"plugins": [
|
|
7
|
+
{
|
|
8
|
+
"name": "batchor-agent-tools",
|
|
9
|
+
"source": {
|
|
10
|
+
"source": "local",
|
|
11
|
+
"path": "./plugins/batchor-agent-tools"
|
|
12
|
+
},
|
|
13
|
+
"policy": {
|
|
14
|
+
"installation": "AVAILABLE",
|
|
15
|
+
"authentication": "ON_INSTALL"
|
|
16
|
+
},
|
|
17
|
+
"category": "Coding"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: batchor-dev
|
|
3
|
+
description: Use when working in the batchor repository to implement or review library, CLI, runtime, provider, storage, source, or documentation changes. Follow AGENTS.md smoke-test rules, prefer the relevant design docs before editing, and keep README plus design docs aligned when behavior changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Batchor Dev
|
|
7
|
+
|
|
8
|
+
Use this skill for normal contributor work in this repository.
|
|
9
|
+
|
|
10
|
+
## Start here
|
|
11
|
+
|
|
12
|
+
1. Read `AGENTS.md` for required validation and doc-maintenance rules.
|
|
13
|
+
2. Read `README.md` for the public mental model and current scope.
|
|
14
|
+
3. Load only the design docs that match the task:
|
|
15
|
+
- `docs/design_docs/ARCHITECTURE.md` for package layout and runtime boundaries
|
|
16
|
+
- `docs/design_docs/OPENAI_BATCHING.md` for provider-specific batching behavior
|
|
17
|
+
- `docs/design_docs/STORAGE_AND_RUNS.md` for durable state, run lifecycle, and retention
|
|
18
|
+
- `docs/smoke-test.md` for the full validation matrix
|
|
19
|
+
|
|
20
|
+
## Repo map
|
|
21
|
+
|
|
22
|
+
- `src/batchor/runtime/`: orchestration, run handles, validation, retry, token budgeting
|
|
23
|
+
- `src/batchor/providers/`: provider interfaces and OpenAI Batch implementation
|
|
24
|
+
- `src/batchor/storage/`: SQLite, Postgres, and in-memory durability backends
|
|
25
|
+
- `src/batchor/sources/`: file-backed checkpointable item sources
|
|
26
|
+
- `src/batchor/artifacts/`: durable request/output artifact handling
|
|
27
|
+
- `src/batchor/cli.py`: operator CLI surface
|
|
28
|
+
- `tests/unit/` and `tests/integration/`: main regression coverage
|
|
29
|
+
|
|
30
|
+
## Validation rules
|
|
31
|
+
|
|
32
|
+
- Required smoke path after refactors or behavior-changing edits: `uv run pytest -q`
|
|
33
|
+
- Also run `uv run ty check src` when changing provider wiring, storage wiring, token budgeting, or run lifecycle behavior.
|
|
34
|
+
- Do not weaken the `85%` coverage gate or disable coverage on the main smoke path.
|
|
35
|
+
- If docs or navigation change, also run `uv run mkdocs build --strict`.
|
|
36
|
+
|
|
37
|
+
## Working style
|
|
38
|
+
|
|
39
|
+
- Keep changes library-first. New orchestration behavior should usually land in the runtime or provider layers before the CLI.
|
|
40
|
+
- Preserve durable-run invariants. Resume, replay, artifact retention, and terminal-result behavior are core repo constraints.
|
|
41
|
+
- When behavior changes, update `README.md` and the relevant docs in `docs/design_docs/` in the same change.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Batchor Dev"
|
|
3
|
+
short_description: "Repo guidance for batchor code, docs, and validation"
|
|
4
|
+
default_prompt: "Use $batchor-dev to work in this batchor repository, follow AGENTS.md, and keep validation plus docs aligned with the change."
|
|
5
|
+
|
|
6
|
+
policy:
|
|
7
|
+
allow_implicit_invocation: true
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
gitleaks:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
- uses: gitleaks/gitleaks-action@v2
|
|
19
|
+
env:
|
|
20
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
21
|
+
|
|
22
|
+
lint:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.13"
|
|
31
|
+
|
|
32
|
+
- name: Install uv
|
|
33
|
+
uses: astral-sh/setup-uv@v5
|
|
34
|
+
|
|
35
|
+
- name: Sync dependencies
|
|
36
|
+
run: uv sync --all-groups
|
|
37
|
+
|
|
38
|
+
- name: Lint (ruff check)
|
|
39
|
+
run: uv run ruff check src
|
|
40
|
+
|
|
41
|
+
- name: Format check (ruff format)
|
|
42
|
+
run: uv run ruff format --check src
|
|
43
|
+
|
|
44
|
+
test:
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
strategy:
|
|
47
|
+
fail-fast: false
|
|
48
|
+
matrix:
|
|
49
|
+
python-version: ["3.12", "3.13"]
|
|
50
|
+
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v4
|
|
53
|
+
|
|
54
|
+
- name: Set up Python
|
|
55
|
+
uses: actions/setup-python@v5
|
|
56
|
+
with:
|
|
57
|
+
python-version: ${{ matrix.python-version }}
|
|
58
|
+
|
|
59
|
+
- name: Install uv
|
|
60
|
+
uses: astral-sh/setup-uv@v5
|
|
61
|
+
|
|
62
|
+
- name: Sync dependencies
|
|
63
|
+
run: uv sync --all-groups
|
|
64
|
+
|
|
65
|
+
- name: Type check
|
|
66
|
+
run: uv run ty check src
|
|
67
|
+
|
|
68
|
+
- name: Test
|
|
69
|
+
run: uv run pytest -q
|
|
70
|
+
|
|
71
|
+
build:
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v4
|
|
76
|
+
|
|
77
|
+
- name: Set up Python
|
|
78
|
+
uses: actions/setup-python@v5
|
|
79
|
+
with:
|
|
80
|
+
python-version: "3.13"
|
|
81
|
+
|
|
82
|
+
- name: Install uv
|
|
83
|
+
uses: astral-sh/setup-uv@v5
|
|
84
|
+
|
|
85
|
+
- name: Sync dependencies
|
|
86
|
+
run: uv sync --all-groups
|
|
87
|
+
|
|
88
|
+
- name: Build
|
|
89
|
+
run: uv build
|
|
90
|
+
|
|
91
|
+
docs:
|
|
92
|
+
runs-on: ubuntu-latest
|
|
93
|
+
|
|
94
|
+
steps:
|
|
95
|
+
- uses: actions/checkout@v4
|
|
96
|
+
|
|
97
|
+
- name: Set up Python
|
|
98
|
+
uses: actions/setup-python@v5
|
|
99
|
+
with:
|
|
100
|
+
python-version: "3.13"
|
|
101
|
+
|
|
102
|
+
- name: Install uv
|
|
103
|
+
uses: astral-sh/setup-uv@v5
|
|
104
|
+
|
|
105
|
+
- name: Sync dependencies
|
|
106
|
+
run: uv sync --all-groups
|
|
107
|
+
|
|
108
|
+
- name: Build docs
|
|
109
|
+
run: uv run mkdocs build --strict
|
|
110
|
+
|
|
111
|
+
postgres-contract:
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
services:
|
|
114
|
+
postgres:
|
|
115
|
+
image: postgres:17
|
|
116
|
+
env:
|
|
117
|
+
POSTGRES_DB: postgres
|
|
118
|
+
POSTGRES_USER: postgres
|
|
119
|
+
POSTGRES_PASSWORD: postgres
|
|
120
|
+
ports:
|
|
121
|
+
- 5432:5432
|
|
122
|
+
options: >-
|
|
123
|
+
--health-cmd pg_isready
|
|
124
|
+
--health-interval 10s
|
|
125
|
+
--health-timeout 5s
|
|
126
|
+
--health-retries 5
|
|
127
|
+
env:
|
|
128
|
+
BATCHOR_TEST_POSTGRES_DSN: postgresql+psycopg://postgres:postgres@127.0.0.1:5432/postgres
|
|
129
|
+
|
|
130
|
+
steps:
|
|
131
|
+
- uses: actions/checkout@v4
|
|
132
|
+
|
|
133
|
+
- name: Set up Python
|
|
134
|
+
uses: actions/setup-python@v5
|
|
135
|
+
with:
|
|
136
|
+
python-version: "3.13"
|
|
137
|
+
|
|
138
|
+
- name: Install uv
|
|
139
|
+
uses: astral-sh/setup-uv@v5
|
|
140
|
+
|
|
141
|
+
- name: Sync dependencies
|
|
142
|
+
run: uv sync --all-groups
|
|
143
|
+
|
|
144
|
+
- name: Postgres storage contract tests
|
|
145
|
+
run: uv run pytest tests/unit/test_batchor_storage_contracts.py --no-cov -q
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- master
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
pages: write
|
|
13
|
+
id-token: write
|
|
14
|
+
|
|
15
|
+
concurrency:
|
|
16
|
+
group: pages
|
|
17
|
+
cancel-in-progress: true
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.13"
|
|
30
|
+
|
|
31
|
+
- name: Install uv
|
|
32
|
+
uses: astral-sh/setup-uv@v5
|
|
33
|
+
|
|
34
|
+
- name: Configure GitHub Pages
|
|
35
|
+
uses: actions/configure-pages@v5
|
|
36
|
+
|
|
37
|
+
- name: Sync docs dependencies
|
|
38
|
+
run: uv sync --group docs
|
|
39
|
+
|
|
40
|
+
- name: Build docs
|
|
41
|
+
run: uv run mkdocs build --strict
|
|
42
|
+
|
|
43
|
+
- name: Upload GitHub Pages artifact
|
|
44
|
+
uses: actions/upload-pages-artifact@v3
|
|
45
|
+
with:
|
|
46
|
+
path: site
|
|
47
|
+
|
|
48
|
+
deploy:
|
|
49
|
+
needs: build
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
environment:
|
|
52
|
+
name: github-pages
|
|
53
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
54
|
+
|
|
55
|
+
steps:
|
|
56
|
+
- name: Deploy GitHub Pages site
|
|
57
|
+
id: deployment
|
|
58
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up Python
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.13"
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v5
|
|
22
|
+
|
|
23
|
+
- name: Sync dependencies
|
|
24
|
+
run: uv sync --all-groups
|
|
25
|
+
|
|
26
|
+
- name: Type check
|
|
27
|
+
run: uv run ty check src
|
|
28
|
+
|
|
29
|
+
- name: Test
|
|
30
|
+
run: uv run pytest -q
|
|
31
|
+
|
|
32
|
+
- name: Build
|
|
33
|
+
run: uv build
|
|
34
|
+
|
|
35
|
+
- name: Upload dist artifacts
|
|
36
|
+
uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: dist
|
|
39
|
+
path: dist/*
|
|
40
|
+
|
|
41
|
+
publish:
|
|
42
|
+
needs: build-test
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
environment: pypi
|
|
45
|
+
permissions:
|
|
46
|
+
id-token: write
|
|
47
|
+
|
|
48
|
+
steps:
|
|
49
|
+
- name: Download dist artifacts
|
|
50
|
+
uses: actions/download-artifact@v4
|
|
51
|
+
with:
|
|
52
|
+
name: dist
|
|
53
|
+
path: dist
|
|
54
|
+
|
|
55
|
+
- name: Publish to PyPI
|
|
56
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
batchor-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Python bytecode and caches
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
.mypy_cache/
|
|
6
|
+
.ruff_cache/
|
|
7
|
+
.pytest_cache/
|
|
8
|
+
.pyre/
|
|
9
|
+
.hypothesis/
|
|
10
|
+
|
|
11
|
+
# Virtual environments
|
|
12
|
+
.venv/
|
|
13
|
+
venv/
|
|
14
|
+
env/
|
|
15
|
+
ENV/
|
|
16
|
+
|
|
17
|
+
# Build and packaging artifacts
|
|
18
|
+
build/
|
|
19
|
+
dist/
|
|
20
|
+
site/
|
|
21
|
+
*.egg-info/
|
|
22
|
+
.eggs/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
|
|
25
|
+
# Internal planning docs
|
|
26
|
+
docs/plans/
|
|
27
|
+
plans/
|
|
28
|
+
|
|
29
|
+
# Coverage and test outputs
|
|
30
|
+
.coverage
|
|
31
|
+
.coverage.*
|
|
32
|
+
htmlcov/
|
|
33
|
+
coverage.xml
|
|
34
|
+
tmp/
|
|
35
|
+
# Environment and local config
|
|
36
|
+
.env
|
|
37
|
+
.env.*
|
|
38
|
+
*.env
|
|
39
|
+
|
|
40
|
+
# IDE and editor files
|
|
41
|
+
.idea/
|
|
42
|
+
.vscode/
|
|
43
|
+
*.swp
|
|
44
|
+
*.swo
|
|
45
|
+
*~
|
|
46
|
+
|
|
47
|
+
# OS files
|
|
48
|
+
.DS_Store
|
|
49
|
+
Thumbs.db
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.15.9
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
|
|
9
|
+
- repo: local
|
|
10
|
+
hooks:
|
|
11
|
+
- id: ty-check
|
|
12
|
+
name: ty type check
|
|
13
|
+
entry: uv run ty check src
|
|
14
|
+
language: system
|
|
15
|
+
pass_filenames: false
|
|
16
|
+
types: [python]
|
batchor-0.0.1/AGENTS.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
## Mandatory Smoke Tests
|
|
4
|
+
|
|
5
|
+
- After any refactor or behavior-changing code edit, run a smoke test before marking work complete.
|
|
6
|
+
- Overall test coverage must stay at or above `85%`. Do not merge changes that require lowering the configured coverage gate.
|
|
7
|
+
- Minimum required smoke test:
|
|
8
|
+
- extracted repo root: `uv run pytest -q`
|
|
9
|
+
- monorepo subproject: `cd batchor && uv run pytest -q`
|
|
10
|
+
- The default pytest configuration enforces the coverage gate and runs in parallel. Do not disable coverage for the main smoke path.
|
|
11
|
+
- For changes to provider wiring, storage wiring, token budgeting, or run lifecycle behavior, also run:
|
|
12
|
+
- `uv run ty check src`
|
|
13
|
+
- the targeted fake-provider integration suite when relevant
|
|
14
|
+
- In the final report, include:
|
|
15
|
+
- the smoke command(s) executed
|
|
16
|
+
- pass/fail outcome
|
|
17
|
+
- any blocker if a smoke test could not be executed
|
|
18
|
+
|
|
19
|
+
## Mandatory Doc Maintenance
|
|
20
|
+
|
|
21
|
+
- When adding a major feature or changing library behavior, update relevant docs in `docs/` in the same change.
|
|
22
|
+
- When changing test workflow or validation policy, update the relevant developer docs in the same change.
|
|
23
|
+
- At minimum, check and update:
|
|
24
|
+
- `README.md`
|
|
25
|
+
- `docs/design_docs/ARCHITECTURE.md`
|
|
26
|
+
- `docs/design_docs/OPENAI_BATCHING.md`
|
|
27
|
+
- `docs/design_docs/STORAGE_AND_RUNS.md`
|
|
28
|
+
- `docs/smoke-test.md`
|
|
29
|
+
- If a design area is not implemented yet, keep the section and mark it `TBD` instead of omitting it.
|
|
30
|
+
|
|
31
|
+
## Repo Agent Helpers
|
|
32
|
+
|
|
33
|
+
- Repo-local skill: `.agents/skills/batchor-dev/`
|
|
34
|
+
- Repo-local plugin marketplace: `.agents/plugins/marketplace.json`
|
|
35
|
+
- Repo-local MCP plugin: `plugins/batchor-agent-tools/`
|
|
36
|
+
- VS Code workspace MCP config: `.vscode/mcp.json`
|
|
37
|
+
- Prefer these when an agent needs quick orientation on repo structure, docs, or validation commands.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Issues and pull requests are welcome for the noncommercial open-source package.
|
|
4
|
+
|
|
5
|
+
Before submitting changes:
|
|
6
|
+
|
|
7
|
+
- run `uv run ty check src`
|
|
8
|
+
- run `uv run pytest -q`
|
|
9
|
+
- run `uv run mkdocs build --strict`
|
|
10
|
+
- run `uv build`
|
|
11
|
+
- update docs when behavior, workflow, or validation policy changes
|
|
12
|
+
|
|
13
|
+
Please keep changes aligned with the documented package boundary:
|
|
14
|
+
|
|
15
|
+
- durable batch execution
|
|
16
|
+
- OpenAI Batch provider support
|
|
17
|
+
- SQLite-backed local durability by default
|
|
18
|
+
|
|
19
|
+
Out-of-scope proposals are still useful, but should usually start as an issue discussing fit before implementation.
|
batchor-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
## Acceptance
|
|
4
|
+
|
|
5
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
6
|
+
|
|
7
|
+
## Copyright License
|
|
8
|
+
|
|
9
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
10
|
+
|
|
11
|
+
## Distribution License
|
|
12
|
+
|
|
13
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
14
|
+
|
|
15
|
+
## Notices
|
|
16
|
+
|
|
17
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
18
|
+
|
|
19
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
20
|
+
|
|
21
|
+
Required Notice: Copyright 2026 batchor contributors
|
|
22
|
+
|
|
23
|
+
## Changes and New Works License
|
|
24
|
+
|
|
25
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
26
|
+
|
|
27
|
+
## Patent License
|
|
28
|
+
|
|
29
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
30
|
+
|
|
31
|
+
## Noncommercial Purposes
|
|
32
|
+
|
|
33
|
+
Any noncommercial purpose is a permitted purpose.
|
|
34
|
+
|
|
35
|
+
## Personal Uses
|
|
36
|
+
|
|
37
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
38
|
+
|
|
39
|
+
## Noncommercial Organizations
|
|
40
|
+
|
|
41
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
42
|
+
|
|
43
|
+
## Fair Use
|
|
44
|
+
|
|
45
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
46
|
+
|
|
47
|
+
## No Other Rights
|
|
48
|
+
|
|
49
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
50
|
+
|
|
51
|
+
## Patent Defense
|
|
52
|
+
|
|
53
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
54
|
+
|
|
55
|
+
## Violations
|
|
56
|
+
|
|
57
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
58
|
+
|
|
59
|
+
## No Liability
|
|
60
|
+
|
|
61
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
62
|
+
|
|
63
|
+
## Definitions
|
|
64
|
+
|
|
65
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
66
|
+
|
|
67
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
68
|
+
|
|
69
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
70
|
+
|
|
71
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
72
|
+
|
|
73
|
+
**Use** means anything you do with the software requiring one of your licenses.
|