8000 feat(assistant): add tools, skills, hooks and plugins to the assistant by adeelahmad · Pull Request #81 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(assistant): add tools, skills, hooks and plugins to the assistant - #81

Merged
adeelahmad merged 4 commits into
mainfrom
claude/project-thread-t9tw9j
Oct 3, 2026
Merged

adeelahmad merged 4 commits into
mainfrom
claude/project-thread-t9tw9j

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: the assistant could only use its built-in tools.

After: people can add extensions to it. There are four kinds:

  • Tools: a prompt or a web request, with typed parameters. A tool marked change waits for an approval card.
  • Skills: instructions plus a line saying when to use them. The assistant reads a skill with use_skill only when it applies.
  • Hooks: on message, before_tool, after_tool or answer, a hook can add context, block a tool or call a tool.
  • Plugins: bundles of the three.

Each extension is versioned and shared private / namespace / everyone, the same way custom nodes are. You can write one as code (Markdown with frontmatter, YAML or JSON), export it again, check it without saving, and try it. ai.extensions turns all of them off. Nothing is on until someone creates one, so the assistant behaves as before.

How: app/domain/extensions.py holds the registry, manifests and runtime, and /api/v1/extensions is the API. The chat Toolbox offers the tools that are switched on, runs hooks around every tool call, and lists the skills in the system prompt. Approved extension tools run the exact version that was proposed. Web tools go through the same netguard as web capture, so they can reach public addresses only.

This is the first of five PRs. The others are code tools in a sandbox, canvas tool graphs, authoring from chat and voice, and an Extensions page. The plan is in DEVLOG.md.

Motivation and Context

Adeel wants the assistant to be customizable to the same level through code, the canvas, voice or chat.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (ruff check, ruff format and mypy are clean).
  • I added or updated tests (tests/api/test_extensions.py). The full backend suite passes: 373 passed. The one failure is the LibreOffice conversion test, which fails in this environment for reasons unrelated to this change. pnpm tsc passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JroZmoXJUKvyfkvDYvmbka


Generated by Claude Code

…ugins

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JroZmoXJUKvyfkvDYvmbka
@adeelahmad adeelahmad self-assigned this Oct 3, 2026
claude added 3 commits October 3, 2026 03:28
…ead access

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JroZmoXJUKvyfkvDYvmbka
…nly from oneself or an admin

Admins see every extension but their assistant runs only theirs and shared ones; only admins share with everyone;
other people's hooks run only when an admin shared them; extensions follow the conversation's scope. Manifests with
YAML dates or a bad namespaces list get a 400, single-letter parameters are allowed, and a web tool's arguments can't
change its host.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JroZmoXJUKvyfkvDYvmbka
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JroZmoXJUKvyfkvDYvmbka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0