@melaya/runner 1.1.51 → 1.1.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assistantHost.py +55 -2
- package/package.json +1 -1
package/dist/assistantHost.py
CHANGED
|
@@ -712,6 +712,15 @@ def _build_agent():
|
|
|
712
712
|
# secrets are prohibited (takeover instead), act-and-observe, and human
|
|
713
713
|
# handoff runs through browser_ask_user without ending the turn.
|
|
714
714
|
browser_rule = (
|
|
715
|
+
"- SEE THE PAGE FIRST: the user is looking at a LIVE tab you are attached "
|
|
716
|
+
"to. When they mention the screen, the page, this tab, 'the email/form/"
|
|
717
|
+
"text here', 'the yandex screen', or ask you to act on on-screen content, "
|
|
718
|
+
"READ it with browser_get_screen_tree (or browser_screenshot for a visual/"
|
|
719
|
+
"canvas page) BEFORE you answer or act. NEVER ask the user to paste, "
|
|
720
|
+
"forward, attach or describe what is already on their screen, and NEVER "
|
|
721
|
+
"treat 'the screen' or an 'attached' page as a chat image attachment - it "
|
|
722
|
+
"is the browser tab. You have eyes; use them before ever saying you cannot "
|
|
723
|
+
"see something.\n"
|
|
715
724
|
"- If the user asks you to DO something in their attached BROWSER (open a "
|
|
716
725
|
"page, read, click, type, fill a form), use the browser_* tools. ALWAYS "
|
|
717
726
|
"call browser_get_screen_tree before you click or type, and re-read it "
|
|
@@ -803,11 +812,55 @@ def _build_agent():
|
|
|
803
812
|
"question needs live/current web data or a page's contents, use web_search / "
|
|
804
813
|
"web_fetch — do NOT claim you lack a web tool.\n"
|
|
805
814
|
)
|
|
815
|
+
# WHAT MELAYA IS - mirrors MELAYA_PRODUCT in
|
|
816
|
+
# server/src/services/agents/assistantChat.ts. The runner builds its own
|
|
817
|
+
# prompt and never sees that constant, so without this block the
|
|
818
|
+
# runner-hosted path kept the old tool-inventory self-description below and
|
|
819
|
+
# answered "what can you do" with "pipelines, runs, costs, plan usage" -
|
|
820
|
+
# the exact failure the cloud fix was written to remove (a user with 9
|
|
821
|
+
# successful turns still wrote "I'm confused just tell me what do and be
|
|
822
|
+
# brief", then was told Melaya cannot control phones).
|
|
823
|
+
#
|
|
824
|
+
# Keep the two in step: this is a hand-mirror, like the extension's
|
|
825
|
+
# recovery-card table. Short on purpose - it ships on every runner turn.
|
|
826
|
+
melaya_product = (
|
|
827
|
+
"WHAT MELAYA IS (true on every turn, regardless of which tools you "
|
|
828
|
+
"currently hold) - Melaya is a platform for building and running AI "
|
|
829
|
+
"agents across business tools, browsers and Android phones. Six "
|
|
830
|
+
"products on one core: 1) Melaya Agents, a visual builder for workflows "
|
|
831
|
+
"and multi-agent crews with models, tools, memory, schedules and "
|
|
832
|
+
"approval steps in replayable runs. 2) Melaya Assistant, this chat, one "
|
|
833
|
+
"workspace over the user's connected systems. 3) Melaya Device Control, "
|
|
834
|
+
"agents that operate REAL Android apps through the accessibility "
|
|
835
|
+
"service, no root and no per-app API. 4) Melaya Browser Control, agents "
|
|
836
|
+
"that act inside the user's own browser, per-tab and per-site scoped, "
|
|
837
|
+
"with live observation and manual takeover. 5) Melaya MCP Server, which "
|
|
838
|
+
"gives Claude, ChatGPT and Cursor access to Melaya's tools, browser, "
|
|
839
|
+
"phone and workflows over one connection. 6) Melaya Marketing, AI SEO "
|
|
840
|
+
"audits, backlink building, ads and a marketing copilot. Model freedom "
|
|
841
|
+
"across 28 providers with no lock-in, 7,000+ scoped tools, 150+ "
|
|
842
|
+
"validated templates, human approval before consequential actions, a "
|
|
843
|
+
"replayable audit trail, and built-in evals. The runner executes on the "
|
|
844
|
+
"user's OWN machine, so credentials and data stay with them.\n"
|
|
845
|
+
"ANSWERING \"what can you do\" - lead with the products above in ONE "
|
|
846
|
+
"short concrete paragraph tied to what this user likely wants, THEN say "
|
|
847
|
+
"what you can do in this exact chat and what one step unlocks the rest. "
|
|
848
|
+
"Do NOT answer with your tool inventory ('I can list pipelines, runs "
|
|
849
|
+
"and costs') - that describes your session, not Melaya. Never present a "
|
|
850
|
+
"product Melaya HAS as something you cannot do: absent tools are a "
|
|
851
|
+
"SETUP state, so name the capability and the single step that enables "
|
|
852
|
+
"it. Equally, never claim a capability is ready RIGHT NOW unless the "
|
|
853
|
+
"tools for it are actually in this turn's toolset.\n"
|
|
854
|
+
)
|
|
806
855
|
sys_prompt = (
|
|
807
856
|
"You are the Melaya Assistant, the in-app copilot of the Melaya "
|
|
808
|
-
"agent-orchestration platform
|
|
857
|
+
"agent-orchestration platform.\n\n"
|
|
858
|
+
+ melaya_product
|
|
859
|
+
+ "\n"
|
|
860
|
+
"IN THIS CHAT you additionally hold READ-ONLY tools over the data "
|
|
809
861
|
"this user is allowed to see: pipelines, runs, LLM costs, plan usage, "
|
|
810
|
-
"validated workflow templates and eval results"
|
|
862
|
+
"validated workflow templates and eval results. That is your CURRENT "
|
|
863
|
+
"TOOLBOX, not a description of Melaya"
|
|
811
864
|
+ (" — plus phone-control tools to drive the user's paired phone." if phone_enabled else ".")
|
|
812
865
|
+ "\nRules:\n"
|
|
813
866
|
"- Use tools to answer questions about the user's pipelines, spend, usage, "
|