@parall/daemon 1.48.0 → 1.50.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.
@@ -51293,6 +51293,17 @@ function laneContextFilePath(contextDir, targetUri, threadRootId) {
51293
51293
 
51294
51294
  // ts/sdk/dist/types.js
51295
51295
  var MENTION_ALL_USER_ID = "all";
51296
+ var MENTION_ALL_HUMANS_USER_ID = "allhuman";
51297
+ var MENTION_ALL_AGENTS_USER_ID = "allagent";
51298
+ function mentionTargetsUser(mentionUserId, userId, userType) {
51299
+ if (mentionUserId === userId || mentionUserId === MENTION_ALL_USER_ID)
51300
+ return true;
51301
+ if (mentionUserId === MENTION_ALL_HUMANS_USER_ID)
51302
+ return userType === "human";
51303
+ if (mentionUserId === MENTION_ALL_AGENTS_USER_ID)
51304
+ return userType === "agent";
51305
+ return false;
51306
+ }
51296
51307
 
51297
51308
  // ts/sdk/dist/constants.js
51298
51309
  var API_BASE = "/api/v1";
@@ -51328,6 +51339,12 @@ var ENDPOINTS = {
51328
51339
  ORG_MEMBER: (orgId, userId) => `${API_BASE}/orgs/${orgId}/members/${userId}`,
51329
51340
  ORG_MEMBER_CHATS: (orgId, memberId) => `${API_BASE}/orgs/${orgId}/members/${memberId}/chats`,
51330
51341
  ORG_MEMBER_TASKS: (orgId, memberId) => `${API_BASE}/orgs/${orgId}/members/${memberId}/tasks`,
51342
+ // Org-scoped public profile (title / description). GET readable by every
51343
+ // active member; PATCH is CAS-guarded (expected_version).
51344
+ ORG_MEMBER_PROFILE: (orgId, userId) => `${API_BASE}/orgs/${orgId}/members/${userId}/profile`,
51345
+ // Private agent Instructions — visibility gated server-side
51346
+ // (agent self + Human org admin/owner). Never cached.
51347
+ AGENT_INSTRUCTIONS: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/instructions`,
51331
51348
  REF_SEARCH: (orgId) => `${API_BASE}/orgs/${orgId}/refs/search`,
51332
51349
  // Direct messages (org-scoped, atomic find-or-create + send)
51333
51350
  DM: (orgId) => `${API_BASE}/orgs/${orgId}/dm`,
@@ -51351,6 +51368,8 @@ var ENDPOINTS = {
51351
51368
  MESSAGE_WATCH: (id) => `${API_BASE}/messages/${id}/watch`,
51352
51369
  MESSAGE_WATCHERS: (id) => `${API_BASE}/messages/${id}/watchers`,
51353
51370
  MESSAGE_WATCHING: (id) => `${API_BASE}/messages/${id}/watching`,
51371
+ MESSAGE_REACTIONS: (id) => `${API_BASE}/messages/${id}/reactions`,
51372
+ MESSAGE_REACTION: (id, emoji) => `${API_BASE}/messages/${id}/reactions/${encodeURIComponent(emoji)}`,
51354
51373
  // Upload (org-scoped)
51355
51374
  UPLOAD_PRESIGN: (orgId) => `${API_BASE}/orgs/${orgId}/upload/presign`,
51356
51375
  UPLOAD_COMPLETE: (orgId) => `${API_BASE}/orgs/${orgId}/upload/complete`,
@@ -51588,11 +51607,13 @@ var ENDPOINTS = {
51588
51607
  UNREAD: `${API_BASE}/me/unread`,
51589
51608
  ORG_UNREAD: (orgId) => `${API_BASE}/orgs/${orgId}/unread`,
51590
51609
  CHAT_READ: (orgId, chatId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/read`,
51610
+ CHAT_READ_ALL: (orgId, chatId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/read-all`,
51591
51611
  THREAD_UNREAD: (orgId, chatId, threadRootId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/threads/${threadRootId}/unread`,
51592
51612
  THREAD_READ: (orgId, chatId, threadRootId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/threads/${threadRootId}/read`,
51593
51613
  // References (org-scoped)
51594
51614
  REFS_RESOLVE: (orgId) => `${API_BASE}/orgs/${orgId}/refs/resolve`,
51595
51615
  REFS_BACKLINKS: (orgId) => `${API_BASE}/orgs/${orgId}/refs/backlinks`,
51616
+ REFS_OUTBOUND: (orgId) => `${API_BASE}/orgs/${orgId}/refs/outbound`,
51596
51617
  REFS_GRAPH: (orgId) => `${API_BASE}/orgs/${orgId}/refs/graph`,
51597
51618
  REFS_CHECK: (orgId) => `${API_BASE}/orgs/${orgId}/refs/check`,
51598
51619
  // Platform config (agent-scoped, not org-scoped)
@@ -51607,6 +51628,11 @@ var ENDPOINTS = {
51607
51628
  SEARCH: (orgId) => `${API_BASE}/orgs/${orgId}/search`,
51608
51629
  // Feature flags (org-scoped, server-evaluated)
51609
51630
  FEATURE_FLAGS: (orgId) => `${API_BASE}/orgs/${orgId}/feature-flags`,
51631
+ // Team templates (org-scoped, owner/admin only)
51632
+ TEMPLATES: (orgId) => `${API_BASE}/orgs/${orgId}/templates`,
51633
+ TEMPLATE: (orgId, templateId) => `${API_BASE}/orgs/${orgId}/templates/${templateId}`,
51634
+ TEMPLATE_DEPLOYMENTS: (orgId) => `${API_BASE}/orgs/${orgId}/template-deployments`,
51635
+ TEMPLATE_DEPLOYMENT: (orgId, deploymentId) => `${API_BASE}/orgs/${orgId}/template-deployments/${deploymentId}`,
51610
51636
  // Billing & Credits (org-scoped)
51611
51637
  BILLING: (orgId) => `${API_BASE}/orgs/${orgId}/billing`,
51612
51638
  BILLING_TRANSACTIONS: (orgId) => `${API_BASE}/orgs/${orgId}/billing/transactions`,
@@ -51654,7 +51680,13 @@ var ENDPOINTS = {
51654
51680
  ORG_EDGE_DEVICE_UNREGISTER: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/unregister`,
51655
51681
  ORG_EDGE_ONBOARDING: (orgId) => `/api/v1/orgs/${orgId}/edge/onboarding`,
51656
51682
  ORG_EDGE_PROFILES: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles`,
51683
+ // Per-profile egress proxy (hosted Cloud Profiles; manager-only, human-only).
51684
+ ORG_EDGE_PROFILE_PROXY: (orgId, edgeId, profileName) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles/${encodeURIComponent(profileName)}/proxy`,
51657
51685
  ORG_EDGE_EXEC: (orgId) => `/api/v1/orgs/${orgId}/edge/exec`,
51686
+ // Cloud Edge live viewer command (V1b) — api-server, gated on cap:edge-viewer.
51687
+ // Same request/reply shape as the v2 browser-profile viewer, on the v3 edge
51688
+ // pipe. Additive: does NOT replace BROWSER_PROFILE_VIEWER_COMMAND.
51689
+ ORG_EDGE_VIEWER_COMMAND: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/viewer/command`,
51658
51690
  CLIP_CONNECTIONS: (orgId, clipId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/connections`,
51659
51691
  CLIP_CONNECTION: (orgId, connId) => `/api/v1/orgs/${orgId}/clip-connections/${connId}`,
51660
51692
  // Clip registry (v3, org-scoped, served by api-server — `crg_` entries; the
@@ -51677,6 +51709,7 @@ var WS_EVENTS = {
51677
51709
  MESSAGE_PATCH: "message.patch",
51678
51710
  MESSAGE_EDIT: "message.edit",
51679
51711
  MESSAGE_DELETE: "message.delete",
51712
+ MESSAGE_REACTION_UPDATED: "message.reaction.updated",
51680
51713
  TYPING_UPDATE: "typing.update",
51681
51714
  CHAT_UPDATE: "chat.update",
51682
51715
  CHAT_DELETED: "chat.deleted",
@@ -51718,6 +51751,7 @@ var WS_EVENTS = {
51718
51751
  INBOX_UPDATE: "inbox.update",
51719
51752
  INBOX_BULK_UPDATE: "inbox.bulk_update",
51720
51753
  READ_POSITION_UPDATED: "read_position.updated",
51754
+ THREAD_READ_POSITION_UPDATED: "thread_read_position.updated",
51721
51755
  DISPATCH_NEW: "dispatch.new",
51722
51756
  DISPATCH_RECEIVED: "dispatch.received",
51723
51757
  DISPATCH_RESOLVED: "dispatch.resolved",
@@ -51903,7 +51937,7 @@ var ParallClient = class _ParallClient {
51903
51937
  if (qs)
51904
51938
  url += `?${qs}`;
51905
51939
  }
51906
- const headers = this.buildHeaders(path11);
51940
+ const headers = this.buildHeaders(path11, opts?.headers);
51907
51941
  const timeoutSignal = AbortSignal.timeout(opts?.timeoutMs ?? 15e3);
51908
51942
  const signal = opts?.signal ? AbortSignal.any([opts.signal, timeoutSignal]) : timeoutSignal;
51909
51943
  let res;
@@ -52119,6 +52153,30 @@ var ParallClient = class _ParallClient {
52119
52153
  async updateOrgMember(orgId, userId, role) {
52120
52154
  return this.request("PATCH", ENDPOINTS.ORG_MEMBER(orgId, userId), { role });
52121
52155
  }
52156
+ /** Org-scoped public profile (title / description) of any active member. */
52157
+ async getMemberProfile(orgId, userId) {
52158
+ return this.request("GET", ENDPOINTS.ORG_MEMBER_PROFILE(orgId, userId));
52159
+ }
52160
+ /**
52161
+ * CAS full-replacement of a member's public profile. Humans edit their
52162
+ * own; Human org admins/owners edit agents'. A stale expected_version
52163
+ * gets 409 PROFILE_VERSION_CONFLICT with error.details.current_version.
52164
+ */
52165
+ async updateMemberProfile(orgId, userId, req) {
52166
+ return this.request("PATCH", ENDPOINTS.ORG_MEMBER_PROFILE(orgId, userId), req);
52167
+ }
52168
+ /** Private agent Instructions — agent self or Human org admin/owner only. */
52169
+ async getAgentInstructions(orgId, agentId) {
52170
+ return this.request("GET", ENDPOINTS.AGENT_INSTRUCTIONS(orgId, agentId));
52171
+ }
52172
+ /**
52173
+ * CAS update of the private Instructions (Human org admin/owner only).
52174
+ * A stale expected_version gets 409 INSTRUCTIONS_VERSION_CONFLICT with
52175
+ * error.details.current_version.
52176
+ */
52177
+ async updateAgentInstructions(orgId, agentId, req) {
52178
+ return this.request("PATCH", ENDPOINTS.AGENT_INSTRUCTIONS(orgId, agentId), req);
52179
+ }
52122
52180
  // Member activity surfaces — chats the member participates in within this org,
52123
52181
  // ordered by most recent activity. Powers the member profile Activity tab.
52124
52182
  async getMemberChats(orgId, memberId, params) {
@@ -52309,6 +52367,14 @@ var ParallClient = class _ParallClient {
52309
52367
  async getMessageReplies(id, params) {
52310
52368
  return this.request("GET", ENDPOINTS.MESSAGE_REPLIES(id), void 0, params);
52311
52369
  }
52370
+ // ---- Reactions ----
52371
+ async toggleReaction(messageId, emoji) {
52372
+ return this.request("PUT", ENDPOINTS.MESSAGE_REACTION(messageId, emoji));
52373
+ }
52374
+ async listReactions(messageId) {
52375
+ const res = await this.request("GET", ENDPOINTS.MESSAGE_REACTIONS(messageId));
52376
+ return res.reactions;
52377
+ }
52312
52378
  // ---- File Upload ----
52313
52379
  async getUploadPresignUrl(orgId, req) {
52314
52380
  return this.request("POST", ENDPOINTS.UPLOAD_PRESIGN(orgId), req);
@@ -52684,6 +52750,15 @@ var ParallClient = class _ParallClient {
52684
52750
  async browserViewerCommand(orgId, profileId, req, opts) {
52685
52751
  return this.request("POST", ENDPOINTS.BROWSER_PROFILE_VIEWER_COMMAND(orgId, profileId), req, void 0, false, opts);
52686
52752
  }
52753
+ /**
52754
+ * Drive the Cloud Edge live viewer (V1b, design §6): WebRTC signaling + input +
52755
+ * tab nav for a hosted browser (Cloud Profile). Same request/reply shape as
52756
+ * browserViewerCommand, on the v3 edge pipe; additive — the v2 browser-profile
52757
+ * viewer is unchanged.
52758
+ */
52759
+ async edgeViewerCommand(orgId, edgeId, req, opts) {
52760
+ return this.request("POST", ENDPOINTS.ORG_EDGE_VIEWER_COMMAND(orgId, edgeId), req, void 0, false, opts);
52761
+ }
52687
52762
  async resizeMachine(orgId, machineId, spec) {
52688
52763
  return this.request("PATCH", ENDPOINTS.MACHINE_SPEC(orgId, machineId), spec);
52689
52764
  }
@@ -52710,14 +52785,23 @@ var ParallClient = class _ParallClient {
52710
52785
  }
52711
52786
  // Wiki mount/token methods removed — wiki-service handles all wiki endpoints.
52712
52787
  // ---- Unread ----
52713
- async getUnreadCounts(orgId) {
52788
+ async getUnreadCounts(orgId, opts) {
52714
52789
  const endpoint = orgId ? ENDPOINTS.ORG_UNREAD(orgId) : ENDPOINTS.UNREAD;
52715
- const res = await this.request("GET", endpoint);
52790
+ const res = await this.request("GET", endpoint, void 0, {
52791
+ include_thread_replies: opts?.includeThreadReplies ? "true" : void 0
52792
+ });
52716
52793
  return res.data;
52717
52794
  }
52718
52795
  async markRead(orgId, chatId, messageId) {
52719
52796
  return this.request("POST", ENDPOINTS.CHAT_READ(orgId, chatId), { message_id: messageId });
52720
52797
  }
52798
+ /** Mark everything in a chat read: the channel cursor jumps to the latest
52799
+ * top-level message and every thread cursor to its latest reply, in one
52800
+ * idempotent call. The server echoes the same per-cursor WS events the
52801
+ * single-cursor routes emit and auto-clears covered inbox items. */
52802
+ async markAllRead(orgId, chatId) {
52803
+ return this.request("POST", ENDPOINTS.CHAT_READ_ALL(orgId, chatId));
52804
+ }
52721
52805
  async getThreadUnread(orgId, chatId, threadRootId) {
52722
52806
  return this.request("GET", ENDPOINTS.THREAD_UNREAD(orgId, chatId, threadRootId));
52723
52807
  }
@@ -53392,6 +53476,16 @@ var ParallClient = class _ParallClient {
53392
53476
  async getBacklinks(orgId, params) {
53393
53477
  return this.request("GET", ENDPOINTS.REFS_BACKLINKS(orgId), void 0, params);
53394
53478
  }
53479
+ /**
53480
+ * Outbound prll:// refs authored in a set of sources, as raw ref_links rows
53481
+ * (dedupe/group client-side). Pass `{ thread_root_id }` to list a whole
53482
+ * thread's refs (root + all replies, resolved server-side — the client's
53483
+ * reply window may be partial), or `{ source_type, source_ids }` for
53484
+ * explicit sources (max 500; v1 accepts only message sources).
53485
+ */
53486
+ async listOutboundRefs(orgId, req) {
53487
+ return this.request("POST", ENDPOINTS.REFS_OUTBOUND(orgId), req);
53488
+ }
53395
53489
  /**
53396
53490
  * Bounded multi-hop walk of the prll:// reference graph around `uri`. `uri`
53397
53491
  * must be an entity-level prll:// URI — a refined URI (path/query/fragment) is
@@ -53426,6 +53520,22 @@ var ParallClient = class _ParallClient {
53426
53520
  async getFeatureFlags(orgId) {
53427
53521
  return this.request("GET", ENDPOINTS.FEATURE_FLAGS(orgId));
53428
53522
  }
53523
+ // ---- Official Template catalog (org-contextual owner/admin reads + Hire) ----
53524
+ async listOfficialTemplates(orgId) {
53525
+ const response = await this.request("GET", ENDPOINTS.TEMPLATES(orgId));
53526
+ return response.templates ?? [];
53527
+ }
53528
+ async getOfficialTemplate(orgId, templateId) {
53529
+ return this.request("GET", ENDPOINTS.TEMPLATE(orgId, templateId));
53530
+ }
53531
+ async deployTemplate(orgId, request3) {
53532
+ return this.request("POST", ENDPOINTS.TEMPLATE_DEPLOYMENTS(orgId), request3, void 0, false, {
53533
+ timeoutMs: 185e3
53534
+ });
53535
+ }
53536
+ async getTemplateDeployment(orgId, deploymentId) {
53537
+ return this.request("GET", ENDPOINTS.TEMPLATE_DEPLOYMENT(orgId, deploymentId));
53538
+ }
53429
53539
  // ---- Billing & Credits (org-scoped) ----
53430
53540
  async getBilling(orgId) {
53431
53541
  return this.request("GET", ENDPOINTS.BILLING(orgId));
@@ -53671,6 +53781,43 @@ var ParallClient = class _ParallClient {
53671
53781
  async listEdgeProfiles(orgId, edgeId) {
53672
53782
  return this.request("GET", ENDPOINTS.ORG_EDGE_PROFILES(orgId, edgeId));
53673
53783
  }
53784
+ /**
53785
+ * Read a hosted Cloud Profile's egress-proxy status (manager-only: hosted
53786
+ * human maintainer or org admin). Sanitized — the password never comes back.
53787
+ * Typed errors: `EDGE_NOT_HOSTED` (BYOC device), `PROXY_CONFIG_CORRUPT` /
53788
+ * validation codes as 422 when a stored config no longer passes current rules.
53789
+ * `can_mutate` and `lease_status` are the authoritative idle gate; device
53790
+ * list status is not a substitute.
53791
+ */
53792
+ async getEdgeProfileProxy(orgId, edgeId, profileName) {
53793
+ return this.request("GET", ENDPOINTS.ORG_EDGE_PROFILE_PROXY(orgId, edgeId, profileName));
53794
+ }
53795
+ /**
53796
+ * Set/replace the profile's egress proxy (full triple every time) — IDLE
53797
+ * ONLY: while the profile's hosted browser is running (a viewer session is
53798
+ * open or a pod is otherwise live) the server answers 409
53799
+ * `EDGE_PROFILE_IN_USE`; close the viewer, wait for idle scale-to-zero, and
53800
+ * retry. The next cold start uses the new egress; browser login state is
53801
+ * preserved across it. Other typed errors: the validation vocabulary
53802
+ * (`INVALID_PROXY_SERVER`, `PROXY_AUTH_INCOMPLETE`,
53803
+ * `PROXY_SERVER_FORBIDDEN_TARGET`, …), `EDGE_DELETING` (409), and
53804
+ * `SECRETBOX_UNCONFIGURED` (503 — server cannot store credentials safely),
53805
+ * and `EDGE_PROFILE_PROXY_STALE` (409 — expectedVersion lost a tab race).
53806
+ */
53807
+ async setEdgeProfileProxy(orgId, edgeId, profileName, req, expectedVersion) {
53808
+ return this.request("PUT", ENDPOINTS.ORG_EDGE_PROFILE_PROXY(orgId, edgeId, profileName), req, void 0, false, {
53809
+ headers: expectedVersion ? { "If-Match": `"proxy-${expectedVersion}"` } : void 0
53810
+ });
53811
+ }
53812
+ /**
53813
+ * Clear the profile's egress proxy; the next pod start egresses directly.
53814
+ * Idle-only like set — 409 `EDGE_PROFILE_IN_USE` while the browser is live.
53815
+ */
53816
+ async clearEdgeProfileProxy(orgId, edgeId, profileName, expectedVersion) {
53817
+ return this.request("DELETE", ENDPOINTS.ORG_EDGE_PROFILE_PROXY(orgId, edgeId, profileName), void 0, void 0, false, {
53818
+ headers: expectedVersion ? { "If-Match": `"proxy-${expectedVersion}"` } : void 0
53819
+ });
53820
+ }
53674
53821
  /**
53675
53822
  * Execute a registry clip command on an Edge device.
53676
53823
  *
@@ -53739,6 +53886,8 @@ var ApiError = class extends Error {
53739
53886
  status;
53740
53887
  code;
53741
53888
  extras;
53889
+ /** Retry-After delta seconds when the server supplies one. */
53890
+ retryAfterSeconds;
53742
53891
  /** Attempted action (authorization denials) — e.g. "chat.add_member". */
53743
53892
  action;
53744
53893
  /** Target resource URI that was evaluated — e.g. "prll://cht_…". */
@@ -53758,6 +53907,9 @@ function buildApiError(res, rawErrorBody) {
53758
53907
  const errMsg = (typeof errorObj?.message === "string" ? errorObj.message : void 0) ?? (typeof errorBody.message === "string" ? errorBody.message : void 0) ?? (typeof errorBody.error === "string" ? errorBody.error : void 0);
53759
53908
  const errCode = (typeof errorObj?.code === "string" ? errorObj.code : void 0) ?? (typeof errorBody.code === "string" ? errorBody.code : void 0);
53760
53909
  const apiError = new ApiError(res.status, errMsg ?? res.statusText, errCode);
53910
+ const retryAfter = Number(res.headers?.get("Retry-After"));
53911
+ if (Number.isFinite(retryAfter) && retryAfter > 0)
53912
+ apiError.retryAfterSeconds = retryAfter;
53761
53913
  const anchors = errorObj ?? errorBody;
53762
53914
  if (typeof anchors.action === "string")
53763
53915
  apiError.action = anchors.action;
@@ -55038,6 +55190,17 @@ function buildForkResultPrefix(results) {
55038
55190
  }
55039
55191
 
55040
55192
  // ts/agent-core/dist/prompt-fragments.js
55193
+ function identityFromMe(me) {
55194
+ return {
55195
+ userId: me.id,
55196
+ displayName: me.display_name,
55197
+ title: me.public_profile?.title || void 0,
55198
+ publicDescription: me.public_profile?.description || void 0,
55199
+ // `||` on purpose: an empty-string instructions must also fall back to
55200
+ // the deprecated description alias (empty means "unset" on this wire).
55201
+ instructions: me.agent_profile?.instructions || me.agent_profile?.description || void 0
55202
+ };
55203
+ }
55041
55204
  var PRLL_IDENTITY_BASE = `## You on Parall
55042
55205
 
55043
55206
  Parall is a shared workspace where humans and agents work side by side as equals.
@@ -55059,11 +55222,15 @@ function buildIdentity(agent) {
55059
55222
  const name = sanitizeProfileField(agent.displayName);
55060
55223
  const lines = [PRLL_IDENTITY_BASE, "", "### Your Parall Identity", ""];
55061
55224
  lines.push(`You are **${name}** (\`prll://${agent.userId}\`).`);
55062
- if (agent.description) {
55063
- const description = sanitizeProfileBlock(agent.description);
55064
- if (description) {
55065
- lines.push("", "### Your Agent Profile", "", description);
55066
- }
55225
+ const title = agent.title ? sanitizeProfileField(agent.title) : "";
55226
+ if (title)
55227
+ lines.push(`Title: ${title}`);
55228
+ const about = agent.publicDescription ? sanitizeProfileField(agent.publicDescription) : "";
55229
+ if (about)
55230
+ lines.push(`About: ${about}`);
55231
+ const instructions = sanitizeProfileBlock(agent.instructions ?? agent.description ?? "");
55232
+ if (instructions) {
55233
+ lines.push("", "### Private instructions from your organization admins", "", instructions);
55067
55234
  }
55068
55235
  lines.push("", `When you see \`${agent.userId}\` or \`prll://${agent.userId}\` in messages, mentions, or events \u2014 that's you.`);
55069
55236
  return lines.join("\n");
@@ -58049,7 +58216,7 @@ var ParallAgentGateway = class {
58049
58216
  return { action: "skip" };
58050
58217
  if (chatInfo.type === "group" && chatInfo.agentRoutingMode !== "active") {
58051
58218
  const mentions = content.mentions ?? [];
58052
- const isMentioned = mentions.some((mention) => mention.user_id === this.opts.agentUserId || mention.user_id === MENTION_ALL_USER_ID);
58219
+ const isMentioned = mentions.some((mention) => mentionTargetsUser(mention.user_id, this.opts.agentUserId, "agent"));
58053
58220
  if (!isMentioned)
58054
58221
  return { action: "skip" };
58055
58222
  }
@@ -59049,8 +59216,17 @@ parall whoami
59049
59216
  parall members list # All org members (humans + agents)
59050
59217
  parall agents list # Agents only
59051
59218
  parall users get prll://usr_xxx # Get user details by ID
59219
+ parall members profile prll://usr_xxx # A member's public profile (title / about)
59220
+ parall agents instructions # Your own private Instructions (admin-maintained)
59052
59221
  \`\`\`
59053
59222
 
59223
+ Every member carries an org-scoped public profile: \`title\` (role, e.g.
59224
+ "Platform Lead") and \`description\` (a short about). \`members list\` includes
59225
+ both \u2014 use them to route work to the right person or agent. Your own system
59226
+ prompt already contains your public profile and your private Instructions;
59227
+ you cannot edit either of them \u2014 if yours should change, DM a Human org
59228
+ admin and ask.
59229
+
59054
59230
  Create a hosted agent when the user asks for a Parall-managed runtime. Hosted
59055
59231
  provisioning is asynchronous: creation means the agent identity, API key, and
59056
59232
  machine record were accepted, not that the runtime is online yet. Use \`--wait\`
@@ -59332,7 +59508,7 @@ parall tasks list --assignee-id prll://usr_xxx # first page only (default 20)
59332
59508
  parall tasks subtasks prll://tsk_xxx # children of a single parent task
59333
59509
 
59334
59510
  # Create a task (add --parent-id to make it a SUBTASK of another task)
59335
- parall tasks create --title "Task title" [--assignee-id prll://usr_xxx] [--parent-id prll://tsk_xxx] [--project-id prll://prj_xxx] [--due-date 2026-08-01]
59511
+ parall tasks create --title "Task title" [--assignee-id prll://usr_xxx] [--parent-id prll://tsk_xxx] [--project-id prll://prj_xxx] [--planned-start 2026-07-20] [--due-date 2026-08-01]
59336
59512
 
59337
59513
  # Update task status \u2014 add --placement end so the task lands at the end of
59338
59514
  # its NEW status column (a bare --status keeps the old column's sort_order)
@@ -59343,6 +59519,12 @@ parall tasks update prll://tsk_xxx --status done --placement end
59343
59519
  parall tasks update prll://tsk_xxx --due-date 2026-08-01
59344
59520
  parall tasks update prll://tsk_xxx --due-date none
59345
59521
 
59522
+ # Planned start \u2014 same grammar as --due-date; must be on or before the due
59523
+ # date when both are set. This is the planned schedule's left-edge date,
59524
+ # NOT when work actually began (that stays on lifecycle timestamps)
59525
+ parall tasks update prll://tsk_xxx --planned-start 2026-07-20
59526
+ parall tasks update prll://tsk_xxx --planned-start none
59527
+
59346
59528
  # Move a task to the end of its status column
59347
59529
  parall tasks update prll://tsk_xxx --placement end
59348
59530
 
@@ -61442,7 +61624,7 @@ async function getAgentMeWithLegacyFallback(client, orgId) {
61442
61624
  throw err;
61443
61625
  }
61444
61626
  const user = await client.getMe();
61445
- return { ...user, agent_profile: null };
61627
+ return { ...user, agent_profile: null, public_profile: null };
61446
61628
  }
61447
61629
  }
61448
61630
  function resolveProviderEnv() {
@@ -61483,11 +61665,9 @@ async function main() {
61483
61665
  const agentUserId = me.id;
61484
61666
  const agentLog = childLogger(activeLog, agentUserId);
61485
61667
  activeLog = agentLog;
61486
- const agentIdentity = {
61487
- userId: agentUserId,
61488
- displayName: me.display_name,
61489
- description: me.agent_profile?.description ?? void 0
61490
- };
61668
+ let agentIdentity = identityFromMe(me);
61669
+ let lastIdentitySnapshot = JSON.stringify(agentIdentity);
61670
+ let lastKnownAgentProfile = me.agent_profile;
61491
61671
  const runtimeKey = config.runtimeKey || buildClaudeRuntimeKey(agentUserId);
61492
61672
  const sessionStateFilePath = sessionStateFilePathForRuntime(config.stateDir, runtimeKey);
61493
61673
  const sessionManager = new ClaudeSessionManager(runtimeKey, sessionStateFilePath, agentLog);
@@ -61548,15 +61728,17 @@ async function main() {
61548
61728
  }
61549
61729
  const refreshPlatformConfig = async () => {
61550
61730
  const updated = await configMgr.fetch();
61551
- let refreshedProfile;
61552
- if (updated.modelIsPin === void 0) {
61553
- try {
61554
- refreshedProfile = (await getAgentMeWithLegacyFallback(client, config.orgId)).agent_profile;
61555
- } catch (err) {
61556
- agentLog.warn(`platform config refresh: legacy /agents/me fallback failed: ${String(err)}`);
61557
- }
61731
+ let refreshedMe;
61732
+ try {
61733
+ refreshedMe = await getAgentMeWithLegacyFallback(client, config.orgId);
61734
+ } catch (err) {
61735
+ agentLog.warn(`platform config refresh: /agents/me refetch failed (keeping last-known identity): ${String(err)}`);
61736
+ }
61737
+ if (refreshedMe) {
61738
+ agentIdentity = identityFromMe(refreshedMe);
61739
+ lastKnownAgentProfile = refreshedMe.agent_profile;
61558
61740
  }
61559
- const isPin = deriveModelIsPin(updated, refreshedProfile);
61741
+ const isPin = deriveModelIsPin(updated, lastKnownAgentProfile);
61560
61742
  const localEffort = process.env.CLAUDE_CODE_EFFORT_LEVEL?.trim() || null;
61561
61743
  adapter.updateConfig({
61562
61744
  model: resolveRuntimeModel(isPin, updated.model, config.model) ?? null,
@@ -61571,8 +61753,10 @@ async function main() {
61571
61753
  promptWritten = false;
61572
61754
  agentLog.warn(`system prompt refresh write failed (retrying next refresh): ${String(err)}`);
61573
61755
  }
61574
- if (promptWritten && joinedFragments !== lastCapabilityFragments) {
61756
+ const identitySnapshot = JSON.stringify(agentIdentity);
61757
+ if (promptWritten && (joinedFragments !== lastCapabilityFragments || identitySnapshot !== lastIdentitySnapshot)) {
61575
61758
  lastCapabilityFragments = joinedFragments;
61759
+ lastIdentitySnapshot = identitySnapshot;
61576
61760
  adapter.requestProcessRestart();
61577
61761
  }
61578
61762
  };