feat(app): the Connect page's Claude desktop app row writes a one-click extension (P15 C1)
Claude's desktop extension format is the MCP Bundle: a .mcpb zip with a manifest.json (manifest 0.3, github.com/anthropics/mcpb). The row's button makes the company's agent key if there is none and writes Documents/Wanderbooks/Extensions/wanderbooks-<id>.mcpb: a manifest whose server is a binary running this program's own stable path as mcp --book <id>, the 512 px icon and a short README as the entry point. The package carries no program (the one executable is the installed one), no key and no path of the data root. The page then says in plain words where in Claude to pick the file and to keep Wanderbooks open, and offers to show the file. The manifest is checked against Anthropic's published schema (a test fixture) and its required fields. The blessed Connect page pictures change by exactly the new row. The program's version is now one value set by main for every platform, not only Unix. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
479d3a5c5e
commit
2bc442f795
15 files changed
+1039
-21
No files matched your search
@@ -282,6 +282,18 @@ impl ledger_gui::owner::Owner for ViewerOwner {
|
||||
)
|
||||
}
|
||||
|
||||
fn claude_desktop_extension(
|
||||
&self,
|
||||
book: &str,
|
||||
company: &str,
|
||||
) -> Result<ledger_gui::owner::ExtensionMade, String> {
|
||||
let made = ledger_host::extension::claude_desktop_extension(&self.common, book, company)?;
|
||||
Ok(ledger_gui::owner::ExtensionMade {
|
||||
file: made.path.display().to_string(),
|
||||
folder: made.folder.display().to_string(),
|
||||
})
|
||||
}
|
||||
|
||||
fn new_books(&self, id: &str, currency: &str) -> Result<String, String> {
|
||||
ledger_host::commands::new_books_and_home(&self.common, id, currency)
|
||||
}
|
||||
@@ -690,8 +702,7 @@ fn is_bare_launch(words: &[String], stdin_is_terminal: bool) -> bool {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
#[cfg(unix)]
|
||||
ledger_host::update::set_program_version(env!("CARGO_PKG_VERSION"));
|
||||
ledger_host::set_program_version(env!("CARGO_PKG_VERSION"));
|
||||
// A file's path may be any name the system takes: the file commands
|
||||
// get the words as given. Everything else is text.
|
||||
let given: Vec<std::ffi::OsString> = env::args_os().skip(1).collect();
|
||||
|
||||
Reference in new issue
Block a user