Skip to content

Commit 851da97

Browse files
committed
feat: Implement TEC Agent Orchestration with FastAPI
- Added orchestration module with a local agent service exposing an HTTP API for ChatGPT Actions. - Implemented search and plan endpoints with provenance logging. - Created OpenAPI specification for integration. - Added environment configuration example and requirements for dependencies. - Introduced cleanup and optimization scripts for repository maintenance. - Documented repository overhaul plan and quickstart guide for orchestration.
1 parent 129c0de commit 851da97

17 files changed

+474
-1
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 2
9+
trim_trailing_whitespace = true
10+
11+
[*.py]
12+
indent_size = 4
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@
2121
*.jpg filter=lfs diff=lfs merge=lfs -text
2222
*.jpeg filter=lfs diff=lfs merge=lfs -text
2323
*.gif filter=lfs diff=lfs merge=lfs -text
24+
* text=auto eol=lf

.gitignore

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,24 @@ coverage/
6767

6868
# Temporary files
6969
tmp/
70-
temp/
70+
temp/
71+
72+
# Python virtualenvs and caches
73+
.venv/
74+
venv/
75+
__pycache__/
76+
.pytest_cache/
77+
.mypy_cache/
78+
.ipynb_checkpoints/
79+
80+
# Local data/artifacts (not for Git)
81+
datastore/
82+
artifacts/
83+
84+
# Drive sync noise
85+
.tmp.driveupload/
86+
87+
# Generic backups
88+
*.bak
89+
*.tmp
90+
*.orig

SESSION_HANDOFF_CHAT_ARCHIVE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Session Handoff: TEC Horror Masterclass + Agent Build
2+
3+
Scope: Consolidated insights and actions from the recent chat for archival and cross-agent handoff.
4+
5+
Highlights
6+
7+
- Added multi-agent guide for Copilot (docs/guides/TEC_Multi_Agent_Creative_System.md)
8+
- Created anthology scaffold (docs/anthology/TEC_Strangeletters_of_Madness.md)
9+
- Built Agent Bridge (orchestration/) with /search and /plan + OpenAPI for ChatGPT Actions
10+
- Repository hygiene hardened (.gitignore, .gitattributes update, .editorconfig)
11+
- Overhaul plan and Drive sync guidance (docs/REPO_OVERHAUL_PLAN.md)
12+
13+
Next suggested steps
14+
15+
- Install and run Agent Bridge; link to ChatGPT via Actions
16+
- Run tools/optimization/repo_scan.py and open cleanup issues for anything unexpected
17+
- Add CI linting and pre-commit; seed style kit under /style
18+
19+
Provenance
20+
21+
- Branch: main (time of archive)
22+
- Date: see commit timestamps in Git log
Binary file not shown.
Binary file not shown.

docs/REPO_OVERHAUL_PLAN.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# TEC_NWO Repository Overhaul Plan
2+
3+
Goals
4+
5+
- One name, one system, clean structure; Drive + Git remain cohesive
6+
- Remove random cruft; normalize line endings; pin toolchains
7+
- Preserve history; add provenance/axiom anchors to canonical docs
8+
9+
Phases
10+
11+
1. Inventory & surface anomalies
12+
13+
- Run scan script to list large/binary/orphan files and dot-folders
14+
- Map duplicates between Drive sync and repo
15+
16+
1. Normalize & prune
17+
18+
- Enforce .gitattributes (LFS + text=auto) and .editorconfig
19+
- Move stray media into assets/; purge temp/upload caches
20+
21+
1. Canonicalize docs
22+
23+
- Ensure docs cite Axioms and include provenance (commit hash)
24+
- Route anthology/lore to docs/anthology and lore/
25+
26+
1. Wire automation
27+
28+
- Add CI lints (md/lint/size), optional pre-commit
29+
- Add artifacts/ to .gitignore; keep sources under assets/
30+
31+
Drive sync guidance
32+
33+
- Keep the single source of truth in this repo; Google Drive mirrors under G:\\My Drive\\TEC_NWO\\TEC-HORRORMASTERCLASS
34+
- Avoid editing the same binary in both places; prefer pushing from repo → Drive export
35+
- For big media, keep in LFS paths and reference via manifests
36+
37+
Runbook
38+
39+
- See tools/optimization/repo_scan.py to list candidates for cleanup
40+
- Open issues for deletions/moves; commit with “move: …” or “chore: cleanup”
41+
42+
Next
43+
44+
- Add CI and pre-commit hooks
45+
- Migrate any remaining notebooks under notebooks/

orchestration/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
DATACORE_URL=http://127.0.0.1:8765/search
2+
PORT=8787

orchestration/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# TEC Agent Orchestration (Local)
2+
3+
This folder hosts a minimal local agent service that:
4+
5+
- exposes a small HTTP API (OpenAPI) for ChatGPT “Actions” / tools
6+
- bridges to your local MCP Datacore (datacore_search)
7+
- logs runs and emits provenance for artifacts
8+
9+
## Components
10+
11+
- server.py — FastAPI service exposing /search, /plan, /run
12+
- openapi.yaml — machine-readable API for ChatGPT Actions integration
13+
- provenance.py — helper for per-call provenance.json
14+
- requirements.txt — pinned deps
15+
16+
## Quickstart
17+
18+
1. Create venv and install deps
19+
20+
```powershell
21+
python -m venv .venv
22+
. .\.venv\Scripts\Activate.ps1
23+
pip install -r orchestration/requirements.txt
24+
```
25+
26+
1. Configure environment
27+
28+
```powershell
29+
$env:DATACORE_URL = "http://127.0.0.1:8765/search"
30+
$env:PORT = "8787"
31+
```
32+
33+
1. Run locally
34+
35+
```powershell
36+
python -m orchestration.server
37+
```
38+
39+
1. Connect from ChatGPT (Actions)
40+
41+
- In ChatGPT, create a custom action and upload `orchestration/openapi.yaml`.
42+
- Set the base URL to `http://localhost:8787` (or your tunnel URL if remote).
43+
44+
## Notes
45+
46+
- This is a minimal bridge; expand with more tools as you wire agents.
47+
- Keep secrets out of the spec. Use environment variables only.

orchestration/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)