MCPcopy Create free account
hub / github.com/tiann/hapi / createSession

Function createSession

cli/src/agent/sessionFactory.test.ts:52–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50import { bootstrapExistingSession, buildSessionMetadata } from './sessionFactory'
51
52function createSession(): Session {
53 return {
54 id: 'hapi-session-1',
55 namespace: 'default',
56 seq: 1,
57 createdAt: 1,
58 updatedAt: 1,
59 active: false,
60 activeAt: 1,
61 metadata: {
62 path: '/tmp/project',
63 host: 'localhost',
64 machineId: 'machine-1',
65 flavor: 'codex',
66 codexSessionId: 'codex-thread-1'
67 },
68 metadataVersion: 1,
69 agentState: { controlledByUser: false },
70 agentStateVersion: 1,
71 thinking: false,
72 thinkingAt: 1,
73 todos: [],
74 model: null,
75 modelReasoningEffort: null,
76 effort: null,
77 permissionMode: undefined,
78 collaborationMode: undefined
79 }
80}
81
82describe('bootstrapExistingSession', () => {
83 beforeEach(() => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected