Move LLM and agent into ext/ai with host tool catalog and call_fn.
Consolidate official AI extensions under ext/ai/, add agent history/context host APIs, dynamic call_fn, and a first-pass TOOL:name loop so runbooks can list zero-arg tools in a table. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
c4ffb9473f
commit
92d88fe761
29 files changed
+1019
-558
No files matched your search
+9
-5
@@ -20,15 +20,15 @@ pub struct ExtPackage {
|
||||
pub const CATALOG: &[ExtPackage] = &[
|
||||
ExtPackage {
|
||||
id: "llm",
|
||||
description: "OpenAI-compatible chat object (ext/llm)",
|
||||
mq_files: &["llm.mq.md", "大模型.mq.md"],
|
||||
description: "OpenAI-compatible chat object (ext/ai/llm)",
|
||||
mq_files: &["ai/llm.mq.md", "ai/大模型.mq.md"],
|
||||
native_crate: None,
|
||||
},
|
||||
ExtPackage {
|
||||
id: "agent",
|
||||
description: "Agent development framework (ext/agent + ABI plugin)",
|
||||
mq_files: &["agent.mq.md", "智能体.mq.md"],
|
||||
native_crate: Some("marqdo_plugin_agent"),
|
||||
description: "Agent development framework (ext/ai/agent)",
|
||||
mq_files: &["ai/agent.mq.md", "ai/智能体.mq.md"],
|
||||
native_crate: None,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -198,6 +198,10 @@ pub fn add_ext(id: &str) -> Result<()> {
|
||||
for f in pkg.mq_files {
|
||||
let src = find_source_file(f)?;
|
||||
let dest = root.join(f);
|
||||
if let Some(parent) = dest.parent() {
|
||||
fs::create_dir_all(parent)
|
||||
.with_context(|| format!("create {}", parent.display()))?;
|
||||
}
|
||||
fs::copy(&src, &dest)
|
||||
.with_context(|| format!("copy {} → {}", src.display(), dest.display()))?;
|
||||
println!("installed {}", dest.display());
|
||||
|
||||
Reference in new issue
Block a user