@melaya/runner 1.1.64 → 1.1.66
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 +14 -5
- package/dist/vaults.d.ts +3 -0
- package/dist/vaults.js +9 -2
- package/package.json +1 -1
package/dist/assistantHost.py
CHANGED
|
@@ -20,7 +20,10 @@ stdout (one JSON per line, prefixed): MELASSIST {"turnId","kind",...}
|
|
|
20
20
|
Tenant safety: the toolkit is the read-only `melaya_agent_*` tools, which POST to
|
|
21
21
|
the server's assistant-tool bridge authed by MELAYA_API_KEY — every query is
|
|
22
22
|
tenant-gated SERVER-side, so this host gains no data authority beyond the user's
|
|
23
|
-
own mk_ key. Identity is never taken from tool args.
|
|
23
|
+
own mk_ key. Identity is never taken from tool args. Workspace actions
|
|
24
|
+
(melaya_tools / melaya_tool_call) go through the server's workspace-tool bridge,
|
|
25
|
+
which checks, asks for approval in Safe mode and executes; the host only carries
|
|
26
|
+
the call.
|
|
24
27
|
"""
|
|
25
28
|
from __future__ import annotations
|
|
26
29
|
|
|
@@ -1183,10 +1186,16 @@ def _build_agent():
|
|
|
1183
1186
|
"agent-orchestration platform.\n\n"
|
|
1184
1187
|
+ melaya_product
|
|
1185
1188
|
+ "\n"
|
|
1186
|
-
"IN THIS CHAT you additionally hold
|
|
1187
|
-
"
|
|
1188
|
-
"
|
|
1189
|
-
"
|
|
1189
|
+
"IN THIS CHAT you additionally hold tools over the data this user is "
|
|
1190
|
+
"allowed to see (pipelines, runs, LLM costs, plan usage, validated "
|
|
1191
|
+
"workflow templates, eval results) and melaya_tools / melaya_tool_call "
|
|
1192
|
+
"to ACT on their workspace: create a pipeline (from a template or a "
|
|
1193
|
+
"config), preview, save, run, schedule, add triggers, inspect runs, "
|
|
1194
|
+
"delete, manage projects and the team. Search with melaya_tools, load "
|
|
1195
|
+
"the tools you need to see their arguments, then call them with "
|
|
1196
|
+
"melaya_tool_call; changes follow the chat's autonomy mode (in Safe "
|
|
1197
|
+
"mode the user approves each one). That is your CURRENT TOOLBOX, not a "
|
|
1198
|
+
"description of Melaya"
|
|
1190
1199
|
+ (" — plus phone-control tools to drive the user's paired phone." if phone_enabled else ".")
|
|
1191
1200
|
+ "\nRules:\n"
|
|
1192
1201
|
"- Use tools to answer questions about the user's pipelines, spend, usage, "
|
package/dist/vaults.d.ts
CHANGED
|
@@ -295,6 +295,9 @@ export declare class VaultService {
|
|
|
295
295
|
args?: unknown;
|
|
296
296
|
idempotency_key?: unknown;
|
|
297
297
|
}, via: VaultVia): Promise<VaultEnvelope>;
|
|
298
|
+
/** The vault's history policy travels with each answer (as the builder does):
|
|
299
|
+
* obsidian_* tools keep excerpts out of saved logs unless it is "retain". */
|
|
300
|
+
private withHistory;
|
|
298
301
|
/** One engine op on the Python host (re-registers once after a host restart). */
|
|
299
302
|
private hostOp;
|
|
300
303
|
/** Merge the Obsidian app's availability into a vault's capability report
|
package/dist/vaults.js
CHANGED
|
@@ -792,7 +792,7 @@ export class VaultService {
|
|
|
792
792
|
if (this.o.app) {
|
|
793
793
|
const served = await this.o.app.serve({ reg, grant: appGrant, op, args, idempotencyKey: idem }).catch(() => null);
|
|
794
794
|
if (served?.kind === "env")
|
|
795
|
-
return served.env;
|
|
795
|
+
return this.withHistory(served.env, g);
|
|
796
796
|
if (served?.kind === "files")
|
|
797
797
|
args = served.args;
|
|
798
798
|
}
|
|
@@ -803,7 +803,7 @@ export class VaultService {
|
|
|
803
803
|
if (this.o.app && op === "base_query") {
|
|
804
804
|
const viaApp = await this.o.app.afterFiles({ reg, grant: appGrant, op, args }, env).catch(() => null);
|
|
805
805
|
if (viaApp)
|
|
806
|
-
return viaApp;
|
|
806
|
+
return this.withHistory(viaApp, g);
|
|
807
807
|
}
|
|
808
808
|
if (this.o.app && op === "capabilities" && env.ok) {
|
|
809
809
|
const st = await this.o.app.status(reg).catch(() => null);
|
|
@@ -814,6 +814,13 @@ export class VaultService {
|
|
|
814
814
|
e.app = { cli: st.cli, rest: st.rest, version: st.version, features: st.features };
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
+
return this.withHistory(env, g);
|
|
818
|
+
}
|
|
819
|
+
/** The vault's history policy travels with each answer (as the builder does):
|
|
820
|
+
* obsidian_* tools keep excerpts out of saved logs unless it is "retain". */
|
|
821
|
+
withHistory(env, g) {
|
|
822
|
+
if (env && typeof env === "object" && env.ok)
|
|
823
|
+
env.history = g.history === "retain" ? "retain" : "reference";
|
|
817
824
|
return env;
|
|
818
825
|
}
|
|
819
826
|
/** One engine op on the Python host (re-registers once after a host restart). */
|