patchrelay 0.55.2 → 0.56.0

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,6 @@
1
1
  {
2
2
  "service": "patchrelay",
3
- "version": "0.55.2",
4
- "commit": "8e07dee509b9",
5
- "builtAt": "2026-05-01T14:20:04.619Z"
3
+ "version": "0.56.0",
4
+ "commit": "43aa8a020a26",
5
+ "builtAt": "2026-05-01T14:26:54.243Z"
6
6
  }
@@ -42,6 +42,12 @@ export function buildAlreadyRunningThought(runType) {
42
42
  body: `PatchRelay is already working on the ${lowerRunTypeLabel(runType)} workflow.`,
43
43
  };
44
44
  }
45
+ export function buildAgentSessionAcknowledgementThought() {
46
+ return {
47
+ type: "thought",
48
+ body: "PatchRelay received this agent session and is checking the issue state.",
49
+ };
50
+ }
45
51
  export function buildBlockedDelegationActivity(blockedByKeys = []) {
46
52
  const blockers = blockedByKeys.filter((key) => key.trim().length > 0);
47
53
  const blockerText = blockers.length > 0
@@ -74,6 +74,7 @@ export class WebhookHandler {
74
74
  this.db.webhookEvents.markWebhookProcessed(webhookEventId, "processed");
75
75
  return;
76
76
  }
77
+ await this.agentSessionHandler.acknowledgeCreated(normalized);
77
78
  const routed = await this.contextLoader.load(normalized);
78
79
  const project = routed?.project;
79
80
  if (!project) {
@@ -1,7 +1,7 @@
1
1
  import { buildAgentSessionPlanForIssue, } from "../agent-session-plan.js";
2
2
  import { buildAgentSessionExternalUrls } from "../agent-session-presentation.js";
3
- import { buildAlreadyRunningThought, buildBlockedDelegationActivity, buildDelegationThought, buildPromptDeliveredThought, buildStopConfirmationActivity, } from "../linear-session-reporting.js";
4
- import { triggerEventAllowed } from "../project-resolution.js";
3
+ import { buildAlreadyRunningThought, buildAgentSessionAcknowledgementThought, buildBlockedDelegationActivity, buildDelegationThought, buildPromptDeliveredThought, buildStopConfirmationActivity, } from "../linear-session-reporting.js";
4
+ import { resolveProject, triggerEventAllowed } from "../project-resolution.js";
5
5
  const PATCHRELAY_AGENT_ACTIVITY_TYPES = new Set([
6
6
  "action",
7
7
  "elicitation",
@@ -24,6 +24,33 @@ export class AgentSessionHandler {
24
24
  this.logger = logger;
25
25
  this.feed = feed;
26
26
  }
27
+ async acknowledgeCreated(normalized) {
28
+ if (normalized.triggerEvent !== "agentSessionCreated" || !normalized.agentSession?.id || !normalized.issue) {
29
+ return;
30
+ }
31
+ const project = resolveProject(this.config, normalized.issue);
32
+ if (!project || !triggerEventAllowed(project, normalized.triggerEvent)) {
33
+ return;
34
+ }
35
+ const linear = await this.linearProvider.forProject(project.id);
36
+ if (!linear?.createAgentActivity) {
37
+ return;
38
+ }
39
+ try {
40
+ await linear.createAgentActivity({
41
+ agentSessionId: normalized.agentSession.id,
42
+ content: buildAgentSessionAcknowledgementThought(),
43
+ ephemeral: true,
44
+ });
45
+ }
46
+ catch (error) {
47
+ this.logger.warn({
48
+ agentSessionId: normalized.agentSession.id,
49
+ issueKey: normalized.issue.identifier,
50
+ error: error instanceof Error ? error.message : String(error),
51
+ }, "Failed to acknowledge Linear agent session creation");
52
+ }
53
+ }
27
54
  async handle(params) {
28
55
  const { normalized, project, trackedIssue, wakeRunType, delegated } = params;
29
56
  if (!normalized.agentSession?.id || !normalized.issue)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchrelay",
3
- "version": "0.55.2",
3
+ "version": "0.56.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {