Compare commits
16
Commits
2a36d43d9d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04528f206f | ||
|
|
3809d2e276 | ||
|
|
ab0439cbba | ||
|
|
e3c8498fde | ||
|
|
3b370a067d | ||
|
|
f4ab2ab6c9 | ||
|
|
c9f68a4361 | ||
|
|
b63db50485 | ||
|
|
11ddf5e00c | ||
|
|
2187d9263d | ||
|
|
4e46e08e4d | ||
|
|
0c509a7c90 | ||
|
|
38d53d68c0 | ||
|
|
6f1826b96b | ||
|
|
e7bbc6275a | ||
|
|
6fba804e5f |
No files matched your search
@@ -126,3 +126,14 @@ bd prime # Refresh Beads context
|
||||
|
||||
**Architecture in one line:** issues live in a local Dolt DB; sync uses `refs/dolt/data` on your git remote; `.beads/issues.jsonl` is a passive export. See https://github.com/gastownhall/beads/blob/main/docs/core-concepts/sync-concepts.md for details and anti-patterns.
|
||||
<!-- END BEADS CODEX SETUP -->
|
||||
|
||||
<!-- BEGIN PM-PROJEKTLANDSCHAFT -->
|
||||
## Projektlandschaft
|
||||
|
||||
Dieses Repo ist eines von mehreren Projekten unter `~/ap`. Die Gesamtübersicht (Zweck, Remotes, Abhängigkeiten aller Repos) und das OKF-Wissensbündel liegen im privaten PM-Repo (`~/ap/PM/CLAUDE.md`, `~/ap/PM/.okf/`); das Konzept zu diesem Repo ist `.okf/systems/m3ta-home.md`. Ist das PM-Repo nicht vorhanden, diesen Abschnitt ignorieren. Ändern sich Zweck, Schnittstellen oder Abhängigkeiten dieses Repos, dort das Konzept aktualisieren und `.okf/log.md` ergänzen.
|
||||
|
||||
Direkte Abhängigkeiten:
|
||||
|
||||
- Konsumiert Pakete aus `m3ta-nixpkgs` (u. a. `agent-lib`, `talk`).
|
||||
- `profiles/sets/coding/agents/claude-skills.nix` spiegelt `~/.agents/skills` (Ziel von `agent-lib sync` aus `agent-prod`) nach `~/.claude/skills` — Änderungen dort wirken auf alle Skills in Claude Code.
|
||||
<!-- END PM-PROJEKTLANDSCHAFT -->
|
||||
@@ -75,3 +75,14 @@ _Add a brief overview of your project architecture_
|
||||
## Conventions & Patterns
|
||||
|
||||
_Add your project-specific conventions here_
|
||||
|
||||
<!-- BEGIN PM-PROJEKTLANDSCHAFT -->
|
||||
## Projektlandschaft
|
||||
|
||||
Dieses Repo ist eines von mehreren Projekten unter `~/ap`. Die Gesamtübersicht (Zweck, Remotes, Abhängigkeiten aller Repos) und das OKF-Wissensbündel liegen im privaten PM-Repo (`~/ap/PM/CLAUDE.md`, `~/ap/PM/.okf/`); das Konzept zu diesem Repo ist `.okf/systems/m3ta-home.md`. Ist das PM-Repo nicht vorhanden, diesen Abschnitt ignorieren. Ändern sich Zweck, Schnittstellen oder Abhängigkeiten dieses Repos, dort das Konzept aktualisieren und `.okf/log.md` ergänzen.
|
||||
|
||||
Direkte Abhängigkeiten:
|
||||
|
||||
- Konsumiert Pakete aus `m3ta-nixpkgs` (u. a. `agent-lib`, `talk`).
|
||||
- `profiles/sets/coding/agents/claude-skills.nix` spiegelt `~/.agents/skills` (Ziel von `agent-lib sync` aus `agent-prod`) nach `~/.claude/skills` — Änderungen dort wirken auf alle Skills in Claude Code.
|
||||
<!-- END PM-PROJEKTLANDSCHAFT -->
|
||||
@@ -35,6 +35,7 @@ Agents committen auf beiden Hosts als `m3ta-chiron`.
|
||||
| `m3ta.t3code.port` | port | `3773` |
|
||||
| `m3ta.t3code.interface` | str | `"wt0"` |
|
||||
| `m3ta.t3code.package` | package | `pkgs.llm-agents.t3code` |
|
||||
| `m3ta.t3code.environmentFile` | null oder absoluter Pfad außerhalb des Stores | `null` |
|
||||
|
||||
Eine Assertion verlangt `services.netbird.enable = true`.
|
||||
|
||||
@@ -42,6 +43,7 @@ Eine Assertion verlangt `services.netbird.enable = true`.
|
||||
|
||||
- Läuft als `user` mit Gruppe `users`; `HOME` und `WorkingDirectory` kommen aus `config.users.users.<user>.home`.
|
||||
- `T3CODE_PORT` kommt aus `port`.
|
||||
- `environmentFile` wird, falls gesetzt, als `EnvironmentFile` geladen (`KEY=value`-Zeilen, z. B. ein agenix-Secret).
|
||||
- `path` enthält `/etc/profiles/per-user/<user>` und `/run/current-system/sw`.
|
||||
- `Restart = "on-failure"`, `RestartSec = 5`.
|
||||
- `bindsTo`, `after` und `wantedBy` zeigen auf `sys-subsystem-net-devices-<interface>.device`.
|
||||
|
||||
@@ -52,6 +52,20 @@ in {
|
||||
defaultText = lib.literalExpression "pkgs.llm-agents.t3code";
|
||||
description = "T3 Code package.";
|
||||
};
|
||||
|
||||
environmentFile = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.pathWith {
|
||||
inStore = false;
|
||||
absolute = true;
|
||||
});
|
||||
default = null;
|
||||
example = "/run/agenix/t3code-env";
|
||||
description = ''
|
||||
File with `KEY=value` lines loaded into the server's environment
|
||||
(systemd `EnvironmentFile`), e.g. tokens for the harnesses. Keep it
|
||||
outside the Nix store, for example as an agenix secret.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
@@ -75,6 +89,7 @@ in {
|
||||
ExecStart = "${serve}/bin/t3code-serve ${cfg.interface} ${cfg.package}/bin/t3";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5";
|
||||
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
|
||||
};
|
||||
|
||||
environment = {
|
||||
|
||||
@@ -15,6 +15,9 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
# Keep the pre-26.11 behaviour; set explicitly to silence the
|
||||
# home-manager default-change warning.
|
||||
loadSessionVariables = false;
|
||||
envFile.text = ''
|
||||
$env.config.show_banner = false
|
||||
$env.NIX_PATH = "nixpkgs=channel:nixos-unstable"
|
||||
|
||||
@@ -18,50 +18,17 @@
|
||||
};
|
||||
|
||||
imports = [
|
||||
# ai-memory client, skill mirror and OpenCode config
|
||||
# ai-memory client, skill mirror, shared MCP catalogue, OpenCode and
|
||||
# Claude Code config
|
||||
./ai-memory.nix
|
||||
./claude-skills.nix
|
||||
./mcp.nix
|
||||
./opencode.nix
|
||||
./claude-code.nix
|
||||
# headless agent CLIs (beads, agent-lib)
|
||||
./cli.nix
|
||||
];
|
||||
|
||||
programs.mcp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
ContextMode = {
|
||||
command = "bash";
|
||||
args = ["-c" "exec bunx context-mode@latest"];
|
||||
};
|
||||
DeepWiki = {
|
||||
url = "https://mcp.deepwiki.com/mcp";
|
||||
};
|
||||
Exa = {
|
||||
command = "bash";
|
||||
args = ["-c" "EXA_API_KEY=$(cat /run/agenix/exa-key) exec bunx exa-mcp-server@latest tools=web_search_exa"];
|
||||
};
|
||||
SallyAI = {
|
||||
url = "https://app.sally.io/api/v1/McpExternal";
|
||||
};
|
||||
Metabase = {
|
||||
url = "https://kpi.az-gruppe.com/api/metabase-mcp";
|
||||
};
|
||||
Outline = {
|
||||
url = "https://wiki.az-gruppe.com/mcp";
|
||||
};
|
||||
Playwright = {
|
||||
command = "bash";
|
||||
args = ["-c" "exec bunx @playwright/mcp@latest"];
|
||||
};
|
||||
Ref = {
|
||||
command = "bash";
|
||||
args = ["-c" "REF_API_KEY=$(cat /run/agenix/ref-key) exec bunx ref-tools-mcp@latest"];
|
||||
};
|
||||
Teams = {
|
||||
command = "bunx";
|
||||
args = ["-y" "@floriscornel/teams-mcp@latest"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# NOTE: llm-agent packages are consumed via the `llm-agents` namespace
|
||||
# (pkgs.llm-agents.*), provided by numtide/llm-agents.nix's
|
||||
# `overlays.shared-nixpkgs`. The consumer's nixos-config MUST apply that
|
||||
@@ -69,10 +36,7 @@
|
||||
# silently falling back to (outdated) nixpkgs attributes.
|
||||
home.packages = with pkgs; [
|
||||
agenix-cli
|
||||
agent-lib
|
||||
llm-agents.agent-browser
|
||||
llm-agents.beads
|
||||
llm-agents.claude-code
|
||||
llm-agents.claude-desktop
|
||||
crunch
|
||||
docker-sbx
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
# The server runs on m3-hermes (nixos-config) and is reached at
|
||||
# memory.m3ta.dev; no server runs on clients. Hybrid setup:
|
||||
# - Nix owns the package, the client config (server URL + bearer token
|
||||
# file), the OpenCode MCP entry (via programs.mcp, since opencode.json
|
||||
# is a home-manager symlink) and the scope markers (~/.ai-memory.toml
|
||||
# plus one marker per workspace directory).
|
||||
# - Activation runs ai-memory's own installers for the lifecycle hooks,
|
||||
# the session-aware Claude Code MCP entry and the skills, so generated
|
||||
# files always match the installed ai-memory version.
|
||||
# file), the MCP entries (programs.mcp for OpenCode, and a session-aware
|
||||
# override in programs.claude-code.mcpServers for Claude Code, both
|
||||
# delivered through the agents' enableMcpIntegration) and the scope
|
||||
# markers (~/.ai-memory.toml plus one marker per workspace directory).
|
||||
# - Activation runs ai-memory's own installers for the lifecycle hooks and
|
||||
# the skills, so generated files always match the installed ai-memory
|
||||
# version.
|
||||
#
|
||||
# The bearer token (an `aim_` API key, one per host) is an agenix secret the
|
||||
# host repo provides at `tokenFile`. It is never copied into a generated
|
||||
@@ -100,6 +101,18 @@ in {
|
||||
args = ["mcp-bridge" "--no-session-id" "--server-url" "${cfg.serverUrl}/mcp"];
|
||||
};
|
||||
|
||||
# Claude Code gets the same server name through
|
||||
# programs.claude-code.enableMcpIntegration, but session-aware: the stdio
|
||||
# bridge forwards the lifecycle-hook session id and reads the token file
|
||||
# itself. (A plain HTTP entry carries no credentials, and Claude Code then
|
||||
# tries OAuth client registration, which ai-memory does not offer.)
|
||||
# Claude Code's own mcpServers take precedence over the shared entry, so
|
||||
# this is one server, not two.
|
||||
programs.claude-code.mcpServers.ai-memory = mkIf (elem "claude-code" cfg.agents) {
|
||||
command = exe;
|
||||
args = ["mcp-bridge" "--server-url" "${cfg.serverUrl}/mcp"];
|
||||
};
|
||||
|
||||
home.file =
|
||||
{
|
||||
# Client config: `ai-memory hook`, `mcp-bridge` and the installers
|
||||
@@ -130,13 +143,10 @@ in {
|
||||
'')
|
||||
cfg.agents}
|
||||
${optionalString (elem "claude-code" cfg.agents) ''
|
||||
# The MCP entry now comes from programs.claude-code (see above);
|
||||
# drop the user-scope entry earlier versions wrote into ~/.claude.json.
|
||||
export PATH="${pkgs.llm-agents.claude-code}/bin:$PATH"
|
||||
run claude mcp remove ai-memory -s user >/dev/null 2>&1 || true
|
||||
# --session-aware: stdio bridge that reads the token file itself. A
|
||||
# plain HTTP entry carries no credentials, and Claude Code then tries
|
||||
# OAuth client registration, which ai-memory does not offer.
|
||||
run ${exe} install-mcp --client claude-code --apply --session-aware \
|
||||
--server-url ${escapeShellArg "${cfg.serverUrl}/mcp"}
|
||||
''}
|
||||
# Into ~/.agents/skills; claude-skills-sync mirrors them to Claude.
|
||||
run ${exe} install-skills --scope global --agent agents
|
||||
|
||||
@@ -51,7 +51,12 @@ check "hooks opencode2" "$act" "install-hooks --agent opencode2 --apply"
|
||||
check "auth-token symlink" "$act" "ln -sfn /run/agenix/ai-memory-token "
|
||||
refute "no token on command lines" "$act" "--auth-token"
|
||||
refute "activation must not write opencode.json (home-manager symlink)" "$act" "install-mcp --client opencode"
|
||||
check "claude mcp is the session-aware bridge" "$act" "install-mcp --client claude-code --apply --session-aware"
|
||||
refute "activation no longer registers the claude mcp itself" "$act" "install-mcp --client claude-code"
|
||||
check "stale user-scope claude entry is removed" "$act" "claude mcp remove ai-memory -s user"
|
||||
|
||||
claude="$(ev programs.claude-code.mcpServers.ai-memory.args --apply 'builtins.concatStringsSep " "')"
|
||||
check "claude mcp is the session-aware bridge" "$claude" "mcp-bridge --server-url https://memory.m3ta.dev/mcp"
|
||||
refute "claude mcp forwards the session id" "$claude" "--no-session-id"
|
||||
|
||||
# Missing token file: skip with a warning, exit 0, never call ai-memory.
|
||||
script="$(printf '%s\n' "$act" | sed 's|/run/agenix/ai-memory-token|/nonexistent/ai-memory-token|g')"
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Claude Code via home-manager `programs.claude-code`.
|
||||
#
|
||||
# enableMcpIntegration hands the shared programs.mcp catalogue (mcp.nix) to
|
||||
# Claude Code the same way opencode.nix does for OpenCode: home-manager
|
||||
# generates a plugin carrying .mcp.json and registers it (as a personal plugin
|
||||
# under ~/.claude/skills/claude-code-home-manager on home-manager master, via a
|
||||
# `--plugin-dir` wrapper on release-26.05). Nothing in ~/.claude is turned
|
||||
# into a store symlink: settings.json (ai-memory hooks, plugins, theme) and
|
||||
# ~/.claude.json (logins) stay writable for Claude Code itself.
|
||||
#
|
||||
# Do NOT add llm-agents.claude-code to home.packages next to this module;
|
||||
# programs.claude-code installs its (possibly wrapped) package and a second
|
||||
# `claude` would collide in the profile.
|
||||
{pkgs, ...}: {
|
||||
programs.claude-code = {
|
||||
enable = true;
|
||||
package = pkgs.llm-agents.claude-code;
|
||||
enableMcpIntegration = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# Headless agent CLIs — safe for servers without a desktop.
|
||||
# Imported by agents.nix; servers that skip the full "coding" set (e.g.
|
||||
# AZ-PRM-1 in AZ-NIX-SERVERS) can import this file on its own.
|
||||
# Packages from the `llm-agents` namespace need numtide/llm-agents.nix's
|
||||
# `overlays.shared-nixpkgs` in the consumer (see agents.nix).
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
agent-lib
|
||||
llm-agents.beads
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
# Shared MCP server catalogue (home-manager `programs.mcp`).
|
||||
#
|
||||
# Single source for every agent that integrates with programs.mcp:
|
||||
# OpenCode (opencode.nix, enableMcpIntegration) and Claude Code
|
||||
# (claude-code.nix, enableMcpIntegration). ai-memory adds its own entry in
|
||||
# ai-memory.nix. Hosts that do not load the whole coding set (servers running
|
||||
# T3 Code) import this file directly.
|
||||
{pkgs, ...}: {
|
||||
programs.mcp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
ContextMode = {
|
||||
command = "bash";
|
||||
args = ["-c" "exec bunx context-mode@latest"];
|
||||
};
|
||||
DeepWiki = {
|
||||
url = "https://mcp.deepwiki.com/mcp";
|
||||
};
|
||||
Exa = {
|
||||
command = "bash";
|
||||
args = ["-c" "EXA_API_KEY=$(cat /run/agenix/exa-key) exec bunx exa-mcp-server@latest tools=web_search_exa"];
|
||||
};
|
||||
SallyAI = {
|
||||
url = "https://app.sally.io/api/v1/McpExternal";
|
||||
};
|
||||
Metabase = {
|
||||
url = "https://kpi.az-gruppe.com/api/metabase-mcp";
|
||||
};
|
||||
Outline = {
|
||||
url = "https://wiki.az-gruppe.com/mcp";
|
||||
};
|
||||
# Outlook mail, calendar and contacts via Microsoft Graph. First use:
|
||||
# call the `auth` tool (start, then complete) for the device-code login.
|
||||
Outlook = {
|
||||
command = "${pkgs.callPackage ./microsoft-graph-mcp-server.nix {}}/bin/microsoft-graph-mcp-server";
|
||||
};
|
||||
Playwright = {
|
||||
command = "bash";
|
||||
args = ["-c" "exec bunx @playwright/mcp@latest"];
|
||||
};
|
||||
Ref = {
|
||||
command = "bash";
|
||||
args = ["-c" "REF_API_KEY=$(cat /run/agenix/ref-key) exec bunx ref-tools-mcp@latest"];
|
||||
};
|
||||
Teams = {
|
||||
command = "bunx";
|
||||
args = ["-y" "@floriscornel/teams-mcp@latest"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
# Microsoft Graph MCP server (mail, calendar, contacts of the signed-in M365
|
||||
# account) by marlonluo2018. Chosen over the author's outlook-mcp-server,
|
||||
# which drives the Outlook desktop client through win32COM and therefore only
|
||||
# runs on Windows; this one talks to the Graph API and is plain Python.
|
||||
#
|
||||
# Not on PyPI, so it is built from the GitHub source. Auth is the device-code
|
||||
# flow against Microsoft's public client id (no Azure app registration);
|
||||
# tokens land in ~/.microsoft_graph_mcp_tokens.json. Settings come from env
|
||||
# vars (CLIENT_ID, TENANT_ID, USER_TIMEZONE, ...); the optional .env the
|
||||
# upstream README mentions would sit inside the store and is not used.
|
||||
{
|
||||
lib,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
python3Packages.buildPythonApplication {
|
||||
pname = "microsoft-graph-mcp-server";
|
||||
version = "0.1.0-unstable-2026-11-12";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "marlonluo2018";
|
||||
repo = "microsoft_graph_mcp_server";
|
||||
rev = "b4c2725ee9e3d47dce8641d5ca90434aca16c9db";
|
||||
hash = "sha256-RSPyjq3Zu9WBbihI4yuB3PhxgRaF9G2gl+xaslnBdJI=";
|
||||
};
|
||||
|
||||
build-system = with python3Packages; [hatchling];
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
mcp_1 # upstream targets the 1.x low-level Server API (list_tools decorators); mcp 2.x removed it
|
||||
msal
|
||||
httpx
|
||||
pydantic
|
||||
pydantic-settings
|
||||
python-dotenv
|
||||
click
|
||||
rich
|
||||
typing-extensions
|
||||
tzdata
|
||||
pillow # optional image attachments (MULTIMODAL_SUPPORTED)
|
||||
];
|
||||
|
||||
# Upstream defaults USER_TIMEZONE to Asia/Shanghai; the env still wins.
|
||||
makeWrapperArgs = ["--set-default" "USER_TIMEZONE" "Europe/Berlin"];
|
||||
|
||||
# server.py builds an MSAL client at import time, which hits the network,
|
||||
# so only the config module is import-checked in the sandbox.
|
||||
pythonImportsCheck = ["microsoft_graph_mcp_server.config"];
|
||||
|
||||
meta = {
|
||||
description = "MCP server for Microsoft Graph (Outlook mail, calendar, contacts)";
|
||||
homepage = "https://github.com/marlonluo2018/microsoft_graph_mcp_server";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "microsoft-graph-mcp-server";
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user