@fangyb/ahchat-bridge 0.1.40 → 0.1.41
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 +340 -107
- package/dist/feedbackWorkerCli.cjs +30 -0
- package/dist/index.js +340 -107
- package/package.json +1 -1
|
@@ -5814,6 +5814,25 @@ Transform tasks into verifiable goals:
|
|
|
5814
5814
|
- "Refactor X" \u2192 ensure tests pass before and after.
|
|
5815
5815
|
For multi-step tasks, state a brief plan with verification checks.
|
|
5816
5816
|
`.trim();
|
|
5817
|
+
var GROUP_ONLY_SECTION_HEADERS = [
|
|
5818
|
+
"# \u7FA4\u804A\u516C\u7406\uFF08Group Chat Axiom \u2014 \u6700\u9AD8\u4F18\u5148\u7EA7\uFF09",
|
|
5819
|
+
"# Runtime payload \u2014 how to read unread messages",
|
|
5820
|
+
"# Group chat \u2014 when to speak",
|
|
5821
|
+
"# Group chat \u2014 recency & commitment",
|
|
5822
|
+
"# Length & conciseness in group chat",
|
|
5823
|
+
"# Group chat \u2014 shared task board",
|
|
5824
|
+
"# Group chat \u2014 batched inbox handling",
|
|
5825
|
+
"# \u7FA4\u804A\u4EA7\u7269\u7EAA\u5F8B\uFF08What to capture in group chats\uFF09",
|
|
5826
|
+
"# When a user joins or leaves your group"
|
|
5827
|
+
];
|
|
5828
|
+
function stripGroupOnlySections(full, headers) {
|
|
5829
|
+
const headerSet = new Set(headers);
|
|
5830
|
+
return full.split(/\n(?=# )/).filter((section) => !headerSet.has(section.split("\n", 1)[0].trim())).join("\n").trim();
|
|
5831
|
+
}
|
|
5832
|
+
var PLATFORM_AGENT_RULES_SINGLE = stripGroupOnlySections(
|
|
5833
|
+
PLATFORM_AGENT_RULES,
|
|
5834
|
+
GROUP_ONLY_SECTION_HEADERS
|
|
5835
|
+
);
|
|
5817
5836
|
var FAN_OUT_TRACE_TTL_MS = 10 * 6e4;
|
|
5818
5837
|
var MAX_FILE_SIZE = 20 * 1024 * 1024;
|
|
5819
5838
|
var MAX_IMAGE_SIZE = 10 * 1024 * 1024;
|
|
@@ -5929,6 +5948,14 @@ function assertArrayPayloadField(type, payload, field) {
|
|
|
5929
5948
|
throw invalidWsMessage(type, field);
|
|
5930
5949
|
}
|
|
5931
5950
|
}
|
|
5951
|
+
function assertWorkdirSignalsPayloadField(type, payload, field) {
|
|
5952
|
+
assertArrayPayloadField(type, payload, field);
|
|
5953
|
+
for (const [index, item] of payload[field].entries()) {
|
|
5954
|
+
if (!isPlainRecord(item) || typeof item.toolName !== "string") {
|
|
5955
|
+
throw invalidWsMessage(type, `${field}[${index}].toolName`);
|
|
5956
|
+
}
|
|
5957
|
+
}
|
|
5958
|
+
}
|
|
5932
5959
|
function assertRecordPayloadField(type, payload, field) {
|
|
5933
5960
|
if (!isPlainRecord(payload[field])) {
|
|
5934
5961
|
throw invalidWsMessage(type, field);
|
|
@@ -6009,6 +6036,9 @@ function validateWSMessageShape(msg) {
|
|
|
6009
6036
|
"traceId"
|
|
6010
6037
|
]);
|
|
6011
6038
|
assertArrayPayloadField(type, payload, "contentBlocks");
|
|
6039
|
+
if ("workdirSignals" in payload && payload.workdirSignals !== void 0) {
|
|
6040
|
+
assertWorkdirSignalsPayloadField(type, payload, "workdirSignals");
|
|
6041
|
+
}
|
|
6012
6042
|
return;
|
|
6013
6043
|
}
|
|
6014
6044
|
case "agent:turn_complete": {
|