Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

fix(ruflo-agentdb): stop the secret screen treating a hyphen-named memory key as a credential field (#4202) (#4211)

akushonkamen87d8687f3f7d
diff --git a/plugins/ruflo-adr/hooks/screen.ts b/plugins/ruflo-adr/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-adr/hooks/screen.ts
+++ b/plugins/ruflo-adr/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-agent/hooks/screen.ts b/plugins/ruflo-agent/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-agent/hooks/screen.ts
+++ b/plugins/ruflo-agent/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-agentdb/hooks/screen.ts b/plugins/ruflo-agentdb/hooks/screen.ts
index f27f682177..2e78bc923f 100644
--- a/plugins/ruflo-agentdb/hooks/screen.ts
+++ b/plugins/ruflo-agentdb/hooks/screen.ts
@@ -113,7 +113,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -121,6 +123,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-agentdb/tests/guard-keys.test.ts b/plugins/ruflo-agentdb/tests/guard-keys.test.ts
new file mode 100644
index 0000000000..a47bfdbcd9
--- /dev/null
+++ b/plugins/ruflo-agentdb/tests/guard-keys.test.ts
@@ -0,0 +1,27 @@
+import { describe, expect, test, tier } from 'claude-code/testing'
+
+import { holdsSecret, verdict } from '../hooks/guard'
+
+tier('user')
+
+// Secret-shaped values are assembled at run time so no literal sits in the source.
+const rnd = (n: number, seed = 'q7Zk3Xp9Lm2Vb8Nc4Rt6Yw1Hs5Df0Jg') => seed.repeat(Math.ceil(n / seed.length)).slice(0, n)
+
+describe('guard: a memory entry whose key mentions auth is an entry name, not a secret field', () => {
+ test('issue #4202: notes keyed with hyphenated names are stored, whatever the key starts with', () => {
+ expect(holdsSecret({ key: 'auth-flow-notes', value: 'getUser-not-getSession' })).toBe(false)
+ expect(holdsSecret({ key: 'aps-refresh-window', value: 'rotate-55min-before-expiry' })).toBe(false)
+ expect(holdsSecret({ key: 'token-refresh-notes', value: 'refresh-at-55-minutes' })).toBe(false)
+ })
+
+ test('a hyphen-named key does not excuse a value that holds a credential shape', () => {
+ expect(verdict('mcp__x__agentdb_hierarchical-store', { key: 'auth-flow-notes', value: `Bearer ${rnd(40)}` })).toContain('secret')
+ expect(verdict('mcp__x__agentdb_hierarchical-store', { key: 'auth-flow-notes', value: `ghp_${'a1B2'.repeat(10)}` })).toContain('secret')
+ expect(verdict('mcp__x__agentdb_hierarchical-store', { key: 'notes', value: `sk_live_${'ABCD1234'.repeat(2)}` })).toContain('secret')
+ })
+
+ test('single-word credential keys keep blocking keyed literals', () => {
+ expect(holdsSecret({ key: 'auth', value: rnd(32) })).toBe(true)
+ expect(holdsSecret({ key: 'api_key', value: rnd(32) })).toBe(true)
+ })
+})
diff --git a/plugins/ruflo-agntcy/hooks/screen.ts b/plugins/ruflo-agntcy/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-agntcy/hooks/screen.ts
+++ b/plugins/ruflo-agntcy/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-ai-team/hooks/screen.ts b/plugins/ruflo-ai-team/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-ai-team/hooks/screen.ts
+++ b/plugins/ruflo-ai-team/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-aidefence/hooks/screen.ts b/plugins/ruflo-aidefence/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-aidefence/hooks/screen.ts
+++ b/plugins/ruflo-aidefence/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-arena/hooks/screen.ts b/plugins/ruflo-arena/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-arena/hooks/screen.ts
+++ b/plugins/ruflo-arena/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-autopilot/hooks/screen.ts b/plugins/ruflo-autopilot/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-autopilot/hooks/screen.ts
+++ b/plugins/ruflo-autopilot/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-bbs-federation/hooks/screen.ts b/plugins/ruflo-bbs-federation/hooks/screen.ts
index 3c76c8caf4..8b245ca2b5 100644
--- a/plugins/ruflo-bbs-federation/hooks/screen.ts
+++ b/plugins/ruflo-bbs-federation/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-browser/hooks/screen.ts b/plugins/ruflo-browser/hooks/screen.ts
index 07c0058c1e..c4f46a2a0b 100644
--- a/plugins/ruflo-browser/hooks/screen.ts
+++ b/plugins/ruflo-browser/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-business-pods/hooks/screen.ts b/plugins/ruflo-business-pods/hooks/screen.ts
index 0327d4ab24..152e1feb15 100644
--- a/plugins/ruflo-business-pods/hooks/screen.ts
+++ b/plugins/ruflo-business-pods/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-chatgpt-federation/hooks/screen.ts b/plugins/ruflo-chatgpt-federation/hooks/screen.ts
index 6f720a28e1..ee3de29805 100644
--- a/plugins/ruflo-chatgpt-federation/hooks/screen.ts
+++ b/plugins/ruflo-chatgpt-federation/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-console/hooks/screen.ts b/plugins/ruflo-console/hooks/screen.ts
index 77c3c7cb50..6aec1a11af 100644
--- a/plugins/ruflo-console/hooks/screen.ts
+++ b/plugins/ruflo-console/hooks/screen.ts
@@ -111,7 +111,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -119,6 +121,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-daa/hooks/screen.ts b/plugins/ruflo-daa/hooks/screen.ts
index feb79641f0..f42850ed25 100644
--- a/plugins/ruflo-daa/hooks/screen.ts
+++ b/plugins/ruflo-daa/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-ddd/hooks/screen.ts b/plugins/ruflo-ddd/hooks/screen.ts
index feb79641f0..f42850ed25 100644
--- a/plugins/ruflo-ddd/hooks/screen.ts
+++ b/plugins/ruflo-ddd/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-deepseek-harness/hooks/screen.ts b/plugins/ruflo-deepseek-harness/hooks/screen.ts
index feb79641f0..f42850ed25 100644
--- a/plugins/ruflo-deepseek-harness/hooks/screen.ts
+++ b/plugins/ruflo-deepseek-harness/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-docs/hooks/screen.ts b/plugins/ruflo-docs/hooks/screen.ts
index feb79641f0..f42850ed25 100644
--- a/plugins/ruflo-docs/hooks/screen.ts
+++ b/plugins/ruflo-docs/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-federation/hooks/screen.ts b/plugins/ruflo-federation/hooks/screen.ts
index feb79641f0..f42850ed25 100644
--- a/plugins/ruflo-federation/hooks/screen.ts
+++ b/plugins/ruflo-federation/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-goals/hooks/screen.ts b/plugins/ruflo-goals/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-goals/hooks/screen.ts
+++ b/plugins/ruflo-goals/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-graph-intelligence/hooks/screen.ts b/plugins/ruflo-graph-intelligence/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-graph-intelligence/hooks/screen.ts
+++ b/plugins/ruflo-graph-intelligence/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-intelligence/hooks/screen.ts b/plugins/ruflo-intelligence/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-intelligence/hooks/screen.ts
+++ b/plugins/ruflo-intelligence/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-iot-cognitum/hooks/screen.ts b/plugins/ruflo-iot-cognitum/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-iot-cognitum/hooks/screen.ts
+++ b/plugins/ruflo-iot-cognitum/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-jujutsu/hooks/screen.ts b/plugins/ruflo-jujutsu/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-jujutsu/hooks/screen.ts
+++ b/plugins/ruflo-jujutsu/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-knowledge-graph/hooks/screen.ts b/plugins/ruflo-knowledge-graph/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-knowledge-graph/hooks/screen.ts
+++ b/plugins/ruflo-knowledge-graph/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-loop-workers/hooks/screen.ts b/plugins/ruflo-loop-workers/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-loop-workers/hooks/screen.ts
+++ b/plugins/ruflo-loop-workers/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-market-data/hooks/screen.ts b/plugins/ruflo-market-data/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-market-data/hooks/screen.ts
+++ b/plugins/ruflo-market-data/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-metaharness/hooks/screen.ts b/plugins/ruflo-metaharness/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-metaharness/hooks/screen.ts
+++ b/plugins/ruflo-metaharness/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-migrations/hooks/screen.ts b/plugins/ruflo-migrations/hooks/screen.ts
index b37eacf098..c764b30a61 100644
--- a/plugins/ruflo-migrations/hooks/screen.ts
+++ b/plugins/ruflo-migrations/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-music/hooks/screen.ts b/plugins/ruflo-music/hooks/screen.ts
index 4031528e58..f3b192c3e3 100644
--- a/plugins/ruflo-music/hooks/screen.ts
+++ b/plugins/ruflo-music/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-neural-trader/hooks/screen.ts b/plugins/ruflo-neural-trader/hooks/screen.ts
index 26b08ccd9a..00d828e740 100644
--- a/plugins/ruflo-neural-trader/hooks/screen.ts
+++ b/plugins/ruflo-neural-trader/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-observability/hooks/screen.ts b/plugins/ruflo-observability/hooks/screen.ts
index f2a2316182..f3128753f1 100644
--- a/plugins/ruflo-observability/hooks/screen.ts
+++ b/plugins/ruflo-observability/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-protector/hooks/screen.ts b/plugins/ruflo-protector/hooks/screen.ts
index 09e1d550ef..6ef814c56d 100644
--- a/plugins/ruflo-protector/hooks/screen.ts
+++ b/plugins/ruflo-protector/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-rag-memory/hooks/screen.ts b/plugins/ruflo-rag-memory/hooks/screen.ts
index fdba9a02d6..a9721af1d5 100644
--- a/plugins/ruflo-rag-memory/hooks/screen.ts
+++ b/plugins/ruflo-rag-memory/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-ruvector/hooks/screen.ts b/plugins/ruflo-ruvector/hooks/screen.ts
index d671ad16fb..0d891aff1f 100644
--- a/plugins/ruflo-ruvector/hooks/screen.ts
+++ b/plugins/ruflo-ruvector/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-ruvllm/hooks/screen.ts b/plugins/ruflo-ruvllm/hooks/screen.ts
index 5cc350f73d..4a1ec5e39f 100644
--- a/plugins/ruflo-ruvllm/hooks/screen.ts
+++ b/plugins/ruflo-ruvllm/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-rvf/hooks/screen.ts b/plugins/ruflo-rvf/hooks/screen.ts
index eaefebbe4d..79e5e907f1 100644
--- a/plugins/ruflo-rvf/hooks/screen.ts
+++ b/plugins/ruflo-rvf/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-security-audit/hooks/screen.ts b/plugins/ruflo-security-audit/hooks/screen.ts
index 562a653fde..084f00e0af 100644
--- a/plugins/ruflo-security-audit/hooks/screen.ts
+++ b/plugins/ruflo-security-audit/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-sparc/hooks/screen.ts b/plugins/ruflo-sparc/hooks/screen.ts
index 12c96e512c..c63dad88fe 100644
--- a/plugins/ruflo-sparc/hooks/screen.ts
+++ b/plugins/ruflo-sparc/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-workflows/hooks/screen.ts b/plugins/ruflo-workflows/hooks/screen.ts
index ec8bc466e2..6cd1578fa6 100644
--- a/plugins/ruflo-workflows/hooks/screen.ts
+++ b/plugins/ruflo-workflows/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/plugins/ruflo-x-gateway/hooks/screen.ts b/plugins/ruflo-x-gateway/hooks/screen.ts
index 74bd957af5..38ecb5c965 100644
--- a/plugins/ruflo-x-gateway/hooks/screen.ts
+++ b/plugins/ruflo-x-gateway/hooks/screen.ts
@@ -109,7 +109,9 @@ const QUOTED = /(["'\x60])((?:(?!\1)[^\n]){1,256})\1/y
const BARE_VALUE = /[^\s"'\x60,;]{1,256}/y
const QUERY_VALUE = /[^\s"'\x60,;&]{1,256}/y
-/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count. */
+/** A secret-named key assigned a literal value: env style, JSON, YAML, code. Values that are calls, references or placeholders do not count.
+ * A key that is itself a multi-word hyphenated name is an entry's name, not a credential field (an agentdb write is `{ key: name, value: note }`),
+ * so the value is not judged by its key; the secret shapes above still screen the text as a whole (#4202). */
function assignmentSecret(text: string): boolean {
let valueEnd = 0
for (const m of text.matchAll(KEY_NAME)) {
@@ -117,6 +119,10 @@ function assignmentSecret(text: string): boolean {
const at = m.index + m[0].length
let back = m.index
while (back > 0 && m.index - back < 64 && /[A-Za-z0-9_.-]/.test(text.charAt(back - 1))) back--
+ if (hyphenName((text.slice(back, m.index) + m[0]).replace(/["']?\s*[:=]\s*$/, ''))) {
+ valueEnd = at
+ continue
+ }
const re = /["'\x60]/.test(text.charAt(at)) ? QUOTED : /[?&]/.test(text.charAt(back - 1)) ? QUERY_VALUE : BARE_VALUE
re.lastIndex = at
const hit = re.exec(text)
diff --git a/scripts/ci-test-excluded.txt b/scripts/ci-test-excluded.txt
index e2b70c26df..e12efc5cfe 100644
--- a/scripts/ci-test-excluded.txt
+++ b/scripts/ci-test-excluded.txt
@@ -8,6 +8,7 @@
plugins/ruflo-adr/tests/mod.test.ts
plugins/ruflo-agentdb/tests/fold.test.ts
+plugins/ruflo-agentdb/tests/guard-keys.test.ts
plugins/ruflo-agentdb/tests/guard-scan.test.ts
plugins/ruflo-agentdb/tests/import.test.ts
plugins/ruflo-agentdb/tests/register.test.ts