sigit-code 1.3.0__tar.gz → 1.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sigit_code-1.3.0 → sigit_code-1.3.1}/CHANGELOG.md +21 -1
- {sigit_code-1.3.0 → sigit_code-1.3.1}/CLAUDE.md +36 -5
- {sigit_code-1.3.0 → sigit_code-1.3.1}/Cargo.lock +1 -1
- {sigit_code-1.3.0 → sigit_code-1.3.1}/Cargo.toml +1 -1
- {sigit_code-1.3.0 → sigit_code-1.3.1}/LICENSE +1 -1
- {sigit_code-1.3.0 → sigit_code-1.3.1}/PKG-INFO +2 -2
- {sigit_code-1.3.0 → sigit_code-1.3.1}/README.md +1 -1
- {sigit_code-1.3.0 → sigit_code-1.3.1}/npm/sigit/README.md +1 -1
- {sigit_code-1.3.0 → sigit_code-1.3.1}/pypi/README.md +1 -1
- {sigit_code-1.3.0 → sigit_code-1.3.1}/src/chat.rs +11 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/src/instructions.rs +20 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/src/main.rs +19 -0
- sigit_code-1.3.1/src/mcp.rs +954 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/src/tools.rs +784 -33
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.agents/AGENTS.md +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.agents/skills/agent-client-protocol/SKILL.md +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.agents/skills/ai-assisted-coding/SKILL.md +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.agents/skills/branding/SKILL.md +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.agents/skills/sigit-code-release/SKILL.md +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.agents/skills/tool-calling/SKILL.md +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.claude/skills/run-sigit/SKILL.md +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.claude/skills/run-sigit/driver.mjs +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.claude/skills/run-sigit/tui-smoke.sh +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.github/workflows/ci.yml +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.github/workflows/release-crates.yml +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.github/workflows/release-github.yml +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.github/workflows/release-homebrew.yml +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.github/workflows/release-npm.yml +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.github/workflows/release-pypi.yml +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.gitignore +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/.nvmrc +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/examples/skills/README.md +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/examples/skills/commit-message/SKILL.md +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/npm/README.md.tmpl +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/npm/package-main.json.tmpl +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/npm/package.json.tmpl +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/npm/scripts/render-main-package.cjs +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/npm/scripts/render-platform-package.cjs +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/npm/sigit/.gitignore +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/npm/sigit/package.json +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/npm/sigit/src/index.ts +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/npm/sigit/tsconfig.json +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/pypi/pyproject.toml +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/pyproject.toml +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/rust-toolchain.toml +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/src/account.rs +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/src/backend.rs +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/src/credentials.rs +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/src/models.rs +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/src/provider.rs +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/src/settings.rs +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/src/setup.rs +0 -0
- {sigit_code-1.3.0 → sigit_code-1.3.1}/src/skills.rs +0 -0
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.1
|
|
4
|
+
|
|
5
|
+
Adds [Model Context Protocol](https://modelcontextprotocol.io) (MCP) client
|
|
6
|
+
support with the official siGit Code MCP server baked in, a set of agent tools
|
|
7
|
+
that close parity gaps in the tool layer, and refreshed branding and licensing.
|
|
8
|
+
|
|
9
|
+
### What changed
|
|
10
|
+
|
|
11
|
+
- siGit Code is now an MCP client: it connects to MCP servers over the Streamable HTTP transport (a single JSON-RPC endpoint), discovers the tools they expose, and offers them to the model alongside the built-in tools. When the model calls one, the call is forwarded to the owning server and the result fed back into the agent loop
|
|
12
|
+
- Bakes in the official siGit Code MCP server at `https://sigit.si/api/v1/mcp` (follows `SIGIT_CLOUD_URL`). When you are signed in (`sigit login`), the cloud session token is sent as the bearer credential
|
|
13
|
+
- Configure additional servers in `mcp.toml` — global (`~/.config/sigit/mcp.toml`) or project-local (`.sigit/mcp.toml`). Each `[[server]]` has a `name`, `url`, optional `enabled`, and optional `[server.headers]`; set `official = false` to opt out of the baked-in server
|
|
14
|
+
- MCP tools are namespaced `mcp__<server>__<tool>` so they never collide with built-in tools or across servers; tool output is capped to protect the model's context
|
|
15
|
+
- Discovery is best-effort at startup and bounded by a per-server timeout, so an unreachable server never blocks startup — it just contributes no tools
|
|
16
|
+
- Added a `/mcp` slash command (TUI and ACP) that lists configured servers, their connection status, and the tools each exposes
|
|
17
|
+
- Disable MCP entirely with `SIGIT_MCP=off`, or just the official server with `SIGIT_MCP_OFFICIAL=off`
|
|
18
|
+
- New agent tools that close parity gaps in the tool layer: `multi_edit` (apply a batch of exact-substring edits to one file atomically — written only if every edit matches), `glob` (locate files by name pattern with `**`/`*`/`?`/`{a,b}`, most-recently-modified first), `write_todos` (render a live task checklist through the tool result for multi-step work), and `remember` (append durable notes to the nearest `AGENTS.md`/`CLAUDE.md`)
|
|
19
|
+
- `edit_file` now supports `replace_all` and returns actionable failure context — naming the line whose trimmed text matches when only whitespace differs — so the model self-corrects in one round
|
|
20
|
+
- `search_files` gained a `file_glob` filter and a `max_results` cap (default 50, hard-capped at 1000) that also bounds the directory walk
|
|
21
|
+
- Refreshed branding and legal: updated `LICENSE`, `README`, and the npm/PyPI package descriptions
|
|
22
|
+
|
|
3
23
|
## 1.3.0
|
|
4
24
|
|
|
5
25
|
Adds a Local Inference on/off toggle, the open [Agent Skills](https://agentskills.io)
|
|
@@ -212,4 +232,4 @@ ACP and editor mode work on Windows. The part that is still missing is the inter
|
|
|
212
232
|
|
|
213
233
|
---
|
|
214
234
|
|
|
215
|
-
*© 2026 [
|
|
235
|
+
*© 2026 [Splitfire AB](https://5mb.app) ([siGit Code & Deploy](https://sigit.si)).*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CLAUDE.md
|
|
2
2
|
|
|
3
|
-
This file provides guidance to
|
|
3
|
+
This file provides guidance to AI coding agents when working with code in this repository.
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
@@ -17,6 +17,25 @@ is a TTY:
|
|
|
17
17
|
Before the TTY/ACP split, `main` also dispatches the account subcommands `sigit login`,
|
|
18
18
|
`sigit logout`, `sigit whoami` (see `src/main.rs` `main()`).
|
|
19
19
|
|
|
20
|
+
## Working in this repo
|
|
21
|
+
|
|
22
|
+
**IMPORTANT — branch naming:** Name every working branch after the *changes it contains*, not
|
|
23
|
+
after a task, ticket, or session id. Use a short, descriptive, kebab-case slug so the branch is
|
|
24
|
+
self-explanatory from its name alone (e.g. `claude/agent-tools-multiedit-glob-todos-remember`,
|
|
25
|
+
not `claude/task-q003hm`).
|
|
26
|
+
|
|
27
|
+
**IMPORTANT — pull request target:** Always open pull requests against the `development` branch,
|
|
28
|
+
never `main`. `main` is release-only; `development` is where day-to-day work integrates.
|
|
29
|
+
|
|
30
|
+
**IMPORTANT — run CI before pushing:** Run the full CI gate locally and confirm it is green
|
|
31
|
+
*before* pushing a branch or opening a pull request — never push work that fails these:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
cargo fmt -- --check # formatting
|
|
35
|
+
cargo clippy --tests -- -D warnings # lint (warnings are errors)
|
|
36
|
+
cargo test --locked # tests
|
|
37
|
+
```
|
|
38
|
+
|
|
20
39
|
## Build / test / lint
|
|
21
40
|
|
|
22
41
|
```sh
|
|
@@ -62,8 +81,9 @@ feeds results back. Neither the loop nor ACP/TUI surfaces depend on a concrete b
|
|
|
62
81
|
wins: (1) override via `OPENAI_BASE_URL`+`OPENAI_API_KEY` or active profile in
|
|
63
82
|
`~/.config/sigit/providers.toml`; (2) siGit Code Cloud when logged in; (3) on-device.
|
|
64
83
|
- **`src/tools.rs`** — agent tool schemas + execution: `read_file`, `create_directory`,
|
|
65
|
-
`list_directory`, `search_files`, `read_website`, `create_file`, `edit_file`,
|
|
66
|
-
`run_command`. Add a tool in both the
|
|
84
|
+
`list_directory`, `search_files`, `glob`, `read_website`, `create_file`, `edit_file`,
|
|
85
|
+
`multi_edit`, `delete_file`, `run_command`, `write_todos`, `remember`. Add a tool in both the
|
|
86
|
+
spec list (`all_tools`) and the execute `match` (`execute_tool`).
|
|
67
87
|
- **`src/skills.rs`** — [Agent Skills](https://agentskills.io) support. Discovers skill
|
|
68
88
|
folders (each with a `SKILL.md`: YAML frontmatter `name` + `description`, then Markdown
|
|
69
89
|
instructions) from `.sigit/skills/` and `.claude/skills/` in the cwd, `$SIGIT_CONFIG_DIR/skills/`,
|
|
@@ -72,6 +92,16 @@ feeds results back. Neither the loop nor ACP/TUI surfaces depend on a concrete b
|
|
|
72
92
|
calls `skill` with a name) loads the full `SKILL.md` body. The `skill` tool is appended in the
|
|
73
93
|
`*_as_specs`/`build_tool_specs` layer (not in `all_tools()`) so its description can be dynamic,
|
|
74
94
|
and only when at least one skill exists.
|
|
95
|
+
- **`src/mcp.rs`** — [Model Context Protocol](https://modelcontextprotocol.io) *client*. Connects to
|
|
96
|
+
MCP servers over the **Streamable HTTP** transport (one JSON-RPC POST endpoint; replies are
|
|
97
|
+
`application/json` or SSE), runs the `initialize`/`tools/list` handshake, and forwards `tools/call`.
|
|
98
|
+
Discovery is best-effort at startup (`mcp::init`, called from both branches of `main()`) and cached
|
|
99
|
+
in a process-global so the synchronous spec builders (`mcp::tool_specs`) and the async dispatch
|
|
100
|
+
(`mcp::call_tool`) can both read it. Tools are namespaced `mcp__<server>__<tool>`, appended in the
|
|
101
|
+
`*_as_specs`/`build_tool_specs` layer and routed in `tools::execute_tool` via `mcp::is_mcp_tool`. The
|
|
102
|
+
official server (`<cloud>/mcp`, default `https://sigit.si/api/v1/mcp`) is baked in and authed with the
|
|
103
|
+
cloud session token; extra servers live in `mcp.toml` (global `$SIGIT_CONFIG_DIR/mcp.toml` and
|
|
104
|
+
project-local `.sigit/mcp.toml`). stdio transport is not supported.
|
|
75
105
|
- **`src/instructions.rs`** — project instruction files, the always-on counterpart to skills.
|
|
76
106
|
Reads `AGENTS.md` (the cross-tool [agents.md](https://agents.md) standard) and `CLAUDE.md`,
|
|
77
107
|
walking from the session cwd up to the repo root (nearest ancestor with `.git`, never above it),
|
|
@@ -89,7 +119,7 @@ feeds results back. Neither the loop nor ACP/TUI surfaces depend on a concrete b
|
|
|
89
119
|
- **`src/credentials.rs`** — local session-token store (TOML, `0600` on Unix).
|
|
90
120
|
- **`src/models.rs`** — model-picker types shared across platforms.
|
|
91
121
|
|
|
92
|
-
Slash commands (`/help`, `/models`, `/skills`, `/login`, `/logout`, `/whoami`, `/reload`,
|
|
122
|
+
Slash commands (`/help`, `/models`, `/skills`, `/mcp`, `/login`, `/logout`, `/whoami`, `/reload`,
|
|
93
123
|
`/clear`, `/status`) are advertised via `advertise_commands` in `main.rs` and handled in both the
|
|
94
124
|
TUI and ACP sessions.
|
|
95
125
|
|
|
@@ -111,7 +141,8 @@ verbosity with `RUST_LOG`.
|
|
|
111
141
|
|
|
112
142
|
`OPENAI_BASE_URL` / `OPENAI_API_KEY` (provider override), `SIGIT_API_URL` (account API base,
|
|
113
143
|
default `https://sigit.si`), `SIGIT_CLOUD_URL`, `SIGIT_CONFIG_DIR` (default `~/.config/sigit`),
|
|
114
|
-
`SIGIT_MODEL`, `
|
|
144
|
+
`SIGIT_MODEL`, `SIGIT_MCP` (`off` disables MCP), `SIGIT_MCP_OFFICIAL` (`off` drops the baked-in
|
|
145
|
+
server), `HF_HOME` / `HF_HUB_CACHE`, `RUST_LOG`.
|
|
115
146
|
|
|
116
147
|
## Releasing
|
|
117
148
|
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
that a file or directory name be given on the same line as the
|
|
176
176
|
copyright notice for easier identification within third-party archives.
|
|
177
177
|
|
|
178
|
-
Copyright 2026
|
|
178
|
+
Copyright 2026 Splitfire AB (siGit Code & Deploy)
|
|
179
179
|
|
|
180
180
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
181
|
you may not use this file except in compliance with the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sigit-code
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.1
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Environment :: Console
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -111,5 +111,5 @@ This package ships a prebuilt binary. The source code lives at [github.com/getsi
|
|
|
111
111
|
|
|
112
112
|
## Copyright
|
|
113
113
|
|
|
114
|
-
© 2026 [
|
|
114
|
+
© 2026 [Splitfire AB](https://5mb.app) ([siGit Code & Deploy](https://sigit.si)).
|
|
115
115
|
|
|
@@ -738,6 +738,8 @@ mod tui {
|
|
|
738
738
|
Local(Option<bool>),
|
|
739
739
|
/// List discovered Agent Skills.
|
|
740
740
|
Skills,
|
|
741
|
+
/// List configured MCP servers and their tools.
|
|
742
|
+
Mcp,
|
|
741
743
|
/// explicitly load the selected (or default) on-device model
|
|
742
744
|
Load,
|
|
743
745
|
/// `/login <email> <password>` — the raw argument, parsed when executed.
|
|
@@ -763,6 +765,7 @@ mod tui {
|
|
|
763
765
|
"/models" => SlashCommand::Models(arg.and_then(|s| s.parse::<usize>().ok())),
|
|
764
766
|
"/local" => SlashCommand::Local(parse_on_off(arg)),
|
|
765
767
|
"/skills" => SlashCommand::Skills,
|
|
768
|
+
"/mcp" => SlashCommand::Mcp,
|
|
766
769
|
"/load" => SlashCommand::Load,
|
|
767
770
|
"/login" => SlashCommand::Login(arg.map(str::to_string)),
|
|
768
771
|
"/logout" => SlashCommand::Logout,
|
|
@@ -1359,6 +1362,7 @@ mod tui {
|
|
|
1359
1362
|
/models N — switch to model N\n\
|
|
1360
1363
|
/local [on|off]— toggle on-device inference mode\n\
|
|
1361
1364
|
/skills — list available Agent Skills\n\
|
|
1365
|
+
/mcp — list MCP servers and their tools\n\
|
|
1362
1366
|
/load — load the selected on-device model\n\
|
|
1363
1367
|
/login E P — sign in to siGit Code Cloud\n\
|
|
1364
1368
|
/logout — sign out\n\
|
|
@@ -1388,6 +1392,10 @@ mod tui {
|
|
|
1388
1392
|
app.messages
|
|
1389
1393
|
.push(ChatMessage::system(crate::skills::format_skills_list()));
|
|
1390
1394
|
}
|
|
1395
|
+
SlashCommand::Mcp => {
|
|
1396
|
+
app.messages
|
|
1397
|
+
.push(ChatMessage::system(crate::mcp::status_summary()));
|
|
1398
|
+
}
|
|
1391
1399
|
SlashCommand::Models(selection) => match selection {
|
|
1392
1400
|
None => {
|
|
1393
1401
|
app.open_model_picker(&engine);
|
|
@@ -1533,6 +1541,9 @@ mod tui {
|
|
|
1533
1541
|
});
|
|
1534
1542
|
}
|
|
1535
1543
|
|
|
1544
|
+
// Tools discovered from configured MCP servers (incl. the official one).
|
|
1545
|
+
specs.extend(crate::mcp::tool_specs());
|
|
1546
|
+
|
|
1536
1547
|
specs
|
|
1537
1548
|
}
|
|
1538
1549
|
|
|
@@ -131,6 +131,26 @@ fn first_instruction_file(dir: &Path) -> Option<PathBuf> {
|
|
|
131
131
|
None
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/// The file the `remember` tool appends durable notes to: the nearest existing
|
|
135
|
+
/// instruction file walking from `cwd` up to the repository root, or a new
|
|
136
|
+
/// `CLAUDE.md` at the repo root (falling back to `cwd`) when none exists yet.
|
|
137
|
+
pub fn memory_file(cwd: &Path) -> PathBuf {
|
|
138
|
+
let canonical = cwd.canonicalize().unwrap_or_else(|_| cwd.to_path_buf());
|
|
139
|
+
let root = repo_root(&canonical).unwrap_or_else(|| canonical.clone());
|
|
140
|
+
|
|
141
|
+
// Deepest (most specific) existing file wins, matching read precedence.
|
|
142
|
+
for dir in canonical
|
|
143
|
+
.ancestors()
|
|
144
|
+
.filter(|ancestor| ancestor.starts_with(&root))
|
|
145
|
+
{
|
|
146
|
+
if let Some(found) = first_instruction_file(dir) {
|
|
147
|
+
return found;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
root.join("CLAUDE.md")
|
|
152
|
+
}
|
|
153
|
+
|
|
134
154
|
fn sigit_config_dir() -> Option<PathBuf> {
|
|
135
155
|
if let Ok(dir) = std::env::var("SIGIT_CONFIG_DIR")
|
|
136
156
|
&& !dir.is_empty()
|
|
@@ -33,6 +33,7 @@ mod backend;
|
|
|
33
33
|
mod chat;
|
|
34
34
|
mod credentials;
|
|
35
35
|
mod instructions;
|
|
36
|
+
mod mcp;
|
|
36
37
|
mod models;
|
|
37
38
|
mod provider;
|
|
38
39
|
mod settings;
|
|
@@ -275,6 +276,9 @@ fn agent_tools_as_specs() -> Vec<ToolSpec> {
|
|
|
275
276
|
});
|
|
276
277
|
}
|
|
277
278
|
|
|
279
|
+
// Tools discovered from configured MCP servers (incl. the official one).
|
|
280
|
+
specs.extend(mcp::tool_specs());
|
|
281
|
+
|
|
278
282
|
specs
|
|
279
283
|
}
|
|
280
284
|
|
|
@@ -717,6 +721,7 @@ impl SiGitAgent {
|
|
|
717
721
|
"on|off (optional)",
|
|
718
722
|
),
|
|
719
723
|
AvailableCommand::new("skills", "List available Agent Skills"),
|
|
724
|
+
AvailableCommand::new("mcp", "List MCP servers and their tools"),
|
|
720
725
|
AvailableCommand::new("load", "Load the selected on-device model"),
|
|
721
726
|
with_hint("login", "Sign in to siGit Code Cloud", "<email> <password>"),
|
|
722
727
|
AvailableCommand::new("logout", "Sign out of siGit Code Cloud"),
|
|
@@ -1962,6 +1967,8 @@ enum SlashCommand {
|
|
|
1962
1967
|
Local(Option<bool>),
|
|
1963
1968
|
/// List discovered Agent Skills.
|
|
1964
1969
|
Skills,
|
|
1970
|
+
/// List configured MCP servers and their tools.
|
|
1971
|
+
Mcp,
|
|
1965
1972
|
/// Explicitly load the selected (or default) on-device model.
|
|
1966
1973
|
Load,
|
|
1967
1974
|
/// `/login <email> <password>` — the raw argument, parsed when executed.
|
|
@@ -1989,6 +1996,7 @@ fn parse_slash(input: &str) -> Option<SlashCommand> {
|
|
|
1989
1996
|
"/models" => SlashCommand::Models(argument.and_then(|v| v.parse::<usize>().ok())),
|
|
1990
1997
|
"/local" => SlashCommand::Local(parse_on_off(argument)),
|
|
1991
1998
|
"/skills" => SlashCommand::Skills,
|
|
1999
|
+
"/mcp" => SlashCommand::Mcp,
|
|
1992
2000
|
"/load" => SlashCommand::Load,
|
|
1993
2001
|
"/login" => SlashCommand::Login(argument.map(str::to_string)),
|
|
1994
2002
|
"/logout" => SlashCommand::Logout,
|
|
@@ -2096,6 +2104,7 @@ async fn exec_slash_acp(
|
|
|
2096
2104
|
/models N - switch to model N\n\
|
|
2097
2105
|
/local [on|off]- toggle on-device inference mode\n\
|
|
2098
2106
|
/skills - list available Agent Skills\n\
|
|
2107
|
+
/mcp - list MCP servers and their tools\n\
|
|
2099
2108
|
/load - load the selected on-device model\n\
|
|
2100
2109
|
/login E P - sign in to siGit Code Cloud\n\
|
|
2101
2110
|
/logout - sign out\n\
|
|
@@ -2143,6 +2152,11 @@ async fn exec_slash_acp(
|
|
|
2143
2152
|
.send_assistant_message(cx, session_id, skills::format_skills_list())
|
|
2144
2153
|
.ok();
|
|
2145
2154
|
}
|
|
2155
|
+
SlashCommand::Mcp => {
|
|
2156
|
+
agent
|
|
2157
|
+
.send_assistant_message(cx, session_id, mcp::status_summary())
|
|
2158
|
+
.ok();
|
|
2159
|
+
}
|
|
2146
2160
|
SlashCommand::Models(Some(number)) => {
|
|
2147
2161
|
let items = models::build_model_picker_items();
|
|
2148
2162
|
let index = number.saturating_sub(1);
|
|
@@ -2775,6 +2789,9 @@ async fn main() -> anyhow::Result<()> {
|
|
|
2775
2789
|
let (tty, cleanup_tty) = redirect_output_to_log()?;
|
|
2776
2790
|
init_logging(true);
|
|
2777
2791
|
setup::setup_shared_model_cache();
|
|
2792
|
+
// Best-effort: discover MCP servers (incl. the official one) before
|
|
2793
|
+
// the first turn so their tools are offered to the model.
|
|
2794
|
+
mcp::init().await;
|
|
2778
2795
|
run_interactive(tty, cleanup_tty).await
|
|
2779
2796
|
}
|
|
2780
2797
|
#[cfg(not(unix))]
|
|
@@ -2786,6 +2803,8 @@ async fn main() -> anyhow::Result<()> {
|
|
|
2786
2803
|
// Logs already go to stderr via `init_logging(false)`.
|
|
2787
2804
|
init_logging(false);
|
|
2788
2805
|
setup::setup_shared_model_cache();
|
|
2806
|
+
// Best-effort MCP discovery (incl. the official server) before serving.
|
|
2807
|
+
mcp::init().await;
|
|
2789
2808
|
log::info!("siGit v{} starting (ACP mode)", env!("CARGO_PKG_VERSION"));
|
|
2790
2809
|
run_acp_server().await
|
|
2791
2810
|
}
|