Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
d766755
Add parser implementation
RadCod3 Feb 5, 2026
d9fb52f
Add validation to client auth
RadCod3 Feb 5, 2026
ecf2e60
Add agent runtime implementation
RadCod3 Feb 5, 2026
5aacd22
Add agent tests
RadCod3 Feb 5, 2026
90360be
Refactor schema validator and remove unused variables
RadCod3 Feb 5, 2026
59defb4
Add webchat interface support
RadCod3 Feb 5, 2026
00b598b
Add consolechat interface support
RadCod3 Feb 5, 2026
3c36657
Add webhook interface support
RadCod3 Feb 5, 2026
66e68b4
Add tests for interfaces
RadCod3 Feb 5, 2026
d2dfb1a
Add mcp tool support
RadCod3 Feb 5, 2026
3ae824f
Add mcp tests
RadCod3 Feb 5, 2026
2e7f1ad
Add cli script to run project
RadCod3 Feb 5, 2026
60a179e
Add cli invoke tests
RadCod3 Feb 5, 2026
bde8d3d
Suppress info logs from httpx and httpcore
RadCod3 Feb 6, 2026
ec503b5
Fix default webchat signature to align with spec
RadCod3 Feb 6, 2026
f50b493
Remove snapshot from default anthropic model
RadCod3 Feb 6, 2026
63ea9b0
Add webui for webchat interface
RadCod3 Feb 6, 2026
d6f0141
Fix test failure
RadCod3 Feb 6, 2026
1e6066a
Address review comments
RadCod3 Feb 6, 2026
68d6f48
Raise exception on secret resolution failure
RadCod3 Feb 6, 2026
40a99cc
Add exception chaining
RadCod3 Feb 6, 2026
a246dda
Escape chat path before substitution
RadCod3 Feb 6, 2026
0f9e51a
Use exact match for markdown sections
RadCod3 Feb 6, 2026
dd66b43
Fix anthropic model name
RadCod3 Feb 6, 2026
84d6d88
Raise OutputValidationError instead of AgentError
RadCod3 Feb 6, 2026
0850f68
Raise TemplateEvaluationError for invalid templates
RadCod3 Feb 6, 2026
903fcdf
Fix async lifecycle and blocking input issues
RadCod3 Feb 7, 2026
4b9bb03
Expose Agent signature via public property
RadCod3 Feb 7, 2026
5bc3d32
Prevent sensitive error details exposure in web chat
RadCod3 Feb 7, 2026
62eee56
Fix signature parsing for unknown algorithm prefixes
RadCod3 Feb 7, 2026
7f231ca
Add exception chaining and hide internal errors in webhook
RadCod3 Feb 7, 2026
bcccbad
Prevent hang when HTTP server fails to start
RadCod3 Feb 7, 2026
ec446e1
Check extra fields in JSON Schema for http vars
RadCod3 Feb 7, 2026
8d7e2eb
Improve console chat with proper TUI
RadCod3 Feb 7, 2026
afdfd2b
Remove incorrect type hint
RadCod3 Feb 7, 2026
a67f3ef
Raise JSONAccessError for empty field names in JSON paths
RadCod3 Feb 7, 2026
e4b3322
Fix fire-and-forget task for WebSub subscription
RadCod3 Feb 7, 2026
f56f157
Improve styling of TUI
RadCod3 Feb 7, 2026
c3a0a02
Merge branch 'feat/improve-tui' into feat/langchain-py
RadCod3 Feb 7, 2026
8397e0b
Upgrade dependencies
RadCod3 Feb 7, 2026
eaafb19
Fix websub subscription not working
RadCod3 Feb 7, 2026
75ef205
Remove the tool call fix that was needed before
RadCod3 Feb 7, 2026
d9bb051
Rename project to afm-cli for publishing
RadCod3 Feb 7, 2026
4072517
Remove unnecessary tests and update docstring
RadCod3 Feb 7, 2026
f98b050
Add readme and bump version
RadCod3 Feb 7, 2026
b4c991b
Add ci and docker workflow
RadCod3 Feb 8, 2026
8ae19f7
Fix dockerfile
RadCod3 Feb 8, 2026
c665eec
Remove verbose docstrings
RadCod3 Feb 8, 2026
7d9c568
Hide logs in consolechat and add log-file flag
RadCod3 Feb 8, 2026
302b37e
Refactor README and pyproject
RadCod3 Feb 8, 2026
e2a3603
Fix verification bypassing in webhook
RadCod3 Feb 8, 2026
ff42321
Address review comments
RadCod3 Feb 8, 2026
af61d42
Add missing import
RadCod3 Feb 9, 2026
97c9a27
Add review suggestions
RadCod3 Feb 9, 2026
d637d8a
Construct WebSub callback from CLI host/port
RadCod3 Feb 9, 2026
4c01440
Address code review comments
RadCod3 Feb 9, 2026
08ff44d
Pin uv version in dockerfile
RadCod3 Feb 9, 2026
87b6185
Address review comments on session history, WebSub etc.
RadCod3 Feb 9, 2026
d76f2e2
Update readme and workflows with langchain impl
RadCod3 Feb 9, 2026
22c23cb
Fix double-dot path handling in templates
RadCod3 Feb 9, 2026
6599d76
Remove pip and pipx instructions from README
RadCod3 Feb 9, 2026
e96b10c
Fix image vulnerabilities
RadCod3 Feb 9, 2026
3c03899
Remove deadcode and unnecessary docstrings
RadCod3 Feb 9, 2026
b493c19
Rename project to afm
RadCod3 Feb 9, 2026
e2000ce
Update langchain-interpreter/src/afm/__init__.py
RadCod3 Feb 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 216 additions & 0 deletions langchain-interpreter/.gitignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we remove irrelevant stuff?

Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py.cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
# Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
# poetry.lock
# poetry.toml

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
# pdm.lock
# pdm.toml
.pdm-python
.pdm-build/

