@agentworkforce/sage 1.1.1 → 1.1.3
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/app.d.ts.map +1 -1
- package/dist/app.js +11 -3
- package/dist/skills/builtin.d.ts +1 -0
- package/dist/skills/builtin.d.ts.map +1 -1
- package/dist/skills/builtin.js +3 -1
- package/package.json +1 -1
package/dist/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AA0C5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAwB/C,UAAU,YAAY;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,KAAK,MAAM,GAAG;IACZ,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,YAAY,CAAC;CACzB,CAAC;AA8tCF,wBAAgB,aAAa,IAAI,IAAI,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AA0C5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAwB/C,UAAU,YAAY;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,KAAK,MAAM,GAAG;IACZ,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,YAAY,CAAC;CACzB,CAAC;AA8tCF,wBAAgB,aAAa,IAAI,IAAI,CAAC,MAAM,CAAC,CAshB5C"}
|
package/dist/app.js
CHANGED
|
@@ -1322,14 +1322,22 @@ export function createSageApp() {
|
|
|
1322
1322
|
if (event.type === "message" && event.threadTs) {
|
|
1323
1323
|
const isActive = await isActiveThread(c.env.THREADS, event.threadTs);
|
|
1324
1324
|
if (!isActive) {
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
await markActiveThread(c.env.THREADS, event.threadTs, { workspaceId, channel: event.channel });
|
|
1325
|
+
console.log(`[sage] Dropping thread reply on inactive thread: threadTs=${event.threadTs}`);
|
|
1326
|
+
return c.json({ ok: true });
|
|
1328
1327
|
}
|
|
1329
1328
|
}
|
|
1330
1329
|
if (!event.userId || (workspaceSlackBotUserId && event.userId === workspaceSlackBotUserId)) {
|
|
1331
1330
|
return c.json({ ok: true });
|
|
1332
1331
|
}
|
|
1332
|
+
if (event.type === "mention") {
|
|
1333
|
+
const mentionThreadTs = event.threadTs ?? event.ts;
|
|
1334
|
+
if (mentionThreadTs) {
|
|
1335
|
+
await markActiveThread(c.env.THREADS, mentionThreadTs, {
|
|
1336
|
+
workspaceId,
|
|
1337
|
+
channel: event.channel,
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1333
1341
|
const rateLimitResult = await getRateLimiter(c.env).limit({ key: `${workspaceId}:${event.userId}` });
|
|
1334
1342
|
if (!rateLimitResult.success) {
|
|
1335
1343
|
const postResult = await slack.postMessageChunked(event.channel, "You're sending messages too quickly. Please wait a moment.", event.threadTs ?? event.ts, MAX_REPLY_CHARS);
|
package/dist/skills/builtin.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SkillRegistry } from "./registry.js";
|
|
2
2
|
import type { Skill } from "./types.js";
|
|
3
|
+
export declare const builtinPrePlanSkills: Skill[];
|
|
3
4
|
export declare const builtinReviewSkills: import("./plan-reviewers/index.js").PlanReviewer[];
|
|
4
5
|
export declare function registerBuiltinSkills(registry: SkillRegistry, extraSkills?: Skill[]): SkillRegistry;
|
|
5
6
|
//# sourceMappingURL=builtin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin.d.ts","sourceRoot":"","sources":["../../src/skills/builtin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builtin.d.ts","sourceRoot":"","sources":["../../src/skills/builtin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,oBAAoB,EAAE,KAAK,EAA4B,CAAC;AAErE,eAAO,MAAM,mBAAmB,oDAAwB,CAAC;AAEzD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,GAAE,KAAK,EAAO,GAAG,aAAa,CAgBvG"}
|
package/dist/skills/builtin.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { forcingQuestionsSkill } from "./forcing-questions.js";
|
|
1
2
|
import { allPlanReviewers, registerPlanReviewerSkills } from "./plan-reviewers/index.js";
|
|
3
|
+
export const builtinPrePlanSkills = [forcingQuestionsSkill];
|
|
2
4
|
export const builtinReviewSkills = [...allPlanReviewers];
|
|
3
5
|
export function registerBuiltinSkills(registry, extraSkills = []) {
|
|
4
|
-
for (const skill of extraSkills) {
|
|
6
|
+
for (const skill of [...builtinPrePlanSkills, ...extraSkills]) {
|
|
5
7
|
if (!registry.get(skill.id)) {
|
|
6
8
|
registry.register(skill);
|
|
7
9
|
}
|