agentledger-runtime 1.0.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.
- agentledger_runtime-1.0.0/.github/workflows/ci.yml +264 -0
- agentledger_runtime-1.0.0/.gitignore +38 -0
- agentledger_runtime-1.0.0/CHANGELOG.md +112 -0
- agentledger_runtime-1.0.0/CODE_OF_CONDUCT.md +22 -0
- agentledger_runtime-1.0.0/CONTRIBUTING.md +98 -0
- agentledger_runtime-1.0.0/LICENSE +55 -0
- agentledger_runtime-1.0.0/PKG-INFO +264 -0
- agentledger_runtime-1.0.0/README.md +236 -0
- agentledger_runtime-1.0.0/README.zh-CN.md +236 -0
- agentledger_runtime-1.0.0/SECURITY.md +56 -0
- agentledger_runtime-1.0.0/contracts/agentledger.runtime.v1.json +542 -0
- agentledger_runtime-1.0.0/docs/ADAPTER_CERTIFICATION.md +210 -0
- agentledger_runtime-1.0.0/docs/ARCHITECTURE.md +146 -0
- agentledger_runtime-1.0.0/docs/BACKUP_RESTORE.md +104 -0
- agentledger_runtime-1.0.0/docs/DESIGN_AND_IMPLEMENTATION.md +246 -0
- agentledger_runtime-1.0.0/docs/DISTRIBUTED_WORKERS.md +159 -0
- agentledger_runtime-1.0.0/docs/EXTENSIBILITY.md +384 -0
- agentledger_runtime-1.0.0/docs/IMPLEMENTATION_PLAN.md +321 -0
- agentledger_runtime-1.0.0/docs/IMPLEMENTATION_STATUS.md +113 -0
- agentledger_runtime-1.0.0/docs/MATURITY_MODEL.md +103 -0
- agentledger_runtime-1.0.0/docs/MULTI_LANGUAGE.md +124 -0
- agentledger_runtime-1.0.0/docs/POSTGRES.md +138 -0
- agentledger_runtime-1.0.0/docs/README.md +77 -0
- agentledger_runtime-1.0.0/docs/RELEASE_CHECKLIST.md +95 -0
- agentledger_runtime-1.0.0/docs/ROADMAP.md +242 -0
- agentledger_runtime-1.0.0/docs/RUNTIME_SPEC.md +969 -0
- agentledger_runtime-1.0.0/docs/S3_MINIO.md +101 -0
- agentledger_runtime-1.0.0/docs/SECURITY_ENTERPRISE.md +247 -0
- agentledger_runtime-1.0.0/docs/STORAGE.md +207 -0
- agentledger_runtime-1.0.0/docs/USAGE.md +265 -0
- agentledger_runtime-1.0.0/docs/VERSIONING.md +108 -0
- agentledger_runtime-1.0.0/docs/assets/agentledger-runtime-architecture.svg +106 -0
- agentledger_runtime-1.0.0/docs/zh/ADAPTER_CERTIFICATION.md +144 -0
- agentledger_runtime-1.0.0/docs/zh/ARCHITECTURE.md +109 -0
- agentledger_runtime-1.0.0/docs/zh/DESIGN_AND_IMPLEMENTATION.md +246 -0
- agentledger_runtime-1.0.0/docs/zh/EXTENSIBILITY.md +171 -0
- agentledger_runtime-1.0.0/docs/zh/IMPLEMENTATION_STATUS.md +111 -0
- agentledger_runtime-1.0.0/docs/zh/README.md +71 -0
- agentledger_runtime-1.0.0/docs/zh/RELEASE_CHECKLIST.md +78 -0
- agentledger_runtime-1.0.0/docs/zh/ROADMAP.md +177 -0
- agentledger_runtime-1.0.0/docs/zh/RUNTIME_SPEC.md +272 -0
- agentledger_runtime-1.0.0/docs/zh/SECURITY_ENTERPRISE.md +124 -0
- agentledger_runtime-1.0.0/docs/zh/STORAGE.md +140 -0
- agentledger_runtime-1.0.0/docs/zh/USAGE.md +248 -0
- agentledger_runtime-1.0.0/examples/autogen/basic_agent.py +26 -0
- agentledger_runtime-1.0.0/examples/crewai/basic_crew.py +26 -0
- agentledger_runtime-1.0.0/examples/docs/README.md +28 -0
- agentledger_runtime-1.0.0/examples/hello_world/hello.py +12 -0
- agentledger_runtime-1.0.0/examples/langchain/basic_runnable.py +26 -0
- agentledger_runtime-1.0.0/examples/langgraph/basic_graph.py +27 -0
- agentledger_runtime-1.0.0/examples/lint/boundary_rules.json +13 -0
- agentledger_runtime-1.0.0/examples/llamaindex/basic_query.py +26 -0
- agentledger_runtime-1.0.0/examples/mcp_context/basic_context_server.py +65 -0
- agentledger_runtime-1.0.0/examples/mcp_tool/basic_tool.py +38 -0
- agentledger_runtime-1.0.0/examples/media_stream/basic_media_stream.py +63 -0
- agentledger_runtime-1.0.0/examples/media_stream/managed_tool.py +74 -0
- agentledger_runtime-1.0.0/examples/openai_agents/basic_agent.py +26 -0
- agentledger_runtime-1.0.0/examples/policy/local.policy.yaml +22 -0
- agentledger_runtime-1.0.0/examples/sandbox/command_tool.py +41 -0
- agentledger_runtime-1.0.0/examples/sandbox/sandbox.yaml +43 -0
- agentledger_runtime-1.0.0/examples/semantic_kernel/basic_kernel.py +26 -0
- agentledger_runtime-1.0.0/examples/side_effect_idempotency/README.md +22 -0
- agentledger_runtime-1.0.0/examples/tool_catalog/basic_catalog.py +58 -0
- agentledger_runtime-1.0.0/examples/transient_retry/README.md +28 -0
- agentledger_runtime-1.0.0/migrations/postgres/0001_initial.sql +116 -0
- agentledger_runtime-1.0.0/migrations/sqlite/0001_initial.sql +110 -0
- agentledger_runtime-1.0.0/pyproject.toml +45 -0
- agentledger_runtime-1.0.0/src/agentledger/__init__.py +183 -0
- agentledger_runtime-1.0.0/src/agentledger/__main__.py +5 -0
- agentledger_runtime-1.0.0/src/agentledger/adapters.py +62 -0
- agentledger_runtime-1.0.0/src/agentledger/adapters_frameworks.py +146 -0
- agentledger_runtime-1.0.0/src/agentledger/adapters_langgraph.py +140 -0
- agentledger_runtime-1.0.0/src/agentledger/adapters_mcp.py +145 -0
- agentledger_runtime-1.0.0/src/agentledger/approval.py +32 -0
- agentledger_runtime-1.0.0/src/agentledger/backup.py +127 -0
- agentledger_runtime-1.0.0/src/agentledger/blobstore.py +31 -0
- agentledger_runtime-1.0.0/src/agentledger/blobstore_s3.py +118 -0
- agentledger_runtime-1.0.0/src/agentledger/cli.py +1047 -0
- agentledger_runtime-1.0.0/src/agentledger/conformance.py +468 -0
- agentledger_runtime-1.0.0/src/agentledger/context.py +146 -0
- agentledger_runtime-1.0.0/src/agentledger/contract.py +176 -0
- agentledger_runtime-1.0.0/src/agentledger/cost.py +133 -0
- agentledger_runtime-1.0.0/src/agentledger/diff.py +205 -0
- agentledger_runtime-1.0.0/src/agentledger/eval.py +128 -0
- agentledger_runtime-1.0.0/src/agentledger/evidence.py +285 -0
- agentledger_runtime-1.0.0/src/agentledger/examples.py +62 -0
- agentledger_runtime-1.0.0/src/agentledger/failure.py +190 -0
- agentledger_runtime-1.0.0/src/agentledger/failure_injection.py +119 -0
- agentledger_runtime-1.0.0/src/agentledger/ids.py +31 -0
- agentledger_runtime-1.0.0/src/agentledger/jsonutil.py +31 -0
- agentledger_runtime-1.0.0/src/agentledger/lint.py +415 -0
- agentledger_runtime-1.0.0/src/agentledger/media.py +268 -0
- agentledger_runtime-1.0.0/src/agentledger/media_tools.py +209 -0
- agentledger_runtime-1.0.0/src/agentledger/policy.py +174 -0
- agentledger_runtime-1.0.0/src/agentledger/protocol.py +32 -0
- agentledger_runtime-1.0.0/src/agentledger/replay.py +74 -0
- agentledger_runtime-1.0.0/src/agentledger/repro.py +335 -0
- agentledger_runtime-1.0.0/src/agentledger/retention.py +111 -0
- agentledger_runtime-1.0.0/src/agentledger/review.py +109 -0
- agentledger_runtime-1.0.0/src/agentledger/runtime.py +187 -0
- agentledger_runtime-1.0.0/src/agentledger/sandbox.py +749 -0
- agentledger_runtime-1.0.0/src/agentledger/scheduler.py +53 -0
- agentledger_runtime-1.0.0/src/agentledger/shadow.py +62 -0
- agentledger_runtime-1.0.0/src/agentledger/simple.py +131 -0
- agentledger_runtime-1.0.0/src/agentledger/storage_postgres.py +439 -0
- agentledger_runtime-1.0.0/src/agentledger/storage_schema.py +368 -0
- agentledger_runtime-1.0.0/src/agentledger/store.py +532 -0
- agentledger_runtime-1.0.0/src/agentledger/timetravel.py +248 -0
- agentledger_runtime-1.0.0/src/agentledger/tools.py +516 -0
- agentledger_runtime-1.0.0/src/agentledger/trace.py +223 -0
- agentledger_runtime-1.0.0/src/agentledger/worker.py +355 -0
- agentledger_runtime-1.0.0/tests/test_postgres_integration.py +45 -0
- agentledger_runtime-1.0.0/tests/test_runtime.py +2545 -0
- agentledger_runtime-1.0.0/tests/test_s3_integration.py +34 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["main"]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
python:
|
|
11
|
+
name: Python ${{ matrix.python-version }}
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
python-version: ["3.11", "3.12"]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
|
|
27
|
+
- name: Compile
|
|
28
|
+
run: PYTHONPYCACHEPREFIX=/tmp/agentledger-pycache PYTHONPATH=src python -m compileall -q src tests examples
|
|
29
|
+
|
|
30
|
+
- name: Test
|
|
31
|
+
run: PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m unittest discover -s tests -q
|
|
32
|
+
|
|
33
|
+
- name: ResourceWarning-sensitive tests
|
|
34
|
+
run: PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src PYTHONTRACEMALLOC=10 python -W default::ResourceWarning -m unittest discover -s tests -q
|
|
35
|
+
|
|
36
|
+
- name: Contract export is valid JSON
|
|
37
|
+
run: |
|
|
38
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger contract export > /tmp/agentledger-contract.json
|
|
39
|
+
python -m json.tool /tmp/agentledger-contract.json >/dev/null
|
|
40
|
+
|
|
41
|
+
- name: Migration DDL smoke
|
|
42
|
+
run: |
|
|
43
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger migrate ddl --dialect sqlite >/tmp/agentledger-sqlite.sql
|
|
44
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger migrate ddl --dialect postgres >/tmp/agentledger-postgres.sql
|
|
45
|
+
|
|
46
|
+
- name: State conformance smoke
|
|
47
|
+
run: |
|
|
48
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger state conformance --backend sqlite >/tmp/agentledger-state-conformance.json
|
|
49
|
+
python -m json.tool /tmp/agentledger-state-conformance.json >/dev/null
|
|
50
|
+
|
|
51
|
+
- name: Blob conformance smoke
|
|
52
|
+
run: |
|
|
53
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger blob conformance --backend local >/tmp/agentledger-blob-conformance.json
|
|
54
|
+
python -m json.tool /tmp/agentledger-blob-conformance.json >/dev/null
|
|
55
|
+
|
|
56
|
+
- name: Worker conformance smoke
|
|
57
|
+
run: |
|
|
58
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger worker conformance --backend sqlite --concurrent >/tmp/agentledger-worker-conformance.json
|
|
59
|
+
python -m json.tool /tmp/agentledger-worker-conformance.json >/dev/null
|
|
60
|
+
|
|
61
|
+
- name: Root conformance smoke
|
|
62
|
+
run: |
|
|
63
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-ci-conformance conformance >/tmp/agentledger-conformance.json
|
|
64
|
+
python -m json.tool /tmp/agentledger-conformance.json >/dev/null
|
|
65
|
+
|
|
66
|
+
- name: Adapter conformance smoke
|
|
67
|
+
run: |
|
|
68
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger adapter conformance --kind python-function >/tmp/agentledger-adapter-python.json
|
|
69
|
+
python -m json.tool /tmp/agentledger-adapter-python.json >/dev/null
|
|
70
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger adapter conformance --kind langchain >/tmp/agentledger-adapter-langchain.json
|
|
71
|
+
python -m json.tool /tmp/agentledger-adapter-langchain.json >/dev/null
|
|
72
|
+
|
|
73
|
+
- name: Worker serve smoke
|
|
74
|
+
run: |
|
|
75
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-worker-serve worker serve examples/transient_retry --max-loops 5 --idle-sleep-seconds 0 >/tmp/agentledger-worker-serve.json
|
|
76
|
+
python -m json.tool /tmp/agentledger-worker-serve.json >/dev/null
|
|
77
|
+
|
|
78
|
+
- name: Tool catalog smoke
|
|
79
|
+
run: |
|
|
80
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger tools manifest --example examples/docs >/tmp/agentledger-tools.json
|
|
81
|
+
python -m json.tool /tmp/agentledger-tools.json >/dev/null
|
|
82
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger tools manifest --example examples/docs --format openai >/tmp/agentledger-openai-tools.json
|
|
83
|
+
python -m json.tool /tmp/agentledger-openai-tools.json >/dev/null
|
|
84
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger tools manifest --example examples/media_stream >/tmp/agentledger-media-tools.json
|
|
85
|
+
python -m json.tool /tmp/agentledger-media-tools.json >/dev/null
|
|
86
|
+
|
|
87
|
+
- name: Failure injection smoke
|
|
88
|
+
run: |
|
|
89
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-failure failure inject --scenario all >/tmp/agentledger-failure.json
|
|
90
|
+
python -m json.tool /tmp/agentledger-failure.json >/dev/null
|
|
91
|
+
|
|
92
|
+
- name: Runtime boundary lint smoke
|
|
93
|
+
run: |
|
|
94
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger lint boundary examples tests --exclude tests/test_runtime.py >/tmp/agentledger-boundary-lint.json
|
|
95
|
+
python -m json.tool /tmp/agentledger-boundary-lint.json >/dev/null
|
|
96
|
+
|
|
97
|
+
- name: Example smoke
|
|
98
|
+
run: |
|
|
99
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/hello_world/hello.py >/tmp/agentledger-example-hello.txt
|
|
100
|
+
test -s /tmp/agentledger-example-hello.txt
|
|
101
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/autogen/basic_agent.py >/tmp/agentledger-example-autogen.json
|
|
102
|
+
python -m json.tool /tmp/agentledger-example-autogen.json >/dev/null
|
|
103
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/crewai/basic_crew.py >/tmp/agentledger-example-crewai.json
|
|
104
|
+
python -m json.tool /tmp/agentledger-example-crewai.json >/dev/null
|
|
105
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/langchain/basic_runnable.py >/tmp/agentledger-example-langchain.json
|
|
106
|
+
python -m json.tool /tmp/agentledger-example-langchain.json >/dev/null
|
|
107
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/langgraph/basic_graph.py >/tmp/agentledger-example-langgraph.json
|
|
108
|
+
python -m json.tool /tmp/agentledger-example-langgraph.json >/dev/null
|
|
109
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/llamaindex/basic_query.py >/tmp/agentledger-example-llamaindex.json
|
|
110
|
+
python -m json.tool /tmp/agentledger-example-llamaindex.json >/dev/null
|
|
111
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/media_stream/basic_media_stream.py >/tmp/agentledger-example-media.json
|
|
112
|
+
python -m json.tool /tmp/agentledger-example-media.json >/dev/null
|
|
113
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/media_stream/managed_tool.py >/tmp/agentledger-example-media-tool.json
|
|
114
|
+
python -m json.tool /tmp/agentledger-example-media-tool.json >/dev/null
|
|
115
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/mcp_context/basic_context_server.py >/tmp/agentledger-example-mcp-context.json
|
|
116
|
+
python -m json.tool /tmp/agentledger-example-mcp-context.json >/dev/null
|
|
117
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/mcp_tool/basic_tool.py >/tmp/agentledger-example-mcp.json
|
|
118
|
+
python -m json.tool /tmp/agentledger-example-mcp.json >/dev/null
|
|
119
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/openai_agents/basic_agent.py >/tmp/agentledger-example-openai-agents.json
|
|
120
|
+
python -m json.tool /tmp/agentledger-example-openai-agents.json >/dev/null
|
|
121
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/sandbox/command_tool.py >/tmp/agentledger-example-sandbox.json
|
|
122
|
+
python -m json.tool /tmp/agentledger-example-sandbox.json >/dev/null
|
|
123
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/tool_catalog/basic_catalog.py >/tmp/agentledger-example-tool-catalog.json
|
|
124
|
+
python -m json.tool /tmp/agentledger-example-tool-catalog.json >/dev/null
|
|
125
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python examples/semantic_kernel/basic_kernel.py >/tmp/agentledger-example-semantic-kernel.json
|
|
126
|
+
python -m json.tool /tmp/agentledger-example-semantic-kernel.json >/dev/null
|
|
127
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-ci-worker-run worker-run examples/transient_retry >/tmp/agentledger-example-worker-run.json
|
|
128
|
+
python -m json.tool /tmp/agentledger-example-worker-run.json >/dev/null
|
|
129
|
+
|
|
130
|
+
- name: Evidence regression smoke
|
|
131
|
+
run: |
|
|
132
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-regression run examples/side_effect_idempotency >/tmp/agentledger-regression-run.json
|
|
133
|
+
RUN_ID=$(python -c 'import json; print(json.load(open("/tmp/agentledger-regression-run.json"))["run_id"])')
|
|
134
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-regression timetravel "$RUN_ID" --include-diffs --include-states --html /tmp/agentledger-timetravel.html >/tmp/agentledger-timetravel-report.json
|
|
135
|
+
test -s /tmp/agentledger-timetravel.html
|
|
136
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-regression cost report "$RUN_ID" >/tmp/agentledger-cost-report.json
|
|
137
|
+
python -m json.tool /tmp/agentledger-cost-report.json >/dev/null
|
|
138
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-regression failure report "$RUN_ID" >/tmp/agentledger-failure-report.json
|
|
139
|
+
python -m json.tool /tmp/agentledger-failure-report.json >/dev/null
|
|
140
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-regression review checklist "$RUN_ID" --max-total-usd 1.0 >/tmp/agentledger-review.json
|
|
141
|
+
python -m json.tool /tmp/agentledger-review.json >/dev/null
|
|
142
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-regression trace "$RUN_ID" --format otlp --out /tmp/agentledger-trace.otlp.json >/tmp/agentledger-trace-otlp.json
|
|
143
|
+
python -m json.tool /tmp/agentledger-trace.otlp.json >/dev/null
|
|
144
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-regression evidence "$RUN_ID" --out /tmp/agentledger-golden.json >/tmp/agentledger-evidence-file.json
|
|
145
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-regression evidence "$RUN_ID" --dir /tmp/agentledger-current >/tmp/agentledger-evidence-dir.json
|
|
146
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-regression evidence "$RUN_ID" --html /tmp/agentledger-evidence.html >/tmp/agentledger-evidence-html.json
|
|
147
|
+
test -s /tmp/agentledger-evidence.html
|
|
148
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger divergence /tmp/agentledger-golden.json /tmp/agentledger-current --evidence-paths >/tmp/agentledger-divergence.json
|
|
149
|
+
python -m json.tool /tmp/agentledger-divergence.json >/dev/null
|
|
150
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger evidence-regression /tmp/agentledger-golden.json /tmp/agentledger-current >/tmp/agentledger-evidence-regression.json
|
|
151
|
+
python -m json.tool /tmp/agentledger-evidence-regression.json >/dev/null
|
|
152
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-regression corpus add side-effect /tmp/agentledger-golden.json >/tmp/agentledger-corpus-add.json
|
|
153
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-regression corpus seed minimal-success >/tmp/agentledger-corpus-seed.json
|
|
154
|
+
python -m json.tool /tmp/agentledger-corpus-seed.json >/dev/null
|
|
155
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m agentledger --root /tmp/agentledger-regression corpus check side-effect /tmp/agentledger-current >/tmp/agentledger-corpus-eval.json
|
|
156
|
+
python -m json.tool /tmp/agentledger-corpus-eval.json >/dev/null
|
|
157
|
+
|
|
158
|
+
postgres-integration:
|
|
159
|
+
name: Postgres integration
|
|
160
|
+
runs-on: ubuntu-latest
|
|
161
|
+
services:
|
|
162
|
+
postgres:
|
|
163
|
+
image: postgres:16
|
|
164
|
+
env:
|
|
165
|
+
POSTGRES_USER: agentledger
|
|
166
|
+
POSTGRES_PASSWORD: agentledger
|
|
167
|
+
POSTGRES_DB: agentledger
|
|
168
|
+
ports:
|
|
169
|
+
- 5432:5432
|
|
170
|
+
options: >-
|
|
171
|
+
--health-cmd "pg_isready -U agentledger -d agentledger"
|
|
172
|
+
--health-interval 5s
|
|
173
|
+
--health-timeout 5s
|
|
174
|
+
--health-retries 20
|
|
175
|
+
|
|
176
|
+
steps:
|
|
177
|
+
- name: Checkout
|
|
178
|
+
uses: actions/checkout@v4
|
|
179
|
+
|
|
180
|
+
- name: Set up Python
|
|
181
|
+
uses: actions/setup-python@v5
|
|
182
|
+
with:
|
|
183
|
+
python-version: "3.12"
|
|
184
|
+
|
|
185
|
+
- name: Install Postgres optional dependency
|
|
186
|
+
run: python -m pip install ".[postgres]"
|
|
187
|
+
|
|
188
|
+
- name: Run real Postgres conformance
|
|
189
|
+
env:
|
|
190
|
+
AGENTLEDGER_RUN_POSTGRES_INTEGRATION: "1"
|
|
191
|
+
AGENTLEDGER_POSTGRES_DSN: postgresql://agentledger:agentledger@127.0.0.1:5432/agentledger
|
|
192
|
+
AGENTLEDGER_POSTGRES_SCHEMA: agentledger_ci
|
|
193
|
+
PYTHONDONTWRITEBYTECODE: "1"
|
|
194
|
+
PYTHONPATH: src
|
|
195
|
+
run: python -m unittest tests.test_postgres_integration -v
|
|
196
|
+
|
|
197
|
+
minio-integration:
|
|
198
|
+
name: MinIO integration
|
|
199
|
+
runs-on: ubuntu-latest
|
|
200
|
+
|
|
201
|
+
steps:
|
|
202
|
+
- name: Checkout
|
|
203
|
+
uses: actions/checkout@v4
|
|
204
|
+
|
|
205
|
+
- name: Set up Python
|
|
206
|
+
uses: actions/setup-python@v5
|
|
207
|
+
with:
|
|
208
|
+
python-version: "3.12"
|
|
209
|
+
|
|
210
|
+
- name: Install S3 optional dependency
|
|
211
|
+
run: python -m pip install ".[s3]"
|
|
212
|
+
|
|
213
|
+
- name: Start MinIO
|
|
214
|
+
run: |
|
|
215
|
+
docker run -d --name agentledger-minio \
|
|
216
|
+
-p 9000:9000 \
|
|
217
|
+
-e MINIO_ROOT_USER=agentledger \
|
|
218
|
+
-e MINIO_ROOT_PASSWORD=agentledger123 \
|
|
219
|
+
minio/minio:RELEASE.2025-04-22T22-12-26Z server /data
|
|
220
|
+
python - <<'PY'
|
|
221
|
+
import time
|
|
222
|
+
import urllib.request
|
|
223
|
+
|
|
224
|
+
for _ in range(60):
|
|
225
|
+
try:
|
|
226
|
+
urllib.request.urlopen("http://127.0.0.1:9000/minio/health/ready", timeout=2).read()
|
|
227
|
+
break
|
|
228
|
+
except Exception:
|
|
229
|
+
time.sleep(1)
|
|
230
|
+
else:
|
|
231
|
+
raise SystemExit("MinIO did not become ready")
|
|
232
|
+
PY
|
|
233
|
+
|
|
234
|
+
- name: Create bucket
|
|
235
|
+
env:
|
|
236
|
+
AWS_ACCESS_KEY_ID: agentledger
|
|
237
|
+
AWS_SECRET_ACCESS_KEY: agentledger123
|
|
238
|
+
AWS_DEFAULT_REGION: us-east-1
|
|
239
|
+
run: |
|
|
240
|
+
python - <<'PY'
|
|
241
|
+
import boto3
|
|
242
|
+
|
|
243
|
+
client = boto3.client(
|
|
244
|
+
"s3",
|
|
245
|
+
endpoint_url="http://127.0.0.1:9000",
|
|
246
|
+
region_name="us-east-1",
|
|
247
|
+
aws_access_key_id="agentledger",
|
|
248
|
+
aws_secret_access_key="agentledger123",
|
|
249
|
+
)
|
|
250
|
+
client.create_bucket(Bucket="agentledger-runs")
|
|
251
|
+
PY
|
|
252
|
+
|
|
253
|
+
- name: Run real MinIO conformance
|
|
254
|
+
env:
|
|
255
|
+
AGENTLEDGER_RUN_S3_INTEGRATION: "1"
|
|
256
|
+
AGENTLEDGER_S3_BUCKET: agentledger-runs
|
|
257
|
+
AGENTLEDGER_S3_PREFIX: ci/blobs
|
|
258
|
+
AGENTLEDGER_S3_ENDPOINT_URL: http://127.0.0.1:9000
|
|
259
|
+
AGENTLEDGER_S3_REGION: us-east-1
|
|
260
|
+
AWS_ACCESS_KEY_ID: agentledger
|
|
261
|
+
AWS_SECRET_ACCESS_KEY: agentledger123
|
|
262
|
+
PYTHONDONTWRITEBYTECODE: "1"
|
|
263
|
+
PYTHONPATH: src
|
|
264
|
+
run: python -m unittest tests.test_s3_integration -v
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.agentledger/
|
|
2
|
+
*.db
|
|
3
|
+
*.sqlite
|
|
4
|
+
*.sqlite3
|
|
5
|
+
|
|
6
|
+
__pycache__/
|
|
7
|
+
**/__pycache__/
|
|
8
|
+
*.py[cod]
|
|
9
|
+
*.pyo
|
|
10
|
+
*.pyd
|
|
11
|
+
$py.class
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.mypy_cache/
|
|
14
|
+
.ruff_cache/
|
|
15
|
+
.coverage
|
|
16
|
+
coverage.xml
|
|
17
|
+
dist/
|
|
18
|
+
build/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.venv/
|
|
21
|
+
venv/
|
|
22
|
+
.env
|
|
23
|
+
.DS_Store
|
|
24
|
+
**/.DS_Store
|
|
25
|
+
|
|
26
|
+
# Local notes, research dumps, and generated reports that should not ship.
|
|
27
|
+
AI_Agent_Runtime_开源项目构想.md
|
|
28
|
+
*.pdf
|
|
29
|
+
*.docx
|
|
30
|
+
*.pptx
|
|
31
|
+
*.pages
|
|
32
|
+
*.key
|
|
33
|
+
evidence/
|
|
34
|
+
evidence*.html
|
|
35
|
+
time-travel*.html
|
|
36
|
+
|
|
37
|
+
# Local external installer/download artifacts.
|
|
38
|
+
rce
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to AgentLedger will be documented in this file.
|
|
4
|
+
|
|
5
|
+
This project follows semantic versioning for the stable runtime-core contract. Optional adapters can still carry preview or experimental status.
|
|
6
|
+
|
|
7
|
+
## Unreleased
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Removed public `eval` CLI aliases in favor of `evidence-check`, `evidence-regression`, and `corpus check`, keeping full eval systems outside runtime-core.
|
|
12
|
+
- Clarified the v1.0 roadmap section as implemented for Python runtime-core, with media/stream contracts still marked preview.
|
|
13
|
+
- Changed the PyPI distribution name to `agentledger-runtime` while keeping the import package and CLI as `agentledger`.
|
|
14
|
+
|
|
15
|
+
## 1.0.0
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Maturity model and release-readiness documentation.
|
|
20
|
+
- Roadmap scope map for stable runtime-core, optional adapters, and external evidence consumers.
|
|
21
|
+
- Architecture overview for runtime layers, core modules, invariants, and adapter boundaries.
|
|
22
|
+
- Experimental psycopg-backed Postgres StateStore path with env/CLI configuration, schema isolation, JSONB handling, connection-injection conformance, and opt-in real-service smoke test.
|
|
23
|
+
- Experimental S3/MinIO BlobStore adapter with optional boto3 loading, env/CLI configuration, injected-client support, BlobStore conformance coverage, and opt-in real-service smoke test.
|
|
24
|
+
- Store-level artifact creation to remove SQLite connection leakage from `AgentContext`.
|
|
25
|
+
- Language-neutral runtime contract fixture for future Rust, TypeScript, and Go implementations.
|
|
26
|
+
- Storage migration baseline with SQLite `schema_migrations`, Postgres migration status/apply, and DDL export.
|
|
27
|
+
- Kubernetes/gVisor sandbox dry-run and `kubectl`-gated execution path.
|
|
28
|
+
- Evidence regression CLI for golden-vs-current evidence gates across final state, event types, Tool Ledger statuses, and cost deltas.
|
|
29
|
+
- Runtime boundary lint CLI for common direct shell, HTTP, SDK, cloud, and model calls that bypass `ctx.call_tool`.
|
|
30
|
+
- Dependency-free OTLP JSON trace exporter, CLI `trace --format otlp`, and optional OTLP/JSON collector POST.
|
|
31
|
+
- Failure injection suite and CLI for local crash, retry, lease fencing, and cancellation probes.
|
|
32
|
+
- Runnable dependency-free LangChain, LangGraph, CrewAI, AutoGen, OpenAI Agents SDK, LlamaIndex, Semantic Kernel, MCP-style tool/context, tool catalog, and sandbox command examples.
|
|
33
|
+
- Roadmap entries for media artifact and event stream runtime support.
|
|
34
|
+
- LangGraph-compatible dependency-free checkpointer facade with `put`, `get`, `get_tuple`, `list`, and `put_writes`.
|
|
35
|
+
- Versioning/compatibility policy and adapter certification checklist.
|
|
36
|
+
- Golden evidence corpus and `agentledger corpus add/list/check` repro harness.
|
|
37
|
+
- Dependency-free LangChain, CrewAI, AutoGen, OpenAI Agents SDK, LlamaIndex, and Semantic Kernel method facades.
|
|
38
|
+
- Read-only backup readiness checker and CLI `agentledger backup check <run_id>`.
|
|
39
|
+
- Tool schema/catalog DX with dependency-free schema subset validation and `agentledger tools manifest`.
|
|
40
|
+
- Static time-travel HTML debug export via `agentledger timetravel --html` and `agentledger debug --html`.
|
|
41
|
+
- Framework adapter conformance runner and CLI fixtures for dependency-free adapter certification smoke.
|
|
42
|
+
- Tool catalog example showing `Runtime.tool(...)`, schema validation, AgentLedger manifest export, and OpenAI-compatible tool descriptors.
|
|
43
|
+
- Read-only cost attribution report and CLI `agentledger cost report <run_id>`.
|
|
44
|
+
- Read-only failure attribution report and CLI `agentledger failure report <run_id>`.
|
|
45
|
+
- Replay/rerun divergence report and CLI `agentledger divergence`.
|
|
46
|
+
- Adversarial review checklist and release gate CLI `agentledger review checklist`.
|
|
47
|
+
- Static evidence HTML report via `agentledger evidence --html`.
|
|
48
|
+
- Dependency-free MCP tool/context server fixtures and `MCPContextAdapter`.
|
|
49
|
+
- CI real-service conformance jobs for Postgres and MinIO optional adapters.
|
|
50
|
+
- Built-in golden corpus seed fixture via `agentledger corpus seed minimal-success`.
|
|
51
|
+
- Preview media and event-stream artifact contracts with `MediaArtifact`, `MediaMetadata`, `ArtifactLineage`, `StreamChunkRef`, `EventStreamCheckpoint`, context helpers, evidence counts, language-neutral contract entries, and a dependency-free example.
|
|
52
|
+
- Media/stream tool schema conventions for `audio.transcribe`, `video.extract_frames`, `frame.describe`, `video.summarize`, `stream.consume`, and `stream.emit`, including CLI manifest export.
|
|
53
|
+
- Evidence bundle media/stream indexes and replay artifact validation/counts for archived media manifests and stream checkpoints.
|
|
54
|
+
- Runtime-managed media tool example showing `video.extract_frames` through ToolGateway, Tool Ledger, media artifact creation, and evidence export.
|
|
55
|
+
- Adversarial review checks for media artifact refs and stream checkpoint offsets.
|
|
56
|
+
- Evidence diff and divergence dimensions for media artifacts and stream checkpoints.
|
|
57
|
+
- Evidence regression gates for media artifact refs and stream checkpoint changes, with CLI allow flags.
|
|
58
|
+
- Backup readiness checks for media/stream evidence shape and nested `blob://` refs inside artifact metadata.
|
|
59
|
+
- Retention planning now reports media artifact counts, stream checkpoint counts, and protected nested blob refs before any future compaction.
|
|
60
|
+
- Trace export now includes media artifact and stream checkpoint spans in addition to event spans.
|
|
61
|
+
- Media runtime conformance runner covering media evidence, replay, evidence regression, review, trace, and Tool Ledger chains.
|
|
62
|
+
- Transient retry worker demo documentation for `worker-run` and `worker serve`.
|
|
63
|
+
- Docs tool catalog fixture documentation for `agentledger tools manifest --example examples/docs`.
|
|
64
|
+
- Release checklist documentation covering local gates, example smoke, optional service-backed checks, evidence gates, and release-note requirements.
|
|
65
|
+
- Formal documentation index, detailed usage guide, detailed design/implementation guide, Chinese documentation entrypoints, and SVG runtime architecture diagram.
|
|
66
|
+
- CLI parser smoke coverage for documented commands, including nested commands and global `--policy` usage.
|
|
67
|
+
- Packaging metadata coverage for the `agentledger` console script, supported Python versions, README metadata, and optional dependency groups.
|
|
68
|
+
- Media/stream adapter boundary and certification guidance for durable refs, lineage, checkpoints, replay, and evidence export.
|
|
69
|
+
|
|
70
|
+
### Changed
|
|
71
|
+
|
|
72
|
+
- CI now compiles examples, runs ResourceWarning-sensitive tests, executes root conformance, checks media tool manifests, and smokes media/worker examples.
|
|
73
|
+
- README and CONTRIBUTING release checks now point to the shared release checklist and include ResourceWarning, conformance, lint, and contract gates.
|
|
74
|
+
- Python package classifiers now include Python 3.12, Python 3 only, OS independence, and Python library metadata.
|
|
75
|
+
|
|
76
|
+
### Fixed
|
|
77
|
+
|
|
78
|
+
- Postgres injected connection ownership is now explicit, preventing shared test connections from being closed too early while still closing runtime-owned connections.
|
|
79
|
+
- Migration CLI paths now close SQLite/Postgres stores deterministically after status/apply operations.
|
|
80
|
+
- Warning-sensitive test runs no longer emit unclosed sqlite database ResourceWarnings.
|
|
81
|
+
|
|
82
|
+
## 0.2.0-alpha
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
|
|
86
|
+
- Python reference runtime.
|
|
87
|
+
- Local SQLite WAL StateStore.
|
|
88
|
+
- Local file BlobStore.
|
|
89
|
+
- AgentContext, Runtime, ToolRegistry, and ToolGateway.
|
|
90
|
+
- Tool Ledger for managed side effects and idempotency.
|
|
91
|
+
- Event-level replay summary.
|
|
92
|
+
- Evidence bundle export.
|
|
93
|
+
- Evidence diff, evidence check report, and trace JSONL exporter.
|
|
94
|
+
- Cost and budget records.
|
|
95
|
+
- Approval request/approve/deny flow.
|
|
96
|
+
- Policy YAML/JSON loader.
|
|
97
|
+
- Local scheduler with heartbeat, lease recovery, cancellation, and retry policy.
|
|
98
|
+
- Local worker loop.
|
|
99
|
+
- Sandbox executor contract with local, disabled, bubblewrap, Docker, Kubernetes, E2B, Firecracker, and custom adapter slots.
|
|
100
|
+
- Simple API: `agent`, `run`, `arun`.
|
|
101
|
+
- LangGraph and MCP dependency-free adapter skeletons.
|
|
102
|
+
- Postgres DDL skeleton and optional dependency boundary.
|
|
103
|
+
- StateStore conformance runner.
|
|
104
|
+
|
|
105
|
+
### Known Limitations
|
|
106
|
+
|
|
107
|
+
- Postgres and S3/MinIO adapters are experimental and not production-hardened.
|
|
108
|
+
- Distributed worker deployment is not complete.
|
|
109
|
+
- OTLP collector transport is dependency-free and experimental.
|
|
110
|
+
- Exact optional framework packages are not implemented.
|
|
111
|
+
- Rust, TypeScript, and Go implementations are not started.
|
|
112
|
+
- Production sandbox hardening requires external deployment policy.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
AgentLedger is an open-source engineering project. Contributors, maintainers, and users are expected to keep discussions technical, respectful, and constructive.
|
|
4
|
+
|
|
5
|
+
## Expected behavior
|
|
6
|
+
|
|
7
|
+
- Be respectful when reviewing designs, code, issues, and release decisions.
|
|
8
|
+
- Prefer concrete evidence, reproducible examples, and clear trade-offs.
|
|
9
|
+
- Assume good intent, but make risks and failure modes explicit.
|
|
10
|
+
- Keep security-sensitive reports out of public issues until maintainers have reviewed them.
|
|
11
|
+
- Respect the project scope: durable execution, reliability, governance, replay, and adapter contracts for AI agent runtimes.
|
|
12
|
+
|
|
13
|
+
## Unacceptable behavior
|
|
14
|
+
|
|
15
|
+
- Harassment, personal attacks, or discriminatory language.
|
|
16
|
+
- Publishing private information, credentials, exploit details, or sensitive logs without permission.
|
|
17
|
+
- Repeatedly derailing issues or pull requests away from their technical purpose.
|
|
18
|
+
- Pressuring maintainers to bypass release, security, or compatibility checks.
|
|
19
|
+
|
|
20
|
+
## Enforcement
|
|
21
|
+
|
|
22
|
+
Maintainers may edit or remove comments, close issues, reject contributions, or restrict participation when behavior harms the project. Security concerns should be reported through `SECURITY.md`.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Contributing to AgentLedger
|
|
2
|
+
|
|
3
|
+
AgentLedger is intentionally framework-agnostic. Contributions should preserve the runtime boundary: agent business logic runs through `AgentContext`, while durable state, tool calls, policy, audit, and replay remain runtime-managed.
|
|
4
|
+
|
|
5
|
+
## Local Development
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
PYTHONPYCACHEPREFIX=/tmp/agentledger-pycache PYTHONPATH=src python3 -m compileall -q src tests examples
|
|
9
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python3 -m unittest discover -s tests -q
|
|
10
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python3 -m agentledger --root /tmp/agentledger-dev-check conformance
|
|
11
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python3 -m agentledger lint boundary examples src --exclude src/agentledger --no-fail
|
|
12
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python3 -m agentledger contract export > /tmp/agentledger-contract.json
|
|
13
|
+
python3 -m json.tool /tmp/agentledger-contract.json >/dev/null
|
|
14
|
+
diff -u contracts/agentledger.runtime.v0.json /tmp/agentledger-contract.json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Contribution Principles
|
|
18
|
+
|
|
19
|
+
- Keep core dependencies minimal; put framework integrations behind adapters.
|
|
20
|
+
- Treat tool side effects as managed operations with idempotency and audit records.
|
|
21
|
+
- Prefer explicit state transitions over hidden mutable state.
|
|
22
|
+
- Add tests for failure paths, not only happy paths.
|
|
23
|
+
- Do not make replay or shadow mode perform real external side effects.
|
|
24
|
+
- Keep Python as the reference implementation, not the protocol boundary.
|
|
25
|
+
- Keep Rust, TypeScript, and Go work aligned with `contracts/agentledger.runtime.v0.json`.
|
|
26
|
+
|
|
27
|
+
## Required Checks
|
|
28
|
+
|
|
29
|
+
Before opening a pull request, run:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
PYTHONPYCACHEPREFIX=/tmp/agentledger-pycache PYTHONPATH=src python3 -m compileall -q src tests examples
|
|
33
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python3 -m unittest discover -s tests -q
|
|
34
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src PYTHONTRACEMALLOC=10 python3 -W default::ResourceWarning -m unittest discover -s tests -q
|
|
35
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python3 -m agentledger --root /tmp/agentledger-pr-check conformance >/tmp/agentledger-conformance.json
|
|
36
|
+
python3 -m json.tool /tmp/agentledger-conformance.json >/dev/null
|
|
37
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python3 -m agentledger lint boundary examples src --exclude src/agentledger --no-fail >/tmp/agentledger-boundary-lint.json
|
|
38
|
+
python3 -m json.tool /tmp/agentledger-boundary-lint.json >/dev/null
|
|
39
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python3 -m agentledger contract export > /tmp/agentledger-contract.json
|
|
40
|
+
python3 -m json.tool /tmp/agentledger-contract.json >/dev/null
|
|
41
|
+
diff -u contracts/agentledger.runtime.v0.json /tmp/agentledger-contract.json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The full release gate is documented in `docs/RELEASE_CHECKLIST.md`.
|
|
45
|
+
|
|
46
|
+
If you change runtime events, wire objects, or invariants, update both `src/agentledger/contract.py` and `contracts/agentledger.runtime.v0.json`.
|
|
47
|
+
|
|
48
|
+
If you change examples, tool catalogs, media/stream contracts, worker loops, or CLI docs, also run the relevant example smoke commands in `docs/RELEASE_CHECKLIST.md`.
|
|
49
|
+
|
|
50
|
+
Do not add destructive database cleanup commands to the required check path. Adapter tests should use temporary data or explicitly configured test services only.
|
|
51
|
+
|
|
52
|
+
Optional Postgres adapter changes should also run the real-service smoke test when credentials are available:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
AGENTLEDGER_RUN_POSTGRES_INTEGRATION=1 AGENTLEDGER_POSTGRES_DSN=<dsn> PYTHONPATH=src python3 -m unittest tests.test_postgres_integration -v
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Optional S3/MinIO adapter changes should also run the real-service smoke test when credentials are available:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
AGENTLEDGER_RUN_S3_INTEGRATION=1 AGENTLEDGER_S3_BUCKET=<bucket> PYTHONPATH=src python3 -m unittest tests.test_s3_integration -v
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
If you change storage schema, update:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
src/agentledger/storage_schema.py
|
|
68
|
+
migrations/sqlite/
|
|
69
|
+
migrations/postgres/
|
|
70
|
+
docs/STORAGE.md
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Compatibility Expectations
|
|
74
|
+
|
|
75
|
+
Adapters and multi-language implementations should preserve:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
event ordering
|
|
79
|
+
lease/fencing checks
|
|
80
|
+
state version checks
|
|
81
|
+
Tool Ledger idempotency
|
|
82
|
+
approval-before-execution
|
|
83
|
+
sandbox fail-closed behavior
|
|
84
|
+
replay/shadow side-effect blocking
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Roadmap Fit
|
|
88
|
+
|
|
89
|
+
Good first contribution areas:
|
|
90
|
+
|
|
91
|
+
- storage adapters behind the existing store boundary
|
|
92
|
+
- framework adapters for LangGraph, AutoGen, CrewAI, LlamaIndex, Semantic Kernel, OpenAI Agents SDK, and MCP
|
|
93
|
+
- richer policy engines and approval workflows
|
|
94
|
+
- replay/evidence bundle export
|
|
95
|
+
- observability exporters
|
|
96
|
+
- TypeScript worker/client targeting the runtime contract
|
|
97
|
+
- Rust runtime primitive or worker experiments
|
|
98
|
+
- Go infrastructure worker/client experiments
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
10
|
+
|
|
11
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
12
|
+
|
|
13
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
14
|
+
|
|
15
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
16
|
+
|
|
17
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
18
|
+
|
|
19
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
20
|
+
|
|
21
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.
|
|
22
|
+
|
|
23
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on or derived from the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link or bind by name to the interfaces of, the Work and Derivative Works thereof.
|
|
24
|
+
|
|
25
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
26
|
+
|
|
27
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
28
|
+
|
|
29
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
30
|
+
|
|
31
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work. If You institute patent litigation against any entity alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
32
|
+
|
|
33
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
34
|
+
|
|
35
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
36
|
+
|
|
37
|
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
38
|
+
|
|
39
|
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding notices that do not pertain to any part of the Derivative Works; and
|
|
40
|
+
|
|
41
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within that NOTICE file, excluding notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
42
|
+
|
|
43
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
+
|
|
45
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
+
|
|
47
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
+
|
|
49
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
+
|
|
51
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort, contract, or otherwise, unless required by applicable law or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages arising as a result of this License or out of the use or inability to use the Work, even if a Contributor has been advised of the possibility of such damages.
|
|
52
|
+
|
|
53
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
+
|
|
55
|
+
END OF TERMS AND CONDITIONS
|