Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"name": "omni",
"description": "Full Omni platform control — multichannel messaging, automations, events, batch ops via the omni CLI",
"version": "2.260531.4",
"version": "2.260602.2",
"author": {
"name": "Automagik"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@omni/ui",
"version": "2.260531.4",
"version": "2.260602.2",
"private": true,
"type": "module",
"scripts": {
Expand Down
36 changes: 18 additions & 18 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "omni-v2",
"version": "2.260531.4",
"version": "2.260602.2",
"private": true,
"type": "module",
"workspaces": ["packages/*", "apps/*"],
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@omni/api",
"version": "2.260531.4",
"version": "2.260602.2",
"type": "module",
"exports": {
".": {
Expand Down
39 changes: 39 additions & 0 deletions packages/api/src/plugins/__tests__/agent-dispatcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,45 @@ function createReactionEvent(overrides: Record<string, unknown> = {}) {
// ============================================================================

describe('agent-dispatcher', () => {
describe('human lifecycle observability helpers', () => {
it('builds redacted-readable lifecycle attributes without raw PII or secrets', () => {
const attributes = __test__.buildLifecycleSpanAttributes({
stage: 'provider_inbound',
eventType: 'user_message_turn',
channel: 'whatsapp-baileys',
provider: 'gupshup',
instanceId: 'inst-1',
chatId: '5511999887766@s.whatsapp.net',
sessionId: 'p0r-hml-20260531T204449Z',
traceId: 'trc-test-123',
messageId: 'wamid.123',
agentId: 'eugenia-seller',
inputText: 'Olá, meu telefone é 5511999887766 e email felipe@example.com. Quero cotar plano.',
outputText: 'Claro, posso ajudar com a cotação.',
extra: {
authorization: 'Bearer super-secret-token',
token: 'abc123',
},
});

expect(attributes['khal.lifecycle.stage']).toBe('provider_inbound');
expect(attributes['khal.event_type']).toBe('user_message_turn');
expect(attributes['khal.channel']).toBe('whatsapp-baileys');
expect(attributes['khal.provider']).toBe('gupshup');
expect(attributes['langfuse.session.id']).toBe('p0r-hml-20260531T204449Z');
expect(attributes['session.id']).toBe('p0r-hml-20260531T204449Z');
expect(attributes['khal.input_chars']).toBeGreaterThan(0);
expect(String(attributes['khal.input_sha256'])).toStartWith('sha256:');
expect(String(attributes['khal.output_sha256'])).toStartWith('sha256:');
expect(String(attributes['khal.input_preview_redacted'])).toContain('[PHONE]');
expect(String(attributes['khal.input_preview_redacted'])).toContain('[EMAIL]');
expect(JSON.stringify(attributes)).not.toContain('felipe@example.com');
expect(JSON.stringify(attributes)).not.toContain('5511999887766');
expect(JSON.stringify(attributes)).not.toContain('super-secret-token');
expect(JSON.stringify(attributes)).not.toContain('abc123');
});
});

// ======================================================================
// setupAgentDispatcher — subscribes to correct NATS subjects
// ======================================================================
Expand Down
Loading
Loading