@rallycry/conveyor-agent 11.1.4 → 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
@@ -1571,6 +1571,11 @@ var GetProjectTagRequestSchema = z7.object({
1571
1571
  /** Tag id or exact (case-insensitive) tag name. */
1572
1572
  tag: z7.string().min(1).max(100)
1573
1573
  });
1574
+ var GetProjectSchemaPageRequestSchema = z7.object({
1575
+ projectId: z7.string(),
1576
+ /** Model name, exactly as its page is named (`Task` → `Task.md`). Omit for the index page. */
1577
+ model: z7.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(100).optional()
1578
+ });
1574
1579
  var ListProjectTagAttachmentsRequestSchema = z7.object({
1575
1580
  projectId: z7.string(),
1576
1581
  /** Tag id or exact (case-insensitive) tag name. */
@@ -2868,6 +2873,9 @@ var PERSONAL_LOCAL_REGISTRY_HOST = `${PERSONAL_LOCAL_REGISTRY_NAME}.${PERSONAL_L
2868
2873
  var PERSONAL_LOCAL_REGISTRY_NODE_ENDPOINT = `http://127.0.0.1:${PERSONAL_LOCAL_REGISTRY_PORT}`;
2869
2874
  var MS_PER_DAY = 24 * 60 * 60 * 1e3;
2870
2875
  var MENTION_TOKEN_REGEX = /@\[(\w+):([^\]]+)\]/g;
2876
+ function serializeMention(type, id) {
2877
+ return `@[${type}:${id}]`;
2878
+ }
2871
2879
  function parseMentions(content) {
2872
2880
  const tokens = [];
2873
2881
  for (const match of content.matchAll(MENTION_TOKEN_REGEX)) {
@@ -2875,6 +2883,22 @@ function parseMentions(content) {
2875
2883
  }
2876
2884
  return tokens;
2877
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
+ }
2878
2902
  var POSTGRES_ENV = {
2879
2903
  POSTGRES_HOST_AUTH_METHOD: "trust",
2880
2904
  POSTGRES_DB: "conveyor"
@@ -5231,6 +5255,7 @@ var channelMessageDTOSchema = schemaOf()(
5231
5255
  z28.object({
5232
5256
  id: z28.string(),
5233
5257
  authorName: z28.string().nullable(),
5258
+ authorMention: z28.string().optional(),
5234
5259
  authorIsBot: z28.boolean(),
5235
5260
  text: z28.string(),
5236
5261
  ts: z28.string(),
@@ -8513,6 +8538,17 @@ var getProjectConnectUrlsResponseSchema = schemaOf()(projectConnectUrlsSchema);
8513
8538
  var getProjectDecisionResponseSchema = schemaOf()(projectDecisionDetailSchema);
8514
8539
  var getProjectOnboardingStatusResponseSchema = schemaOf()(readinessReportSchema);
8515
8540
  var getProjectOnboardingStepResponseSchema = schemaOf()(onboardingStepReportSchema);
8541
+ var getProjectSchemaPageResponseSchema = schemaOf()(
8542
+ z57.object({
8543
+ docsPath: z57.string(),
8544
+ model: z57.string().nullable(),
8545
+ path: z57.string(),
8546
+ content: z57.string(),
8547
+ diagram: z57.string().nullable(),
8548
+ syncedAt: z57.string(),
8549
+ models: z57.array(z57.string())
8550
+ })
8551
+ );
8516
8552
  var getProjectSummaryResponseSchema = schemaOf()(
8517
8553
  z57.object({
8518
8554
  project: z57.object({
@@ -9815,6 +9851,11 @@ var agentSessionContract = defineContract("agentSessionService", {
9815
9851
  output: standard(getProjectTagResponseSchema),
9816
9852
  describe: "Returns one glossary tag in full for a card's agent and the conveyor-mcp server: overview, context links with their check status, parent and child tags, card and attachment counts, and recent revisions."
9817
9853
  }),
9854
+ getProjectSchemaPage: query({
9855
+ input: GetProjectSchemaPageRequestSchema,
9856
+ output: standard(getProjectSchemaPageResponseSchema),
9857
+ describe: "Returns one generated schema page of the project, as its docs mirror holds it from the dev branch: the page markdown, its first mermaid diagram, and the names of every model that has a page. Without a model it returns the index page. For a card's agent and the conveyor-mcp server."
9858
+ }),
9818
9859
  listProjectSubtasks: query({
9819
9860
  input: ListProjectSubtasksRequestSchema,
9820
9861
  output: standard(listProjectSubtasksResponseSchema),
@@ -9918,7 +9959,7 @@ var agentSessionContract = defineContract("agentSessionService", {
9918
9959
  listProjectMembers: query({
9919
9960
  input: ListProjectMembersRequestSchema,
9920
9961
  output: standard(listProjectMembersResponseSchema),
9921
- 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."
9922
9963
  }),
9923
9964
  listProjectTags: query({
9924
9965
  input: ListProjectTagsRequestSchema,
@@ -10756,7 +10797,7 @@ var cardContract = defineContract("cardService", {
10756
10797
  ["id", "asc"]
10757
10798
  ],
10758
10799
  // One card per page unless the subscriber asks for more: a board loads
10759
- // 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)
10760
10801
  // the index of an item with a `map` reads the item's whole `select`, the
10761
10802
  // card's relations, for every card of the scope on each subscribe. The
10762
10803
  // board's index is `boardRows`, whose item is a small select.
@@ -17009,10 +17050,24 @@ var AgentConnection = class _AgentConnection {
17009
17050
  }
17010
17051
  const max = _AgentConnection.DEDUP_PREVIEW_LIMIT;
17011
17052
  const preview = content.length > max ? content.slice(0, max) + "\u2026" : content;
17012
- this.recentMessages.push({ words, timestamp: now, preview });
17053
+ this.recentMessages.push({ words, timestamp: now, preview, content });
17013
17054
  if (this.recentMessages.length > 3) this.recentMessages.shift();
17014
17055
  return { duplicate: false };
17015
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
+ }
17016
17071
  /**
17017
17072
  * @param loopStatus overrides the status derived from the last emitted
17018
17073
  * runner status. SessionRunner passes it so an idle runner that still has
@@ -18555,6 +18610,7 @@ export {
18555
18610
  isCodexReasoningEffort,
18556
18611
  HUMAN_PROSE_WRITING_STYLE,
18557
18612
  parseMentions,
18613
+ toMemberMentionRows,
18558
18614
  POD_PROFILE_ENV,
18559
18615
  podProfileRunsWorkload,
18560
18616
  isPodProfile,