Commit graph

274 commits

Author SHA1 Message Date
twentyOne2x
cb702fadf0 Merge remote-tracking branch 'origin/main' into codex/phase1b-pr20-resolve-20260625
# Conflicts:
#	telegram/agent_config.py
#	telegram/bot.py
#	telegram/http_chat_proxy.py
#	tests/test_telegram_leo_x402_bridge.py
2026-06-25 18:07:36 +02:00
twentyOne2x
1a71efcde2
Add Teleo research eval schema
Adds graph schema prerequisite plus research-eval schema/docs/tests for Leo tool-use benchmarks and x402 research telemetry. Validated by full local pytest and green CI.
2026-06-24 14:21:03 +02:00
twentyOne2x
533295d38c
Gate Telegram market context for Leo research (#18) 2026-06-23 19:16:24 +02:00
twentyOne2x
bfc28e084b
Wire Leo Telegram x402 smart research (#17)
* Wire Leo Telegram x402 smart research

* Suppress token-bearing Telegram HTTP logs

* Keep Telegram typing visible during Leo proxy calls

* Allow Leo Telegram social research spend cap

* Route contextual Leo research prompts to smart research

* Generalize Leo smart research intent routing

* Resume Leo smart research from paid work orders
2026-06-23 18:37:33 +02:00
twentyOne2x
30544dce05
Route Telegram smart research commands (#16) 2026-06-23 11:56:06 +02:00
twentyOne2x
d4f2530284
Merge pull request #15 from living-ip/codex/leo-wallet-test-existing-token-20260622
Use existing Leo wallet-test Telegram bot
2026-06-23 11:18:19 +02:00
twentyOne2x
b593dda1cf Use existing Leo wallet-test Telegram bot 2026-06-22 21:53:37 +02:00
twentyOne2x
754f5aeee7
Add Leo wallet-test Telegram runtime verifier (#14) 2026-06-22 21:41:17 +02:00
twentyOne2x
595f977a94
Add Telegram smart research gate installer (#13) 2026-06-22 21:33:56 +02:00
twentyOne2x
dba8a21e74
Allow per-agent Telegram env files (#12) 2026-06-22 21:27:32 +02:00
twentyOne2x
d0a4f518d5
Add Leo Telegram smart research bridge (#11) 2026-06-22 21:24:00 +02:00
twentyOne2x
2433ed2d8a
Merge pull request #10 from living-ip/codex/leo-wallet-test-token-installer-20260622
Add safe Telegram agent token installer
2026-06-22 20:49:06 +02:00
twentyOne2x
84e1269900 Add safe Telegram agent token installer 2026-06-22 20:47:44 +02:00
twentyOne2x
988e8581d6
Merge pull request #9 from living-ip/codex/teleo-ci-pyyaml-20260622
Declare PyYAML dependency for CI
2026-06-22 20:34:16 +02:00
twentyOne2x
9c29322972 Fix optional Telegram approval imports in tests 2026-06-22 20:33:02 +02:00
twentyOne2x
e4c0621538 Declare PyYAML dependency for CI 2026-06-22 20:31:39 +02:00
twentyOne2x
e1f2834c23
Merge pull request #8 from living-ip/codex/leo-wallet-test-telegram-20260622
Add Leo wallet-test Telegram agent config
2026-06-22 20:30:25 +02:00
twentyOne2x
adbdf4dbba Add Leo wallet test Telegram agent config 2026-06-22 20:29:52 +02:00
twentyOne2x
50b4d2345b
Merge pull request #7 from living-ip/leo-test-readiness-ancestor-check
Stabilize leo-test readiness main check
2026-06-20 15:51:24 +02:00
twentyOne2x
3c20f08d8d Stabilize leo-test readiness main check 2026-06-20 15:50:55 +02:00
twentyOne2x
513960651d
Merge pull request #6 from living-ip/leo-test-deploy-readiness-check
Add Leo test deploy readiness check
2026-06-20 15:48:59 +02:00
twentyOne2x
fa2895c45b Add Leo test deploy readiness check 2026-06-20 13:03:10 +02:00
twentyOne2x
4cc6a5d06e
Merge pull request #5 from living-ip/leo-disposable-test-agent
Add disposable Leo Telegram test agent
2026-06-20 01:48:53 +02:00
twentyOne2x
a84289a9fc
Merge pull request #4 from living-ip/leo-auto-deploy-restart-scope
Restart Leo agent after Telegram deploy changes
2026-06-20 01:48:40 +02:00
twentyOne2x
5c0222f0c4 Add disposable Leo Telegram test agent 2026-06-20 01:10:21 +02:00
twentyOne2x
1e62a94d3a Restart Leo agent after Telegram deploy changes 2026-06-20 01:03:54 +02:00
twentyOne2x
f3c63e2f8d Restart Leo agent after Telegram deploy changes 2026-06-19 23:39:23 +02:00
twentyOne2x
20f85f94dc
Merge pull request #3 from living-ip/leo-telegram-x402-bridge
Add Leo Telegram x402 bridge
2026-06-19 19:36:04 +02:00
twentyOne2x
b769eb68b6 Add Leo Telegram x402 bridge 2026-06-19 19:28:04 +02:00
twentyOne2x
2e7d4e7450 Add Leo Telegram x402 bridge 2026-06-19 19:27:12 +02:00
twentyOne2x
71ea7a625c Add decision engine replay harness
- Add source-linked model discovery registry for bakeoff candidates
- Add Rio, Theseus, and KB interop fixtures with deterministic replay proof
- Gate CI on replay output; verify with 424-test suite

`.crabbox.yaml`
`.github/workflows/ci.yml`
`docs/llm-refinement-decision-engine.md`
`docs/model-discovery-registry.md`
`fixtures/decision-engine-eval/kb_interop_propose_only.json`
`fixtures/decision-engine-eval/rio_meteora_lp_incentives.json`
`fixtures/decision-engine-eval/theseus_live_model_switch_reject.json`
`scripts/check_llm_refinement_contract.py`
`scripts/replay_decision_engine_eval.py`
`tests/test_decision_engine_replay.py`
2026-06-01 17:37:38 +02:00
twentyOne2x
27e48f3e16 Add KB interop from transcript
- Encode transcript requirements for model discovery and Pentagon boundary
- Add KB read/propose skill for Hermes, OpenClaw, and Claude-style agents
- Extend LLM contract checks; verify with 422-test suite

`.agents/skills/living-ip-kb-interop/SKILL.md`
`.agents/skills/nousresearch-hermes-agent/SKILL.md`
`.agents/skills/openclaw-agent/SKILL.md`
`docs/llm-refinement-decision-engine.md`
`scripts/check_llm_refinement_contract.py`
2026-06-01 17:16:46 +02:00
twentyOne2x
aee534e686 Add decision engine refinement contracts
- Define Rio and Theseus as economics and model-integrity evaluators
- Add DB, Hermes, and OpenClaw skills with no-secret defaults
- Gate CI on LLM refinement contracts; verify with 422-test suite

`.agents/skills/decision-engine-refinement/SKILL.md`
`.agents/skills/nousresearch-hermes-agent/SKILL.md`
`.agents/skills/openclaw-agent/SKILL.md`
`.agents/skills/teleo-db-operator/SKILL.md`
`.crabbox.yaml`
`.github/workflows/ci.yml`
`docs/llm-refinement-decision-engine.md`
`scripts/check_llm_refinement_contract.py`
2026-06-01 15:50:48 +02:00
twentyOne2x
a2620c1f19 Add Crabbox CI contract gate 2026-06-01 15:36:03 +02:00
twentyOne2x
69b4987415 Add Crabbox remote proof layer 2026-05-30 01:53:10 +02:00
twentyOne2x
59951346b2 Prove phase 1b local e2e 2026-05-29 15:08:09 +02:00
twentyOne2x
cdb0b1498d Add phase 1b local review guide 2026-05-29 14:17:28 +02:00
twentyOne2x
ca96f5f8e3 Harden local phase 1b review path 2026-05-29 14:16:12 +02:00
twentyOne2x
b9cb965591 Record phase 1b staging blocker 2026-05-29 14:01:21 +02:00
twentyOne2x
7390e1e843 Implement phase 1b agent routing 2026-05-29 14:00:13 +02:00
Fawaz
377924dabe
feat(phase1-step3): rewire critical scripts Forgejo -> GitHub (decision-engine)
Phase 1 Step 3 — migrate research-session.sh and pipeline-health-check.py off Forgejo onto GitHub living-ip/decision-engine. eval-dispatcher.sh / eval-worker.sh documented as dead code (replaced by daemon).
2026-05-22 21:43:08 -04:00
aaab659900 Merge pull request 'fix(activity-feed): emit Forgejo pr_url fallback so every event has a clickthrough' (#12) from fix/forgejo-pr-url-fallback into main
Some checks failed
CI / lint-and-test (push) Has been cancelled
Reviewed-on: #12
2026-05-13 04:40:38 +00:00
Teleo Agents
e78308862a fix(activity-feed): emit Forgejo pr_url fallback so every event has a clickthrough
Some checks failed
CI / lint-and-test (pull_request) Has been cancelled
Previously _github_pr_url() only returned a URL when prs.github_pr was
populated. That field is set on only 3 of 4094 merged PRs (the rare cases
mirrored to the public GitHub repo), so pr_url was null for ~100% of the
feed. The frontend whole-row PR overlay (livingip-web PR #30) renders
only when pr_url is non-null, so until now no rows had the overlay.

Pipeline-attributed events (reweave/*, ingestion/*) are the most visible
victim: their /contributors/pipeline link lands on a sparse stub, with
no way to reach the actual commit/PR they refer to.

Fix: rename _github_pr_url -> _pr_url and fall back to the canonical
Forgejo URL (git.livingip.xyz/teleo/teleo-codex/pulls/{number}) when no
GitHub mirror exists. Verified 200 OK against a sample (#10568). GitHub
URL still wins when available.

Result: 1972/1972 events in _build_events now carry a pr_url. Whole-row
overlay starts working for everything including pipeline events.
2026-05-13 04:29:54 +00:00
a54f52234a Merge pull request 'fix(attribution): classify submitted_by by branch prefix at PR discovery' (#11) from fix/reattribute-by-branch-prefix into main
Some checks are pending
CI / lint-and-test (push) Waiting to run
Reviewed-on: #11
2026-05-13 03:57:04 +00:00
Teleo Agents
c9515c770a fix(attribution): classify submitted_by by branch prefix at PR discovery
Some checks failed
CI / lint-and-test (pull_request) Has been cancelled
reweave.py and ingestion run as the operator Forgejo token, so the prior
opener-based classifier set submitted_by=m3taversal for every system
maintenance PR. backfill_submitted_by.py never overrides non-NULL rows,
so this misattribution accumulated: ~2,748 reweave/ingestion PRs and
~3,706 <agent>/ research/entity PRs were credited to the operator on
the leaderboard and contribution_events table.

Two parts:

1. lib/merge.py: at PR discovery, classify by branch prefix first.
     reweave/, ingestion/             -> submitted_by = 'pipeline'
     <agent>/ (per _AGENT_NAMES)      -> submitted_by = '<agent>'
     otherwise human                  -> submitted_by = author.lower()
     otherwise pipeline               -> submitted_by = None
                                         (extract.py sets from proposed_by)
   Origin flag updated so domain detection and priority still fire for
   branch-classified pipeline PRs. Human PRs lowercased to maintain the
   canonical-handle contract enforced in PR #9.

2. scripts/reattribute-by-branch-prefix.py: historical cleanup.
   Per affected PR (atomic):
     - UPDATE prs.submitted_by  -> target
     - UPDATE sources.submitted_by where source_path matches
     - UPDATE contribution_events handle ('m3taversal',role='author')
       -> target, kind='agent'. Collision (target already has author
       event for PR) deletes the m3ta row; target wins.

   Scope is deliberately conservative: extract/ branches stay attributed
   to m3taversal because proposed_by-missing legitimately defaults to the
   operator (telegram drops). Only reweave/, ingestion/, and <agent>/.

   Dry-run shows 6,454 PRs + 284 events to move. Pre-flight collision
   query returns 0; pre-flight kind check confirms m3ta has only role=author
   events on this set (no challenger/synthesizer/evaluator).

   Idempotent. Dry-run by default. Run with --apply after deploy + DB
   snapshot.
2026-05-13 03:49:10 +00:00
3dca3aab5f Merge pull request 'docs: rewrite public README' (#8) from ship/readme-public-rewrite into main
Some checks are pending
CI / lint-and-test (push) Waiting to run
Reviewed-on: #8
2026-05-13 03:20:02 +00:00
2ee9dd5150 Merge pull request 'fix(activity-feed): canonicalize contributor handle so profile links resolve' (#9) from fix/activity-feed-canonical-handle into main
Some checks are pending
CI / lint-and-test (push) Waiting to run
Reviewed-on: #9
2026-05-13 03:19:41 +00:00
b29ec95dd8 Merge pull request 'fix(attribution): canonicalize submitted_by at write time + historical normalizer' (#10) from fix/canonicalize-submitted-by into main
Some checks are pending
CI / lint-and-test (push) Waiting to run
Reviewed-on: #10
2026-05-13 03:19:27 +00:00
Teleo Agents
74bf0461e8 fix(attribution): canonicalize submitted_by at write time + historical normalizer
Some checks failed
CI / lint-and-test (pull_request) Has been cancelled
Companion / write-side fix to fix/activity-feed-canonical-handle.

The activity-feed canonicalization was a read-side guard. The bug at the
source is that extract.py and two backfill scripts write decorated
strings (Vida (self-directed), pipeline (reweave), @m3taversal) into
prs.submitted_by and sources.submitted_by. Downstream readers
(lib.contributor.insert_contribution_event, scripts/scoring_digest,
diagnostics/activity_feed_api) all strip the decorator on read — but
anything that reads the column verbatim (like /api/activity-feed before
the read-side fix) 404s on /contributors/{decorated-handle}.

Stop writing the decorator. The self-directed signal is already carried
by intake_tier == research-task plus the prs.agent column; the suffix
is redundant string noise that costs us correctness at every consumer
that forgets to strip.

Changes:

- lib/extract.py:690 — write canonical handle via attribution.normalize_handle.
  Direct elif for intake_tier == research-task now stores just agent_name.
  @m3taversal -> m3taversal.

- diagnostics/backfill_submitted_by.py — same fix in two branches plus
  the reweave branch (pipeline (reweave) -> pipeline).

- scripts/backfill-research-session-attribution.py — UPDATE prs sets
  agent handle alone, no suffix. Docstring + log line updated.

- scripts/normalize-submitted-by.py (new) — one-time backfill that
  canonicalizes existing prs.submitted_by and sources.submitted_by rows.
  Strips trailing parenthetical decorators, lowercases, drops @. Defaults
  to dry-run; --apply to commit. Skips rows that would normalize to
  invalid handles (no garbage falls through silently).

Dry-run against live pipeline.db:
  prs:     3008 rows need normalization (clean mappings, 0 invalid)
  sources: 730 rows need normalization (clean mappings, 0 invalid)
  Total:   3738 rows. All map to existing handle column values.

After this lands + auto-deploys, the operator should run
  python3 scripts/normalize-submitted-by.py --apply
once to clean historical rows. The read-side canonicalization in
diagnostics/activity_feed_api.py (fix/activity-feed-canonical-handle)
becomes redundant defense-in-depth instead of load-bearing.

No KB writes.
2026-05-13 02:56:50 +00:00
Teleo Agents
01097da22c fix(activity-feed): canonicalize contributor handle so profile links resolve
Some checks failed
CI / lint-and-test (pull_request) Has been cancelled
The activity feed was returning decorated strings like "Vida (self-directed)"
and "@m3taversal" in the contributor field. The frontend uses that field as
both display label and routing handle, so /contributors/Vida%20(self-directed)
404s — Next fires notFound() in [handle]/page.tsx.

Root cause: _normalize_contributor only stripped @ and whitespace; it did not
lowercase or strip the " (self-directed)" suffix that extract.py and the
older backfill_submitted_by.py wrote into prs.submitted_by. Mixed-case
agent names (Vida vs vida) and pipeline decorators ("pipeline (reweave)")
both fell through.

Fix: lowercase + strip any trailing parenthetical decorator. Valid handles
match ^[a-z0-9][a-z0-9_-]{0,38}$ per attribution._HANDLE_RE and cannot
contain parens, so the strip is lossless.

DB simulation against 3612 merged-PR events: 0 orphan handles after
normalization (was 12 orphan label-variants before).

No KB writes — pure read-side normalization in the API layer.
2026-05-13 02:39:18 +00:00