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
@@ -56,6 +56,8 @@ pub enum Op {
|
||||
GetIndex,
|
||||
/// Call function by index; argc values are on the stack (param order).
|
||||
Call(u16, u8),
|
||||
/// Pop function name text → call zero-arg top-level or lexically visible function.
|
||||
CallFn,
|
||||
/// After a constructor Call: tag top-of-stack map with `_type` = constants[idx].
|
||||
TagInstance(u16),
|
||||
/// Method call: stack has argc args (param order) then receiver on top.
|
||||
@@ -88,6 +90,10 @@ pub struct Program {
|
||||
pub objects: Vec<(String, usize)>,
|
||||
/// (object_fn_idx, method_name) → method fn idx
|
||||
pub methods: Vec<(usize, String, usize)>,
|
||||
/// Parallel to `functions`: parent fn index for dynamic `call_fn` lookup.
|
||||
pub parents: Vec<Option<usize>>,
|
||||
/// Parallel to `functions`: child fn indices.
|
||||
pub children: Vec<Vec<usize>>,
|
||||
}
|
||||
|
||||
impl Program {
|
||||
|
||||
Reference in new issue
Block a user