MCPcopy Create free account
hub / github.com/Roy3838/Observer / getAgentCode

Function getAgentCode

app/src/utils/agent_database.ts:260–274  ·  view source on GitHub ↗
(agentId: string)

Source from the content-addressed store, hash-verified

258
259// Get agent code
260export async function getAgentCode(agentId: string): Promise<string | null> {
261 const db = await openDB();
262
263 return new Promise((resolve, reject) => {
264 const tx = db.transaction(CODE_STORE, 'readonly');
265 const store = tx.objectStore(CODE_STORE);
266 const request = store.get(agentId);
267
268 request.onsuccess = () => {
269 const result = request.result;
270 resolve(result ? result.code : null);
271 };
272 request.onerror = () => reject(request.error);
273 });
274}
275
276// Get agent memory
277export async function getAgentMemory(agentId: string): Promise<string> {

Callers 11

startAgentLoopFunction · 0.90
executeAgentIterationFunction · 0.90
fetchAgentReferenceDataFunction · 0.90
agentReportFunction · 0.90
withVerifyWarningsFunction · 0.90
registry.tsFile · 0.90
AppContentFunction · 0.90
exportAgentToFileFunction · 0.85
downloadAgentFunction · 0.85

Calls 1

openDBFunction · 0.85

Tested by

no test coverage detected