@femtomc/mu-agent 26.2.48 → 26.2.50
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messaging-setup.d.ts","sourceRoot":"","sources":["../../src/extensions/messaging-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,YAAY,EAA6C,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"messaging-setup.d.ts","sourceRoot":"","sources":["../../src/extensions/messaging-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,YAAY,EAA6C,MAAM,+BAA+B,CAAC;AAuiC7G,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,YAAY,QA+PvD;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -761,19 +761,15 @@ function buildAgentSetupPrompt(opts) {
|
|
|
761
761
|
const normalizedBase = normalizePublicBaseUrl(opts.publicBaseUrl);
|
|
762
762
|
const webhookUrl = normalizedBase ? `${normalizedBase}${opts.plan.route}` : opts.plan.webhook_url;
|
|
763
763
|
const verifyFlag = normalizedBase ? ` --public-base-url ${normalizedBase}` : "";
|
|
764
|
-
const notesBlock = opts.check.notes.length > 0 ? `[Notes]\n${opts.check.notes.map((n) => `- ${n}`).join("\n")}` : "";
|
|
765
764
|
return interpolateTemplate(MESSAGING_SETUP_BRIEF_TEMPLATE, {
|
|
766
765
|
adapter_name: adapter.name,
|
|
767
|
-
action: opts.action,
|
|
768
766
|
state: opts.check.state,
|
|
769
|
-
|
|
767
|
+
config_path: opts.configPath ?? ".mu/config.json",
|
|
770
768
|
route: opts.plan.route,
|
|
771
769
|
webhook_url: webhookUrl ?? "(need public base URL)",
|
|
772
770
|
missing_fields: opts.check.missing.join(", ") || "(none)",
|
|
773
|
-
next_step: opts.check.next_step,
|
|
774
771
|
provider_steps: adapter.providerSetupSteps.map((step, index) => `${index + 1}. ${step}`).join("\n"),
|
|
775
772
|
field_status: adapterFieldStatusLines(adapter, opts.check).join("\n"),
|
|
776
|
-
notes: notesBlock,
|
|
777
773
|
verify_command: `/mu-setup verify ${adapter.id}${verifyFlag}`,
|
|
778
774
|
});
|
|
779
775
|
}
|
|
@@ -797,9 +793,9 @@ async function maybeDispatchAgentSetupBrief(opts) {
|
|
|
797
793
|
return false;
|
|
798
794
|
const plan = buildPlan(check, opts.parsed.publicBaseUrl);
|
|
799
795
|
const prompt = buildAgentSetupPrompt({
|
|
800
|
-
action: opts.parsed.action,
|
|
801
796
|
check,
|
|
802
797
|
plan,
|
|
798
|
+
configPath: opts.runtime.configPath,
|
|
803
799
|
publicBaseUrl: opts.parsed.publicBaseUrl,
|
|
804
800
|
});
|
|
805
801
|
dispatchSetupPromptToAgent(opts.pi, opts.ctx, prompt);
|
|
@@ -915,9 +911,9 @@ export function messagingSetupExtension(pi) {
|
|
|
915
911
|
}
|
|
916
912
|
const plan = buildPlan(check, params.public_base_url);
|
|
917
913
|
const brief = buildAgentSetupPrompt({
|
|
918
|
-
action: params.action,
|
|
919
914
|
check,
|
|
920
915
|
plan,
|
|
916
|
+
configPath: runtime.configPath,
|
|
921
917
|
publicBaseUrl: params.public_base_url,
|
|
922
918
|
});
|
|
923
919
|
return textResult(brief, { checks, runtime, adapter: adapterId, plan });
|
|
@@ -1003,7 +999,7 @@ export function messagingSetupExtension(pi) {
|
|
|
1003
999
|
}
|
|
1004
1000
|
case "preflight": {
|
|
1005
1001
|
const { checks, runtime } = await collectChecksCached(0);
|
|
1006
|
-
if (await maybeDispatchAgentSetupBrief({ pi, ctx, parsed, checks })) {
|
|
1002
|
+
if (await maybeDispatchAgentSetupBrief({ pi, ctx, parsed, checks, runtime })) {
|
|
1007
1003
|
if (runtime.fetchError) {
|
|
1008
1004
|
ctx.ui.notify(`runtime note: ${runtime.fetchError}`, "warning");
|
|
1009
1005
|
}
|
|
@@ -1016,7 +1012,7 @@ export function messagingSetupExtension(pi) {
|
|
|
1016
1012
|
}
|
|
1017
1013
|
case "guide": {
|
|
1018
1014
|
const { checks, runtime } = await collectChecksCached(0);
|
|
1019
|
-
if (await maybeDispatchAgentSetupBrief({ pi, ctx, parsed, checks })) {
|
|
1015
|
+
if (await maybeDispatchAgentSetupBrief({ pi, ctx, parsed, checks, runtime })) {
|
|
1020
1016
|
if (runtime.fetchError) {
|
|
1021
1017
|
ctx.ui.notify(`runtime note: ${runtime.fetchError}`, "warning");
|
|
1022
1018
|
}
|
|
@@ -1031,8 +1027,8 @@ export function messagingSetupExtension(pi) {
|
|
|
1031
1027
|
return;
|
|
1032
1028
|
}
|
|
1033
1029
|
case "plan": {
|
|
1034
|
-
const { checks } = await collectChecksCached(0);
|
|
1035
|
-
if (await maybeDispatchAgentSetupBrief({ pi, ctx, parsed, checks })) {
|
|
1030
|
+
const { checks, runtime } = await collectChecksCached(0);
|
|
1031
|
+
if (await maybeDispatchAgentSetupBrief({ pi, ctx, parsed, checks, runtime })) {
|
|
1036
1032
|
await refreshMessagingStatus(ctx);
|
|
1037
1033
|
return;
|
|
1038
1034
|
}
|
|
@@ -1056,8 +1052,8 @@ export function messagingSetupExtension(pi) {
|
|
|
1056
1052
|
return;
|
|
1057
1053
|
}
|
|
1058
1054
|
case "verify": {
|
|
1059
|
-
const { checks } = await collectChecksCached(0);
|
|
1060
|
-
if (await maybeDispatchAgentSetupBrief({ pi, ctx, parsed, checks })) {
|
|
1055
|
+
const { checks, runtime } = await collectChecksCached(0);
|
|
1056
|
+
if (await maybeDispatchAgentSetupBrief({ pi, ctx, parsed, checks, runtime })) {
|
|
1061
1057
|
await refreshMessagingStatus(ctx);
|
|
1062
1058
|
return;
|
|
1063
1059
|
}
|
package/dist/session_factory.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createMuResourceLoader, resolveModel } from "./pi_sdk_backend.js";
|
|
|
3
3
|
export async function createMuSession(opts) {
|
|
4
4
|
const { AuthStorage, createAgentSession, SessionManager, SettingsManager } = await import("@mariozechner/pi-coding-agent");
|
|
5
5
|
const authStorage = new AuthStorage();
|
|
6
|
-
const defaultModel = "
|
|
6
|
+
const defaultModel = "gpt-5.3-codex";
|
|
7
7
|
const modelId = opts.model ?? defaultModel;
|
|
8
8
|
const model = resolveModel(modelId, authStorage, opts.provider);
|
|
9
9
|
if (!model) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@femtomc/mu-agent",
|
|
3
|
-
"version": "26.2.
|
|
3
|
+
"version": "26.2.50",
|
|
4
4
|
"description": "Shared agent runtime for mu chat, orchestration roles, and serve extensions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mu",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"prompts/**"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@femtomc/mu-core": "26.2.
|
|
26
|
+
"@femtomc/mu-core": "26.2.50",
|
|
27
27
|
"@mariozechner/pi-agent-core": "^0.52.12",
|
|
28
28
|
"@mariozechner/pi-ai": "^0.52.12",
|
|
29
29
|
"@mariozechner/pi-coding-agent": "^0.52.12",
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
Treat diagnostics below as authoritative and guide me step-by-step.
|
|
1
|
+
Set up {{adapter_name}} messaging for mu control-plane. You have Bash, Read, Write, and Edit tools — use them to do the setup yourself.
|
|
3
2
|
|
|
4
|
-
[
|
|
5
|
-
action: {{action}}
|
|
3
|
+
[Diagnostics]
|
|
6
4
|
state: {{state}}
|
|
7
|
-
|
|
5
|
+
config: {{config_path}}
|
|
8
6
|
route: {{route}}
|
|
9
|
-
|
|
10
|
-
missing
|
|
11
|
-
next step: {{next_step}}
|
|
7
|
+
webhook URL: {{webhook_url}}
|
|
8
|
+
missing fields: {{missing_fields}}
|
|
12
9
|
|
|
13
|
-
[
|
|
14
|
-
{{provider_steps}}
|
|
15
|
-
|
|
16
|
-
[Current config field status]
|
|
10
|
+
[Config field status]
|
|
17
11
|
{{field_status}}
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
[Provider setup steps]
|
|
14
|
+
{{provider_steps}}
|
|
15
|
+
|
|
16
|
+
[Instructions]
|
|
17
|
+
1) Ask the user ONLY for values you cannot generate: secrets from external providers (e.g. bot tokens from @BotFather), public base URL.
|
|
18
|
+
2) Generate values you CAN create yourself (e.g. webhook_secret — run `openssl rand -hex 32` via Bash).
|
|
19
|
+
3) Use your tools to write the config file directly, call provider APIs (curl via Bash), and complete setup end-to-end.
|
|
20
|
+
4) After setup, run {{verify_command}} to confirm everything works.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
1) Ask for any missing values (secrets, public base URL, etc).
|
|
23
|
-
2) Give exact provider-console steps and copy/paste commands.
|
|
24
|
-
3) Finish with verification instructions using: {{verify_command}}
|
|
22
|
+
Do NOT give the user copy-paste commands. Do the work yourself.
|