# pixi
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
# pixi.lock
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
# in the .venv directory. It is recommended not to include this directory in version control.
.pixi

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# Redis
*.rdb
*.aof
*.pid

# RabbitMQ
mnesia/
rabbitmq/
rabbitmq-data/

# ActiveMQ
activemq-data/

# SageMath parsed files
*.sage.py

# Environments
.env
.envrc
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
# .idea/

# Abstra
# Abstra is an AI-powered process automation framework.
# Ignore directories containing user credentials, local state, and settings.
# Learn more at https://abstra.io/docs
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

# Marimo
marimo/_static/
marimo/_lsp/
__marimo__/

# Streamlit
.streamlit/secrets.toml
1 change: 1 addition & 0 deletions langchain-interpreter/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
Empty file.
44 changes: 44 additions & 0 deletions langchain-interpreter/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[project]
name = "langchain-interpreter"
version = "0.1.0"
description = "AFM (Agent-Flavored Markdown) interpreter using LangChain"
readme = "README.md"
authors = [
{ name = "Radith Samarakoon", email = "jjeli1234@gmail.com" }
]
requires-python = ">=3.11"
dependencies = [
"langchain>=1.2.8",
"pyyaml>=6.0",
"pydantic>=2.0",
"langchain-openai>=1.1.7",
"langchain-anthropic>=1.3.1",
"jsonschema>=4.26.0",
"fastapi>=0.128.1",
"httpx>=0.28.1",
"uvicorn>=0.40.0",
"mcp>=1.26.0",
"langchain-mcp-adapters>=0.2.1",
"click>=8.0.0",
]

[project.scripts]
afm = "langchain_interpreter.cli:main"

[build-system]
requires = ["uv_build>=0.9.28,<0.10.0"]
build-backend = "uv_build"

[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"

[dependency-groups]
dev = [
"ruff>=0.15.0",
"pytest>=8.0",
"pytest-cov>=7.0.0",
"pytest-asyncio>=1.3.0",
]
Loading