Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (63 loc) · 3.73 KB
/
Copy pathMakefile
File metadata and controls
76 lines (63 loc) · 3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.PHONY: test guard smoke install-smoke demo examples benchmark-score benchmark adapter-quality adapter-harness validate build clean
test:
python3 -m unittest discover -s tests -p 'test_*.py' -v
guard:
python3 tests/guard_public_refs.py
smoke:
TMP=$$(mktemp -d); \
python3 cli/akbp.py --path $$TMP/kb init; \
python3 cli/akbp.py --path $$TMP/kb source add AKBP.md --type file; \
python3 cli/akbp.py --path $$TMP/kb remember "AKBP smoke test claim" --evidence AKBP.md; \
python3 cli/akbp.py --path $$TMP/kb conformance --level 2; \
python3 cli/akbp.py --path $$TMP/kb index; \
python3 cli/akbp.py --path $$TMP/kb search smoke
install-smoke:
TMP=$$(mktemp -d); \
python3 -m pip install . --target $$TMP/pkg >/tmp/akbp-install-smoke.log; \
PYTHONPATH=$$TMP/pkg python3 -m akbp --path $$TMP/kb init; \
PYTHONPATH=$$TMP/pkg python3 -c "import akbp, akbp_tool_server; print('install ok')"; \
PATH=$$TMP/pkg/bin:$$PATH PYTHONPATH=$$TMP/pkg akbp --path $$TMP/kb-cli init; \
PATH=$$TMP/pkg/bin:$$PATH PYTHONPATH=$$TMP/pkg akbp --help >/dev/null; \
printf '%s\n' '{"id":"caps","method":"akbp.capabilities"}' '{"id":"bad","method":"akbp.search","params":{"query":"release","limit":0}}' | PYTHONPATH=$$TMP/pkg python3 -m akbp_tool_server | python3 -c "import json,sys; rows=[json.loads(line) for line in sys.stdin if line.strip()]; caps=rows[0]['result']; assert caps['features']['method_param_schemas']; assert caps['knowledge_capability']['kind'] == 'agent_knowledge_base'; assert caps['knowledge_capability']['trust_model'] == 'cited_review_gated_memory'; assert 'akbp.import_apply' in caps['methods']; assert rows[1]['error']['code'] == 'invalid_params'; assert 'limit must be between 1 and 100' in rows[1]['error']['details']['type_errors']; print('tool server module install ok')"; \
printf '%s\n' '{"id":"caps","method":"akbp.capabilities"}' | PATH=$$TMP/pkg/bin:$$PATH PYTHONPATH=$$TMP/pkg akbp-tool-server | python3 -c "import json,sys; row=json.loads(sys.stdin.readline()); caps=row['result']; assert caps['features']['method_param_schemas']; assert caps['knowledge_capability']['kind'] == 'agent_knowledge_base'; assert caps['knowledge_capability']['retrieval']['startup_method'] == 'akbp.session.start'; assert 'akbp.import_apply' in caps['methods']; print('tool server console install ok')"
demo:
./examples/quickstart-demo/run.sh
examples:
./examples/akbp-bench/run.sh
./examples/repo-memory-demo/run.sh
./examples/memory-ci/run.sh
./examples/adoption-preflight/run.sh
./examples/jsonl-quickstart/run.sh
./examples/tool-server-approval-flow/run.sh
./examples/tool-error-handling/run.sh
./examples/session-start-harness/run.sh
./examples/structured-output-harness/run.sh
./examples/adapter-lifecycle/run.sh
./examples/git-native-agent-handoff/run.sh
./examples/tool-protocol-bridge/run.sh
./examples/multi-agent-consistency-demo/run.sh
./examples/portable-bundle/run.sh
./examples/rich-context-artifact/run.sh
./examples/existing-memory-migration/run.sh
./examples/markdown-folder-intake/run.sh
./examples/source-intake/run.sh
./examples/project-understanding-bridge/run.sh
./examples/read-only-adapter/run.sh
./examples/inherited-repo-intake/run.sh
./examples/stdio-client-config/run.sh
./examples/context-compaction-recovery/run.sh
./examples/context-freshness-probe/run.sh
benchmark-score:
python3 benchmarks/run_benchmarks.py --score
benchmark:
python3 benchmarks/run_benchmarks.py --akbp
adapter-quality:
python3 benchmarks/run_benchmarks.py --profile adapter-quality --akbp
adapter-harness:
./examples/structured-output-harness/run.sh
python3 benchmarks/run_benchmarks.py --profile adapter-quality --akbp
validate: guard test smoke examples benchmark-score benchmark install-smoke
build:
python3 -m build
clean:
rm -rf build dist *.egg-info cli/*.egg-info