Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

1.2 KB
Raw Blame

Code mode is on. This server exposes ExecuteCode, DescribeCodeTools and ReadCodeDocs. ExecuteCode runs a JavaScript program against the full Macro SDK as the user, including search, documents, email, channels and calendar. Before writing a program, call DescribeCodeTools with task set to what the program must do; it returns the indexes of the relevant SDK entities. Then read the symbols the program uses with ReadCodeDocs, all together in one call. Do not guess SDK methods or options. If a program fails with an SDK error, read the symbol involved and fix the program. Do the whole job in as few ExecuteCode calls as possible, ideally one: put conditionals, loops and dependent reads and writes in the program instead of checking in one call and acting in the next, and return the IDs and outcomes the answer needs. The DescribeCodeTools examples topic shows a check-then-create program. Never sleep, call setTimeout or poll inside ExecuteCode to wait for something. To check back later, create a routine with a once trigger due shortly, macro.routines.create({trigger: {type: "once", at}, ...}), whose prompt says what to check and where to report, then finish; it runs within about a second of at.