@rallycry/conveyor-agent 11.1.5 → 11.1.6

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,6 +1,9 @@
1
1
  import {
2
2
  startWorkbenchServer
3
- } from "./chunk-MFGRXD4Y.js";
3
+ } from "./chunk-LUAOWQ6W.js";
4
+ import {
5
+ oomWatchdogOptionsFromEnv
6
+ } from "./chunk-6W6UZ4SJ.js";
4
7
  import {
5
8
  TOMBSTONE_MESSAGE,
6
9
  isLegacyEntrypointLaunch
@@ -28,9 +31,6 @@ import {
28
31
  import {
29
32
  DEFAULT_WORKBENCH_PORT
30
33
  } from "./chunk-6Q6LQBWO.js";
31
- import {
32
- oomWatchdogOptionsFromEnv
33
- } from "./chunk-6W6UZ4SJ.js";
34
34
  import "./chunk-JSBRDJBE.js";
35
35
 
36
36
  // src/boot/index.ts
@@ -28,7 +28,7 @@ import {
28
28
  query,
29
29
  transportFailureOf,
30
30
  waitForConnection
31
- } from "./chunk-MILKMRPU.js";
31
+ } from "./chunk-PIHFGSXB.js";
32
32
  import {
33
33
  WorkbenchError,
34
34
  getWorkbenchClient
@@ -2873,6 +2873,9 @@ var PERSONAL_LOCAL_REGISTRY_HOST = `${PERSONAL_LOCAL_REGISTRY_NAME}.${PERSONAL_L
2873
2873
  var PERSONAL_LOCAL_REGISTRY_NODE_ENDPOINT = `http://127.0.0.1:${PERSONAL_LOCAL_REGISTRY_PORT}`;
2874
2874
  var MS_PER_DAY = 24 * 60 * 60 * 1e3;
2875
2875
  var MENTION_TOKEN_REGEX = /@\[(\w+):([^\]]+)\]/g;
2876
+ function serializeMention(type, id) {
2877
+ return `@[${type}:${id}]`;
2878
+ }
2876
2879
  function parseMentions(content) {
2877
2880
  const tokens = [];
2878
2881
  for (const match of content.matchAll(MENTION_TOKEN_REGEX)) {
@@ -2880,6 +2883,22 @@ function parseMentions(content) {
2880
2883
  }
2881
2884
  return tokens;
2882
2885
  }
2886
+ function normalizeRef(ref) {
2887
+ return ref.trim().replace(/^@/, "").trim().replace(/\s+/g, " ").toLowerCase();
2888
+ }
2889
+ function toMemberMentionRows(members, query28) {
2890
+ const needle = query28 ? normalizeRef(query28) : "";
2891
+ const rows = needle ? members.filter(
2892
+ (member) => normalizeRef(member.name ?? "").includes(needle) || member.email.toLowerCase().includes(needle)
2893
+ ) : members;
2894
+ return rows.map((member) => ({
2895
+ userId: member.userId,
2896
+ name: member.name,
2897
+ email: member.email,
2898
+ level: member.level,
2899
+ mention: serializeMention("user", member.userId)
2900
+ }));
2901
+ }
2883
2902
  var POSTGRES_ENV = {
2884
2903
  POSTGRES_HOST_AUTH_METHOD: "trust",
2885
2904
  POSTGRES_DB: "conveyor"
@@ -5236,6 +5255,7 @@ var channelMessageDTOSchema = schemaOf()(
5236
5255
  z28.object({
5237
5256
  id: z28.string(),
5238
5257
  authorName: z28.string().nullable(),
5258
+ authorMention: z28.string().optional(),
5239
5259
  authorIsBot: z28.boolean(),
5240
5260
  text: z28.string(),
5241
5261
  ts: z28.string(),
@@ -9939,7 +9959,7 @@ var agentSessionContract = defineContract("agentSessionService", {
9939
9959
  listProjectMembers: query({
9940
9960
  input: ListProjectMembersRequestSchema,
9941
9961
  output: standard(listProjectMembersResponseSchema),
9942
- describe: "Lists a project's members with user id, name, email, and role, which the conveyor-mcp server uses to turn a name or email into a user id for assignment or review."
9962
+ describe: "Lists a project's members with user id, name, email, and role. Pod agents and the conveyor-mcp server use it to resolve a person for a mention (`@[user:<id>]`), an assignment, or a review."
9943
9963
  }),
9944
9964
  listProjectTags: query({
9945
9965
  input: ListProjectTagsRequestSchema,
@@ -10777,7 +10797,7 @@ var cardContract = defineContract("cardService", {
10777
10797
  ["id", "asc"]
10778
10798
  ],
10779
10799
  // One card per page unless the subscriber asks for more: a board loads
10780
- // the cards it shows by id (`loadItems`). No `index`: on quickdraw 5.1.1
10800
+ // the cards it shows by id (`loadItems`). No `index`: on quickdraw 5.1 (still so in 5.1.4)
10781
10801
  // the index of an item with a `map` reads the item's whole `select`, the
10782
10802
  // card's relations, for every card of the scope on each subscribe. The
10783
10803
  // board's index is `boardRows`, whose item is a small select.
@@ -17030,10 +17050,24 @@ var AgentConnection = class _AgentConnection {
17030
17050
  }
17031
17051
  const max = _AgentConnection.DEDUP_PREVIEW_LIMIT;
17032
17052
  const preview = content.length > max ? content.slice(0, max) + "\u2026" : content;
17033
- this.recentMessages.push({ words, timestamp: now, preview });
17053
+ this.recentMessages.push({ words, timestamp: now, preview, content });
17034
17054
  if (this.recentMessages.length > 3) this.recentMessages.shift();
17035
17055
  return { duplicate: false };
17036
17056
  }
17057
+ /**
17058
+ * Forget a post `checkAndTrackDuplicate` tracked that then FAILED — the
17059
+ * server refused it (a mention that matched nobody) or the call never landed.
17060
+ * Without this the corrected retry, which repeats most of the same words, is
17061
+ * refused as a duplicate of a message nobody ever saw.
17062
+ */
17063
+ untrackRecentMessage(content) {
17064
+ for (let i = this.recentMessages.length - 1; i >= 0; i--) {
17065
+ if (this.recentMessages[i].content === content) {
17066
+ this.recentMessages.splice(i, 1);
17067
+ return;
17068
+ }
17069
+ }
17070
+ }
17037
17071
  /**
17038
17072
  * @param loopStatus overrides the status derived from the last emitted
17039
17073
  * runner status. SessionRunner passes it so an idle runner that still has
@@ -18576,6 +18610,7 @@ export {
18576
18610
  isCodexReasoningEffort,
18577
18611
  HUMAN_PROSE_WRITING_STYLE,
18578
18612
  parseMentions,
18613
+ toMemberMentionRows,
18579
18614
  POD_PROFILE_ENV,
18580
18615
  podProfileRunsWorkload,
18581
18616
  isPodProfile,