Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Pieverse-Eng/purrfect-agent
/ functions
Functions
1,175 in github.com/Pieverse-Eng/purrfect-agent
⨍
Functions
1,175
◇
Types & classes
398
↓ 427 callers
Method
push
Push a fully-formed message line to the readable side (for the peer to consume).
test/acp/jsonrpc.test.ts:79
↓ 132 callers
Function
createMockFetch
( responses: Array<{ status?: number; body?: string | MockChatCompletion; headers?: Record<strin
test/helpers/mock-server.ts:122
↓ 130 callers
Function
makeTextResponse
( content: string, model = "test-model", )
test/helpers/mock-server.ts:31
↓ 124 callers
Method
register
(definition: ToolDefinition)
src/core/tool-registry.ts:27
↓ 119 callers
Method
find
(platform: string, userId: string)
src/gateway/acl.ts:115
↓ 117 callers
Method
run
( userMessage: string, options?: { signal?: AbortSignal }, )
src/core/agent-loop.ts:261
↓ 106 callers
Function
createTempDir
(prefix = "purrfect-test-")
test/helpers/fixtures.ts:10
↓ 95 callers
Function
ansiColor
(text: string, color: string)
src/cli/formatter.ts:66
↓ 90 callers
Method
close
()
src/core/mcp/client.ts:20
↓ 84 callers
Method
add
Add a new entry with the given tag and content.
src/core/memory/backend.ts:14
↓ 81 callers
Method
createSession
(options: CreateSessionOptions)
src/core/session-store.ts:480
↓ 79 callers
Method
get
(id: string)
src/core/tasks/store.ts:38
↓ 71 callers
Function
makeToolCall
( name: string, args: Record<string, unknown>, id?: string, )
test/helpers/mock-server.ts:69
↓ 66 callers
Function
makeToolCallResponse
( toolCalls: ToolCall[], model = "test-model", )
test/helpers/mock-server.ts:50
↓ 62 callers
Method
create
(name: string)
src/core/profiles.ts:95
↓ 61 callers
Method
appendMessage
( sessionId: string, message: { role: string; content: string | null }, )
src/cli/approval.ts:17
↓ 56 callers
Method
build
* Assemble the system prompt from identity, context files, and memory. * Skills are NOT included — they are injected by AgentLoop at runtime.
src/core/prompt-builder.ts:310
↓ 56 callers
Method
cleanup
* Delete cached files older than maxAgeMs (default 24 hours).
src/gateway/media.ts:80
↓ 53 callers
Function
out
(opts: CronCommandOptions)
src/cli/cron.ts:38
↓ 52 callers
Method
check
(name?: string)
src/core/skills/hub.ts:197
↓ 48 callers
Function
defaultConfigDir
()
src/cli/config.ts:39
↓ 47 callers
Function
parseArgs
(argv)
benchmarks/trajectory-compressor-benchmark.mjs:65
↓ 43 callers
Method
replace
Replace an existing entry. No-op if tag is missing.
src/core/memory/backend.ts:16
↓ 41 callers
Method
dispatch
(method: string, params: unknown)
src/acp/server.ts:89
↓ 41 callers
Method
handle
* Handle an inbound message event from a platform adapter.
src/gateway/handler.ts:192
↓ 40 callers
Method
getAllToolNames
()
src/core/tool-registry.ts:182
↓ 38 callers
Method
getSnapshot
Snapshot used during prompt assembly (may be cached / frozen).
src/core/memory/backend.ts:20
↓ 37 callers
Method
on
(event: string, handler: HandlerFn)
test/gateway/adapters/telegram.test.ts:26
↓ 35 callers
Method
connect
(transport: McpTransport)
src/core/mcp/client.ts:19
↓ 30 callers
Method
compress
(messages: Message[], options?: Record<string, unknown>)
src/core/agent-loop.ts:106
↓ 29 callers
Function
makeTool
(name: string, overrides: Partial<ToolDefinition> = {})
test/core/tool-registry.test.ts:6
↓ 28 callers
Function
makeStreamChunk
( content?: string, toolCalls?: Array<{ index: number; id?: string; function?: { name?: string
test/helpers/mock-server.ts:91
↓ 26 callers
Method
chat
( messages: Message[], tools: ToolSchema[], options?: { signal?: AbortSignal; maxTokens?: number }
src/core/title-generator.ts:42
↓ 25 callers
Function
collectEvents
(iter: AsyncIterable<AgentEvent>)
test/core/agent-loop.test.ts:40
↓ 24 callers
Function
makeProvider
(mockFetch: typeof fetch)
test/core/agent-loop.test.ts:21
↓ 24 callers
Method
registerBuiltin
* Register a built-in tool and mark its name as reserved. * Reserved names cannot be overwritten by external tools.
src/core/tool-registry.ts:22
↓ 23 callers
Method
close
()
src/core/session-store.ts:1034
↓ 23 callers
Method
discover
* Discover all .md skill files in the given directory. * Files are processed in sorted order; later calls overwrite earlier entries * (enabling
src/core/skills/registry.ts:33
↓ 23 callers
Method
resolve
(input: string)
src/cli/commands/registry.ts:65
↓ 22 callers
Function
createDelegateTool
(options: DelegateToolOptions)
src/core/tools/delegate.ts:85
↓ 22 callers
Method
getSession
Expose live sessions for testing.
src/gateway/handler.ts:506
↓ 21 callers
Function
buildAgentContext
(options: AgentContextOptions)
src/cli/runtime.ts:29
↓ 21 callers
Function
cleanup
()
test/gateway/adapters/webhook.test.ts:228
↓ 21 callers
Method
delete
(name: string)
src/core/profiles.ts:115
↓ 21 callers
Method
register
(def: CommandDef)
src/cli/commands/registry.ts:58
↓ 20 callers
Method
write
(file: PairingFile)
src/gateway/acl.ts:103
↓ 19 callers
Function
loadConfigV2
(configDir?: string)
src/cli/config.ts:80
↓ 19 callers
Method
pathFor
Resolve absolute path for a profile's config dir.
src/core/profiles.ts:54
↓ 19 callers
Function
registerBuiltins
(registry: ToolRegistry, options?: RegisterBuiltinsOptions)
src/core/tools/index.ts:97
↓ 19 callers
Function
resolveApiKey
( ref: SecretRef | undefined, providerType?: ProviderType, )
src/core/secrets.ts:82
↓ 19 callers
Method
start
()
src/core/mcp/client.ts:39
↓ 18 callers
Method
getMessages
(sessionId: string)
src/server/routes.ts:15
↓ 18 callers
Method
listSessions
()
src/core/session-store.ts:526
↓ 17 callers
Function
createTodoWriteTool
( options: TodoWriteToolOptions, )
src/core/tools/todo-write.ts:86
↓ 17 callers
Method
ensurePending
* Look up the entry for `(platform, userId)`. If absent, create a * pending entry with a fresh pairing code. Idempotent: existing pending * entr
src/gateway/acl.ts:139
↓ 17 callers
Method
getTodos
Optional — present on real SessionStore. Used to include outstanding todos in the recap.
src/core/session-resume.ts:12
↓ 17 callers
Function
log
(ctx: McpCommandContext)
src/cli/mcp.ts:30
↓ 16 callers
Method
get
(id: string)
src/gateway/webhook-subscriptions.ts:58
↓ 16 callers
Function
setup
()
test/core/skills/layers-hub.test.ts:16
↓ 16 callers
Function
writeSkill
( dir: string, filename: string, name: string, description: string, triggers: string[], body = `In
test/core/skills/layers-hub.test.ts:22
↓ 15 callers
Function
finding
(id: string, severity: SafetyFinding["severity"])
src/core/safety/injection-scan.ts:64
↓ 15 callers
Function
makeProvider
(mockFetch: typeof fetch)
test/core/delegate.test.ts:16
↓ 15 callers
Function
scanContextContent
(content: string, filename: string)
src/core/prompt-builder.ts:172
↓ 15 callers
Method
send
(msg: object)
test/acp/server.test.ts:32
↓ 14 callers
Function
findResponse
(pair: StreamPair, id: number | string)
test/acp/server.test.ts:57
↓ 14 callers
Function
getDbPath
(configDir?: string)
src/cli/sessions.ts:22
↓ 14 callers
Method
getSelected
Return the name of the currently highlighted command, or null.
src/cli/dropdown.ts:79
↓ 14 callers
Method
list
()
src/gateway/acl.ts:111
↓ 14 callers
Method
load
()
src/core/tasks/store.ts:57
↓ 14 callers
Function
parseApprovalResponse
(input: string)
src/cli/approval.ts:64
↓ 14 callers
Method
search
(query: string)
src/core/skills/hub.ts:127
↓ 13 callers
Method
createCheckpoint
(options: CreateCheckpointOptions)
src/core/session-store.ts:941
↓ 13 callers
Function
getModelMetadata
( name: string, configOverrides?: ModelMetadataOverrides, )
src/core/model-metadata.ts:130
↓ 13 callers
Method
install
(name: string, options: { tap?: string } = {})
src/core/skills/hub.ts:148
↓ 13 callers
Function
jsonError
(res: ServerResponse, status: number, message: string)
src/server/index.ts:57
↓ 13 callers
Function
makeSSEStream
(events: Array<Record<string, unknown>>)
test/helpers/mock-server.ts:85
↓ 13 callers
Function
makeTool
(name: string, handler?: (args: Record<string, unknown>) => Promise<string>)
test/core/agent-loop.test.ts:28
↓ 13 callers
Function
sanitizeTitle
(raw: string | null | undefined, maxChars = DEFAULT_MAX_CHARS)
src/core/title-generator.ts:61
↓ 13 callers
Function
setup
()
test/core/skills/registry.test.ts:11
↓ 13 callers
Method
stop
()
test/gateway/adapters/telegram.test.ts:34
↓ 13 callers
Function
validateConfig
(raw: unknown)
src/core/config-schema.ts:120
↓ 12 callers
Method
createJob
(cronExpr: string, prompt: string)
src/core/cron/scheduler.ts:36
↓ 12 callers
Function
makeEvent
(text: string, overrides?: Partial<SessionSource>)
test/gateway/handler.test.ts:72
↓ 12 callers
Function
makeProvider
(mockFetch: typeof fetch)
test/gateway/handler.test.ts:55
↓ 12 callers
Method
remove
Remove an entry by tag. No-op if tag is missing.
src/core/memory/backend.ts:18
↓ 12 callers
Method
scan
* Scan one or more directories for plugin subdirectories containing a * valid plugin.json manifest. Invalid or malformed manifests are logged *
src/core/plugins/discovery.ts:12
↓ 12 callers
Function
setupStore
()
test/gateway/handler.test.ts:100
↓ 12 callers
Method
update
(name: string)
src/core/skills/hub.ts:176
↓ 11 callers
Method
addTap
(name: string, url: string)
src/core/skills/hub.ts:96
↓ 11 callers
Function
createMemoryBackend
(opts: CreateMemoryBackendOptions)
src/core/memory/backend.ts:181
↓ 11 callers
Method
currentModel
Return the name of the currently active (primary) model.
src/core/router.ts:71
↓ 11 callers
Function
formatToolResult
( name: string, result: string, maxLen = 200, )
src/cli/formatter.ts:89
↓ 11 callers
Method
getDefinitions
* Returns OpenAI function-calling format schemas for the given tools. * Filters by enablement and checkFn availability. Caches shared checkFn *
src/core/tool-registry.ts:114
↓ 11 callers
Method
getLiveSnapshot
Live snapshot — bypass any cache.
src/core/memory/backend.ts:22
↓ 11 callers
Function
isToolAllowed
(toolName: string, platform: Platform)
src/core/toolsets.ts:54
↓ 11 callers
Method
listJobs
()
src/core/cron/store.ts:49
↓ 11 callers
Function
loadConfig
(configDir?: string)
src/cli/config.ts:53
↓ 11 callers
Function
makeSkill
( name: string, opts: { triggers?: string[]; description?: string } = {}, )
test/core/skills/registry.test.ts:28
↓ 11 callers
Function
parsePairingArgs
(args: string[])
src/cli/pairing-args.ts:39
↓ 11 callers
Function
parseWebhookArgs
(args: string[])
src/cli/webhook.ts:40
next →
1–100 of 1,175, ranked by callers