@clawos-dev/clawd 0.2.436 → 0.2.437
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/cli.cjs
CHANGED
|
@@ -9157,8 +9157,8 @@ var init_visitor_schemas = __esm({
|
|
|
9157
9157
|
function formatLarkSpeakerReminder(speaker) {
|
|
9158
9158
|
return `<system-reminder>\u6B64\u6D88\u606F\u6765\u81EA\u98DE\u4E66\u7FA4\u6210\u5458 ${speaker}</system-reminder>`;
|
|
9159
9159
|
}
|
|
9160
|
-
function formatSenderAttribution(sender) {
|
|
9161
|
-
if (sender.principal === "owner") return "";
|
|
9160
|
+
function formatSenderAttribution(sender, declaredParty) {
|
|
9161
|
+
if (sender.principal === "owner" && declaredParty === "owner") return "";
|
|
9162
9162
|
if (!sender.displayName) return "";
|
|
9163
9163
|
return `<system-reminder>\u6B64\u6D88\u606F\u6765\u81EA ${sender.principal}\uFF1A${sender.displayName}</system-reminder>`;
|
|
9164
9164
|
}
|
|
@@ -44934,7 +44934,7 @@ function renderIdentityLines(fields) {
|
|
|
44934
44934
|
function buildConnectionPrompt(args) {
|
|
44935
44935
|
const parts = ["# \u8FDE\u63A5\u4E0A\u4E0B\u6587"];
|
|
44936
44936
|
if (args.mode === "owner") {
|
|
44937
|
-
parts.push("\
|
|
44937
|
+
parts.push("\u5F00\u8FD9\u4E2A session \u7684\u8FDE\u63A5\u65B9\uFF08\u5C31\u662F owner \u672C\u4EBA\uFF09\uFF1A");
|
|
44938
44938
|
parts.push(
|
|
44939
44939
|
renderIdentityLines({
|
|
44940
44940
|
label: args.ownerLabel,
|
|
@@ -44943,7 +44943,7 @@ function buildConnectionPrompt(args) {
|
|
|
44943
44943
|
})
|
|
44944
44944
|
);
|
|
44945
44945
|
} else {
|
|
44946
|
-
parts.push("\
|
|
44946
|
+
parts.push("\u5F00\u8FD9\u4E2A session \u7684\u8FDE\u63A5\u65B9\uFF08\u4E0D\u662F owner \u672C\u4EBA\uFF09\uFF1A");
|
|
44947
44947
|
parts.push(
|
|
44948
44948
|
renderIdentityLines({
|
|
44949
44949
|
label: args.guestLabel,
|
|
@@ -44962,6 +44962,10 @@ function buildConnectionPrompt(args) {
|
|
|
44962
44962
|
})
|
|
44963
44963
|
);
|
|
44964
44964
|
}
|
|
44965
|
+
parts.push("");
|
|
44966
|
+
parts.push(
|
|
44967
|
+
`\u4E0A\u9762\u5199\u7684\u662F\u5F00\u8FD9\u4E2A session \u7684\u4EBA\uFF0C\u4E4B\u540E\u7684\u6D88\u606F\u4E0D\u4E00\u5B9A\u90FD\u6765\u81EA\u4ED6 \u2014\u2014 \u4E2D\u9014\u53EF\u80FD\u6362\u4EBA\u8BF4\u8BDD\uFF0C\u6BD4\u5982 ${args.mode === "owner" ? "guest \u4ECE\u522B\u7684\u8BBE\u5907\u8FDE\u8FDB\u6765" : "owner \u672C\u4EBA\u8FDB\u6765"}\u63A5\u4E00\u53E5\u3002\u6D88\u606F\u5C3E\u90E8\u5E26 <system-reminder>\u6B64\u6D88\u606F\u6765\u81EA owner\uFF0Fguest\uFF1A\u67D0\u67D0</system-reminder> \u65F6\uFF0C\u4EE5\u5C3E\u6CE8\u91CC\u7684\u4EBA\u4E3A\u51C6\uFF1B\u6CA1\u6709\u5C3E\u6CE8\u5C31\u662F\u4E0A\u9762\u8FD9\u4F4D\u3002`
|
|
44968
|
+
);
|
|
44965
44969
|
if (args.workDir) {
|
|
44966
44970
|
parts.push("");
|
|
44967
44971
|
let line = `\u4F60\u7684\u6587\u4EF6\u5DE5\u4F5C\u76EE\u5F55\u662F ${args.workDir}\uFF0C\u8FD9\u4E2A\u76EE\u5F55\u5BF9\u4F60\u53EF\u8BFB\u53EF\u5199\uFF0C\u6587\u4EF6\u7684\u8BFB\u53D6/\u521B\u5EFA/\u4FEE\u6539\u90FD\u5728\u8FD9\u91CC\u8FDB\u884C\u3002`;
|
|
@@ -44975,7 +44979,7 @@ function buildConnectionPrompt(args) {
|
|
|
44975
44979
|
if (args.mode === "guest" && args.guestDeviceId) {
|
|
44976
44980
|
parts.push("");
|
|
44977
44981
|
parts.push(
|
|
44978
|
-
|
|
44982
|
+
`${args.guestLabel}\u8BF4\u7684\u300C\u6211\u7684\u684C\u9762 / \u6211\u672C\u5730\u7684\u2026\u300D\u662F\u4ED6\u90A3\u53F0\u8BBE\u5907\u3001\u4E0D\u662F\u672C\u673A\uFF1B\u8981\u5728\u90A3\u8FB9\u770B\u6587\u4EF6\u6216\u8DD1\u547D\u4EE4\uFF0C\u7528 peer-ops \u7684 exec\uFF0CpeerDeviceId \u586B ${args.guestDeviceId}\u3002`
|
|
44979
44983
|
);
|
|
44980
44984
|
}
|
|
44981
44985
|
parts.push("");
|
|
@@ -61017,7 +61021,9 @@ function buildSessionHandlers(deps) {
|
|
|
61017
61021
|
deps.getOwnerIdentity().feishuUnionId
|
|
61018
61022
|
)
|
|
61019
61023
|
);
|
|
61020
|
-
const
|
|
61024
|
+
const creatorPrincipalId = manager.findOwnedSession(args.sessionId)?.creatorPrincipalId;
|
|
61025
|
+
const declaredParty = creatorPrincipalId && creatorPrincipalId !== ownerPrincipalId ? "guest" : "owner";
|
|
61026
|
+
const attribution = formatSenderAttribution(sender, declaredParty);
|
|
61021
61027
|
const outbound = attribution ? { ...args, text: `${args.text}
|
|
61022
61028
|
|
|
61023
61029
|
${attribution}` } : args;
|
|
@@ -62651,7 +62657,7 @@ function computeMethodAccess(args) {
|
|
|
62651
62657
|
}
|
|
62652
62658
|
|
|
62653
62659
|
// src/version.ts
|
|
62654
|
-
var version = "0.2.
|
|
62660
|
+
var version = "0.2.437".length > 0 ? "0.2.437" : "dev";
|
|
62655
62661
|
|
|
62656
62662
|
// src/cli-probe/probe.ts
|
|
62657
62663
|
var fs65 = __toESM(require("fs"), 1);
|