@agent-native/dispatch 0.8.24 → 0.8.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/dispatch",
3
- "version": "0.8.24",
3
+ "version": "0.8.26",
4
4
  "type": "module",
5
5
  "description": "Dispatch — workspace control plane for agent-native apps. Vault, integrations, destinations, scheduled jobs, and cross-app delegation, shipped as a single drop-in package.",
6
6
  "license": "MIT",
@@ -542,7 +542,7 @@ export function MessagingSetupPanel() {
542
542
  <StatusPill tone="success" label="Saved" />
543
543
  ) : (
544
544
  <StatusPill
545
- tone={envKey.required ? "neutral" : "neutral"}
545
+ tone="neutral"
546
546
  label={envKey.required ? "Missing" : "Not set"}
547
547
  />
548
548
  )}
@@ -420,7 +420,7 @@ export default function ConnectionsRoute() {
420
420
 
421
421
  {apps.length > 0 && (
422
422
  <Collapsible className="mt-6 rounded-2xl border bg-card">
423
- <CollapsibleTrigger className="flex w-full items-center justify-between px-4 py-3 text-sm">
423
+ <CollapsibleTrigger className="group flex w-full items-center justify-between px-4 py-3 text-sm">
424
424
  <span className="flex items-center gap-2 text-muted-foreground">
425
425
  <IconPlugConnected size={14} />
426
426
  Per-app status
@@ -8,15 +8,13 @@ import {
8
8
  buildEmbedStartPath,
9
9
  createEmbedSessionTicket,
10
10
  getRequestContext,
11
+ getRequestOrgId,
12
+ getRequestUserEmail,
11
13
  } from "@agent-native/core/server";
12
14
  import {
13
15
  discoverAgents,
14
16
  type DiscoveredAgent,
15
17
  } from "@agent-native/core/server/agent-discovery";
16
- import {
17
- getRequestOrgId,
18
- getRequestUserEmail,
19
- } from "@agent-native/core/server";
20
18
  import { getOrgA2ASecret, getOrgDomain } from "@agent-native/core/org";
21
19
  import {
22
20
  getDispatchMcpAppAccessSettings,
@@ -75,6 +75,10 @@ function envEmails(name: string): string[] {
75
75
  .filter(Boolean);
76
76
  }
77
77
 
78
+ function escapeLike(value: string): string {
79
+ return value.replace(/([\\%_])/g, "\\$1");
80
+ }
81
+
78
82
  function isEnvAdmin(email: string): boolean {
79
83
  const normalized = email.trim().toLowerCase();
80
84
  return [
@@ -561,9 +565,9 @@ export async function searchAgentThreads(input: {
561
565
  const where = [scope.sql];
562
566
  const args: unknown[] = [...scope.args];
563
567
  if (q) {
564
- const pattern = `%${q.toLowerCase()}%`;
568
+ const pattern = `%${escapeLike(q.toLowerCase())}%`;
565
569
  where.push(
566
- `(LOWER(title) LIKE ? OR LOWER(preview) LIKE ? OR LOWER(thread_data) LIKE ?)`,
570
+ `(LOWER(title) LIKE ? ESCAPE '\\' OR LOWER(preview) LIKE ? ESCAPE '\\' OR LOWER(thread_data) LIKE ? ESCAPE '\\')`,
567
571
  );
568
572
  args.push(pattern, pattern, pattern);
569
573
  }
@@ -880,7 +880,7 @@ async function affectedAllAppTargets() {
880
880
  }))
881
881
  .sort((a, b) => a.name.localeCompare(b.name));
882
882
  return {
883
- label: apps.length > 0 ? "All workspace apps" : "All workspace apps",
883
+ label: "All workspace apps",
884
884
  count: apps.length,
885
885
  apps,
886
886
  };