external-protocol-pins.test.mjs
21 lines 812 B
Raw
sha256:e4c529f14a0bb908c1caaaeb3f95f3623a1a82e636e7e3722ca2cd3dc9821263 security: npm audit fix pre-bridge 2026-07-29 Human 39 days ago
1 import { describe, it } from 'node:test';
2 import { expect } from 'chai';
3 import * as protocol from '../../lib/agent/external-agent-protocol.mjs';
4
5 describe('Unit: External Protocol Constants & Helpers', () => {
6 it('should have default lease TTL defined', () => {
7 expect(protocol.DEFAULT_LEASE_TTL_SECONDS).to.be.a('number');
8 expect(protocol.DEFAULT_LEASE_TTL_SECONDS).to.equal(900);
9 });
10
11 it('should format task view for external protocol correctly', () => {
12 const mockTask = { task_id: 'task-123', status: 'open' };
13 const view = protocol.taskViewForExternalProtocol(mockTask, 'strict');
14 expect(view).to.be.an('object');
15 expect(view.task_id).to.equal('task-123');
16 });
17
18 it('should define protocolError', () => {
19 expect(protocol.protocolError).to.be.a('function');
20 });
21 });
File History 3 commits
sha256:e4c529f14a0bb908c1caaaeb3f95f3623a1a82e636e7e3722ca2cd3dc9821263 security: npm audit fix pre-bridge 2026-07-29 Human 39 days ago
sha256:b5f647cb9c409f563d4671fe3fc05ddea01fabfed9b41fc11cb923588e1c1baf mirror: GitHub Phase A durable MCP OAuth (#270) Human minor 55 days ago
sha256:873e30b7fafe601346295f8f4289f388f21d8f715f28584d5481899ba2b714fc Merge pull request #249 from aaronrene/muse-mirror Agent 72 days ago