{"q":"","category":"","count":20,"rows":[{"key":"DONETASK","type":"fn","category":"tasks","target":"taskDone","planner_rank":1,"docs":"WHAT: Mark a task as done. $1=task_id (number), $2=optional result summary. WHEN_TO_USE: a queued task has been completed and should be removed from the open backlog. ARGS: $1=task_id, $2=result summary EX: [DONETASK]123[/DONETASK]"},{"key":"EDITORIAL_BOARD_RUN","type":"fn","category":"protocol","target":"protocolRun","planner_rank":1,"docs":"WHAT: Run one receiving editorial-board task. It reads a MODEL_CHAT_INTAKE ledger event, extracts owner complaints and content-rule defects as JSON, ledgers EDITORIAL_BOARD_DECISION, and queues OIP purification. WHEN_TO_USE: after raw model/chat intake, or cron, to process one editorial-board queue item. ARGS: none EX: [EDITORIAL_BOARD_RUN][/EDITORIAL_BOARD_RUN]"},{"key":"MARKETING_SNAPSHOT","type":"fn","category":"meta","target":"marketingSnapshot","planner_rank":1,"docs":"WHAT: Live Meta + lbl cache + MARKETING_STATE JSON. EX: [MARKETING_SNAPSHOT][/MARKETING_SNAPSHOT]"},{"key":"META","type":"http","category":"meta","target":"target_map:{\"me\":{\"method\":\"GET\",\"url\":\"https://graph.facebook.com/v22.0/me?fields=id,name\"},\"ad_accounts\":{\"method\":\"GET\",\"url\":\"https://graph.facebook.com/v22.0/$1/adaccounts?fields=id,account_id,name,account_status,currency,timezone_name&limit=200\"},\"owned_ad_accounts\":{\"method\":\"GET\",\"url\":\"https://graph.facebook.com/v22.0/$1/owned_ad_accounts?fields=id,account_id,name,account_status,currency,timezone_name&limit=200\"},\"client_ad_accounts\":{\"method\":\"GET\",\"url\":\"https://graph.facebook.com/v22.0/$1/client_ad_accounts?fields=id,account_id,name,account_status,currency,timezone_name&limit=200\"},\"campaigns\":{\"method\":\"GET\",\"url\":\"https://graph.facebook.com/v22.0/$1/campaigns?fields=id,name,status,objective,daily_budget,lifetime_budget&limit=250\"},\"adsets\":{\"method\":\"GET\",\"url\":\"https://graph.facebook.com/v22.0/$1/adsets?fields=id,name,status,daily_budget,campaign_id,effective_status&limit=250\"},\"ads\":{\"method\":\"GET\",\"url\":\"https://graph.facebook.com/v22.0/$1/ads?fields=id,name,status,effective_status,adset_id,campaign_id,creative&limit=250\"},\"adcreatives\":{\"method\":\"GET\",\"url\":\"https://graph.facebook.com/v22.0/$1/adcreatives?fields=id,name,title,body,image_url,thumbnail_url,object_story_spec,call_to_action_type&limit=250\"},\"ad_images\":{\"method\":\"GET\",\"url\":\"https://graph.facebook.com/v22.0/$1/adimages?fields=id,name,url,hash&limit=250\"},\"insights\":{\"method\":\"GET\",\"url\":\"https://graph.facebook.com/v22.0/$1/insights?level=$2&fields=spend,impressions,clicks,ctr,cpc,cpm,inline_link_clicks,actions,action_values&time_range={\\\"since\\\":\\\"$3\\\",\\\"until\\\":\\\"$4\\\"}&limit=500\"},\"capi_post\":{\"method\":\"POST\",\"url\":\"https://graph.facebook.com/v22.0/27209526152071970/events\",\"body\":\"{\\\"data\\\":[{\\\"event_name\\\":\\\"$1\\\",\\\"event_time\\\":$2,\\\"event_id\\\":\\\"$3\\\",\\\"event_source_url\\\":\\\"$4\\\",\\\"action_source\\\":\\\"website\\\",\\\"user_data\\\":{\\\"client_ip_address\\\":\\\"$5\\\",\\\"client_user_agent\\\":\\\"$6\\\"}}]}\"}}","planner_rank":1,"docs":"WHAT: Meta Graph API unified entrypoint (Marketing API) WHEN_TO_USE: Meta ad accounts, campaigns, adsets, ads, creatives, insights, CAPI ARGS: $1=op, $2..$N=args per op OPS: me | ad_accounts | owned_ad_accounts | client_ad_accounts | campaigns | adsets | ads | adcreatives | ad_images | insights | capi_post"},{"key":"META_ACCOUNTS","type":"fn","category":"marketing","target":"metaAccounts","planner_rank":1,"docs":"WHAT: Live Meta ad accounts via the loop-meta-bridge service binding. Lists every owned/authorized account and upserts them into meta_ad_accounts so the marketing surface + Site Sync stay current. Read-only; never spends. WHEN_TO_USE: \"what ad accounts do I have\", \"sync my meta accounts\", refresh the ad-account list. ARGS: none. EX: [META_ACCOUNTS][/META_ACCOUNTS]"},{"key":"META_ADS_ACCOUNTS","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/accounts","planner_rank":1,"docs":"WHAT: List all ad accounts (owned + client + authorized) with status, currency, spend. ARGS: JSON {} (no args). TESTS: Read op; live Meta Graph read. Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_ACCOUNT_GET","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/account-get","planner_rank":1,"docs":"WHAT: Get one ad account: status, currency, spend, balance, spend_cap, funding, capabilities. ARGS: JSON {account_id}. TESTS: Read op; live Meta Graph read. Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_ACTIVITIES","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/activities","planner_rank":1,"docs":"WHAT: Activity log for an ad account (Ads Manager change history). ARGS: JSON {account_id, limit?}. TESTS: Read op; live Meta Graph read. Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_ADS","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/ads","planner_rank":1,"docs":"WHAT: List ads in an ad account (id,name,status,effective_status,adset_id,campaign_id,creative). ARGS: JSON {account_id}. TESTS: Read op; live Meta Graph read. Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_ADSETS","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/adsets","planner_rank":1,"docs":"WHAT: List ad sets in an ad account (id,name,status,budget,campaign_id,effective_status). ARGS: JSON {account_id}. TESTS: Read op; live Meta Graph read. Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_ADSET_CREATE","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/adset-create","planner_rank":1,"docs":"WHAT: Create an ad set (defaults status PAUSED). ARGS: JSON {account_id, name, campaign_id, optimization_goal, billing_event, daily_budget?|lifetime_budget?, targeting?, bid_amount?, promoted_object?, start_time?, end_time?}. TESTS: Write op; requires act auth; create ops default status PAUSED (no spend until activated). Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_ADSET_UPDATE","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/adset-update","planner_rank":1,"docs":"WHAT: Update an ad set (status, budget, targeting, bid). ARGS: JSON {adset_id|id, params:{...}}. TESTS: Write op; requires act auth; create ops default status PAUSED (no spend until activated). Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_AD_CREATE","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/ad-create","planner_rank":1,"docs":"WHAT: Create an ad (defaults status PAUSED). ARGS: JSON {account_id, name, adset_id, creative:{creative_id}}. TESTS: Write op; requires act auth; create ops default status PAUSED (no spend until activated). Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_AD_UPDATE","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/ad-update","planner_rank":1,"docs":"WHAT: Update an ad (status, creative, name). ARGS: JSON {ad_id|id, params:{...}}. TESTS: Write op; requires act auth; create ops default status PAUSED (no spend until activated). Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_AUDIENCES","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/audiences","planner_rank":1,"docs":"WHAT: List custom audiences (subtype, size, operation_status). ARGS: JSON {account_id}. TESTS: Read op; live Meta Graph read. Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_AUDIENCE_CREATE","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/audience-create","planner_rank":1,"docs":"WHAT: Create a custom audience (website/customer-list/engagement). ARGS: JSON {account_id, name, subtype, rule?|customer_file_source?, description?, retention_days?}. TESTS: Write op; requires act auth; create ops default status PAUSED (no spend until activated). Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_BUDGET_SET","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/budget-set","planner_rank":1,"docs":"WHAT: Set daily or lifetime budget (minor units / cents) on a campaign or ad set. ARGS: JSON {id, daily_budget?|lifetime_budget?}. TESTS: Write op; requires act auth; create ops default status PAUSED (no spend until activated). Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_BUSINESSES","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/businesses","planner_rank":1,"docs":"WHAT: List every Business Manager the user can access (id, name, verification_status). ARGS: JSON {} (no args). TESTS: Read op; live /me/businesses."},{"key":"META_ADS_CAMPAIGNS","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/campaigns","planner_rank":1,"docs":"WHAT: List campaigns in an ad account (id,name,status,objective,budgets,times). ARGS: JSON {account_id}. TESTS: Read op; live Meta Graph read. Full op index: GET/POST /api/marketing/meta."},{"key":"META_ADS_CAMPAIGN_CREATE","type":"http","category":"marketing","target":"POST https://miscsubjects.com/api/marketing/meta/campaign-create","planner_rank":1,"docs":"WHAT: Create a campaign (defaults status PAUSED so it does not spend until activated). ARGS: JSON {account_id, name, objective, status?, special_ad_categories?, buying_type?, bid_strategy?, daily_budget?, lifetime_budget?}. TESTS: Write op; requires act auth; create ops default status PAUSED (no spend until activated). Full op index: GET/POST /api/marketing/meta."}]}