MCPcopy Create free account

hub / github.com/0xjeffro/astroclaw / functions

Functions765 in github.com/0xjeffro/astroclaw

↓ 3 callersFunctionmakeMemoryArgs
(content string)
pkg/tool/memory_test.go:25
↓ 3 callersFunctionrunMigrations
runMigrations reads SQL files from the migrations/ directory (bundled with this Lambda via CDK's bundling configuration), splits each file into indivi
deploy/aws/lambda/migrate/main.go:147
↓ 3 callersMethodsetHeaders
(req *http.Request)
main.go:206
↓ 3 callersFunctionstripHTML
stripHTML removes all HTML tags and normalizes whitespace.
pkg/tool/websearch/ddg.go:186
↓ 3 callersFunctionstubSecret
stubSecret is the test-side getSecret function passed into newRouter. It returns the same 32-byte secret used by pkg/auth tests.
pkg/api/handlers_test.go:129
↓ 3 callersMethodsummarizeSingle
summarizeSingle sends messages to the LLM for summarization. If the request is too long (prompt-too-long error), it retries by dropping the oldest 20%
pkg/agent/context.go:268
↓ 3 callersFunctiontruncate
(s string, maxChars int)
pkg/agent/prompt.go:164
↓ 3 callersFunctiontruncateBytes
truncateBytes truncates a string to at most maxBytes, backing up to the nearest UTF-8 character boundary to avoid splitting multi-byte chars.
pkg/tool/webfetch/webfetch.go:234
↓ 2 callersMethodChatStream
(ctx context.Context, msgs []Message, tools []Tool)
pkg/provider/provider.go:50
↓ 2 callersMethodGetSkillFromWorkspace
GetSkillFromWorkspace returns the (author, name) skill installed in the given workspace, or an error if not installed.
pkg/app/skills/service.go:42
↓ 2 callersMethodGetSystemDataKey
===================================================================== System scope ===================================================================
pkg/app/passwords/db/queries.sql.go:78
↓ 2 callersMethodGetSystemSetting
(ctx context.Context, name string)
pkg/api/handlers.go:29
↓ 2 callersMethodGetUser
(ctx context.Context, id string)
pkg/api/handlers.go:40
↓ 2 callersMethodGetUserDataKey
===================================================================== User scope =====================================================================
pkg/app/passwords/db/queries.sql.go:118
↓ 2 callersMethodGetWorkspaceDataKey
===================================================================== Workspace scope ================================================================
pkg/app/passwords/db/queries.sql.go:158
↓ 2 callersFunctionHandler
Handler returns an http.HandlerFunc that upgrades the request to a WebSocket, authenticates it, registers the connection on both the Bus (for Bus.Send
pkg/cloud/wsbus/inprocess/handler.go:34
↓ 2 callersMethodList
List returns a copy of the registry's tools.
pkg/tool/tool.go:36
↓ 2 callersMethodListSessionMembers
(ctx context.Context, sessionID string)
pkg/api/reply.go:21
↓ 2 callersMethodListSessionsByWorkspace
(ctx context.Context, workspaceID string)
pkg/api/handlers.go:21
↓ 2 callersFunctionMemoryFromDB
(m db.AppNotesMemory, messageIDs []string)
pkg/app/notes/types.go:19
↓ 2 callersMethodName
()
pkg/tool/tool.go:7
↓ 2 callersFunctionNew
New returns a Client that talks to baseURL (e.g. "https://api.example.com"). The default HTTP timeout is 30s for the API and 15 minutes for reply call
pkg/client/client.go:39
↓ 2 callersFunctionNewDuckDuckGoProvider
()
pkg/tool/websearch/ddg.go:51
↓ 2 callersFunctionNewFromContext
NewFromContext creates an Agent with an existing conversation context, used when restoring a session. contextMessages is the Agent's compressed workin
pkg/agent/agent.go:33
↓ 2 callersFunctionNewOpenAI
(apiKey, model string)
pkg/provider/openai.go:16
↓ 2 callersFunctionNewService
(pool *pgxpool.Pool)
pkg/app/agents/service.go:17
↓ 2 callersFunctionOpenBucket
OpenBucket dispatches to a gocloud.dev/blob driver by URL scheme. Supported URLs: s3://<bucket>?region=<region> AWS S3 or any S3-compatible (Seaweed
pkg/cloud/blob.go:31
↓ 2 callersMethodRegister
(ctx context.Context, connID, userID, workspaceID string)
pkg/cloud/wsbus/wsbus.go:43
↓ 2 callersMethodSend
Send writes payload to the connection identified by connID. Returns wsbus.ErrConnGone if the connection is not tracked; the caller typically responds
pkg/cloud/wsbus/inprocess/bus.go:45
↓ 2 callersFunctionToProviderMessages
ToProviderMessages converts store messages to provider messages for feeding into Agent. Agent doesn't know about store types.
pkg/app/chat/utils.go:17
↓ 2 callersMethodToken
Token returns the current bearer token, or "" if no Login has succeeded and SetToken has not been called.
pkg/client/client.go:60
↓ 2 callersMethodUpsertSystemCredential
(ctx context.Context, name, description, value string)
pkg/app/passwords/service.go:92
↓ 2 callersMethodWithTx
(tx pgx.Tx)
pkg/app/chat/db/db.go:28
↓ 2 callersMethodWithTx
(tx pgx.Tx)
pkg/app/passwords/db/db.go:28
↓ 2 callersMethodWithTx
(tx pgx.Tx)
pkg/app/system/db/db.go:28
↓ 2 callersFunctionbearerToken
(r *http.Request)
pkg/auth/middleware.go:32
↓ 2 callersMethoddoAt
doAt is the shared HTTP roundtrip implementation. It encodes the body, attaches the bearer token, sends the request via the supplied client, and maps
pkg/client/client.go:74
↓ 2 callersMethoddoFetch
doFetch performs an HTTP GET with the given User-Agent and returns the response and body. The response body is limited to maxResponseBytes.
pkg/tool/webfetch/webfetch.go:145
↓ 2 callersMethoddoRequest
(req *http.Request)
tui/backend.go:134
↓ 2 callersFunctionextractDDGURL
extractDDGURL extracts the actual URL from DuckDuckGo's redirect wrapper. DuckDuckGo wraps URLs like: //duckduckgo.com/l/?uddg=<encoded_url>&rut=... I
pkg/tool/websearch/ddg.go:150
↓ 2 callersFunctionfallbackSummary
fallbackSummary creates a crude summary when LLM summarization fails. Takes the first 10% of each message (min 200 runes) and joins with " | ".
pkg/agent/context.go:359
↓ 2 callersFunctionformatFetchResult
formatFetchResult builds the final text returned to the agent.
pkg/tool/webfetch/webfetch.go:252
↓ 2 callersFunctionformatMessage
(msg chatMessage)
tui/model.go:533
↓ 2 callersFunctionformatResults
(query string, results []SearchResult)
pkg/tool/websearch/websearch.go:121
↓ 2 callersFunctionisContextLengthError
isContextLengthError checks if an error is a context-length / prompt-too-long error. Matches against known error strings from both providers: OpenAI:
pkg/agent/context.go:345
↓ 2 callersFunctionlistenWS
listenWS returns a Bubble Tea command that reads WebSocket messages in a goroutine and sends them to the TUI as wsEventMsg. Bubble Tea commands are fu
tui/ws.go:49
↓ 2 callersMethodloadSystemDataKey
===================================================================== Data key cache loaders (read-only) =============================================
pkg/app/passwords/service.go:362
↓ 2 callersMethodloadUserDataKey
(ctx context.Context, userID string)
pkg/app/passwords/service.go:406
↓ 2 callersMethodloadWorkspaceDataKey
(ctx context.Context, workspaceID string)
pkg/app/passwords/service.go:384
↓ 2 callersFunctionlooksLikeHTML
looksLikeHTML checks if the content starts with common HTML markers.
pkg/tool/webfetch/webfetch.go:246
↓ 2 callersFunctionnewGCM
newGCM constructs a GCM cipher around an AES block cipher keyed with dataKey. It is shared by EncryptAESGCM and DecryptAESGCM.
pkg/crypto/aes.go:60
↓ 2 callersFunctionpingWS
pingWS sends a WebSocket ping every 5 minutes to prevent API Gateway's 10-minute idle timeout. Returns a wsPingMsg to schedule the next ping. https://
tui/ws.go:36
↓ 2 callersMethodpostTo
(ctx context.Context, baseURL, path string, body []byte)
main.go:185
↓ 2 callersMethodpostTo
(ctx context.Context, baseURL, path string, body []byte)
tui/backend.go:125
↓ 2 callersFunctionqueryColumns
queryColumns returns all user-defined columns from information_schema, sorted by table name and column name for deterministic comparison.
deploy/aws/lambda/migrate/main_test.go:131
↓ 2 callersFunctionqueryConstraints
queryConstraints returns all table constraints from information_schema.
deploy/aws/lambda/migrate/main_test.go:180
↓ 2 callersFunctionqueryIndexes
queryIndexes returns all user-defined indexes from pg_indexes.
deploy/aws/lambda/migrate/main_test.go:156
↓ 2 callersMethodreadFile
readFile reads a single file from the skill's storage directory. TODO: add a size limit (io.LimitReader) so a huge file doesn't eat all Lambda memory.
pkg/tool/skills/load_skill.go:128
↓ 2 callersFunctionrun
Run does the actual work and returns an exit code. Separated from main so testscript can invoke it in-process without killing the test binary.
cmd/astroclaw/main.go:18
↓ 2 callersMethodsetHeaders
(req *http.Request)
tui/backend.go:150
↓ 2 callersFunctiontoProviderTools
toProviderTools converts tool.Tool (internal, contains Run function) into provider.Tool (serializable, sent to LLM). The Run function is stripped beca
pkg/agent/agent.go:211
↓ 2 callersMethoduntrack
untrack removes a connection. Idempotent; called on client disconnect and when Registry.Register fails after upgrade.
pkg/cloud/wsbus/inprocess/bus.go:67
↓ 1 callersMethodAddMembership
Memberships
pkg/app/system/service.go:250
↓ 1 callersMethodAddMemorySource
(ctx context.Context, arg AddMemorySourceParams)
pkg/app/notes/db/queries.sql.go:22
↓ 1 callersMethodAddSessionAgent
Child tables (messages, members, agents) are scoped by session_id. Access control is enforced by first looking up the session with workspace_id.
pkg/app/chat/db/queries.sql.go:27
↓ 1 callersMethodAddSessionMember
(ctx context.Context, arg AddSessionMemberParams)
pkg/app/chat/db/queries.sql.go:43
↓ 1 callersMethodApproval
()
pkg/tool/tool.go:11
↓ 1 callersMethodAttachAgentToWorkspace
(ctx context.Context, agentID, workspaceID string)
pkg/app/agents/service.go:74
↓ 1 callersMethodChat
Chat sends a message to a session and waits for the final reply. The reply Lambda streams intermediate state via WebSocket; Chat ignores that stream a
pkg/client/client.go:248
↓ 1 callersMethodChatStream
(ctx context.Context, msgs []Message, tools []Tool)
pkg/provider/anthropic.go:27
↓ 1 callersMethodChatStream
(ctx context.Context, msgs []Message, tools []Tool)
pkg/provider/openai.go:21
↓ 1 callersFunctionConnectionFromDB
(c db.AppSystemConnection)
pkg/app/system/types.go:116
↓ 1 callersMethodCreateAgent
CreateAgent creates an agent profile and attaches it to the given workspace in a single transaction.
pkg/app/agents/service.go:23
↓ 1 callersMethodCreateAgentProfile
(ctx context.Context, arg CreateAgentProfileParams)
pkg/app/agents/db/queries.sql.go:39
↓ 1 callersMethodCreateConnection
Connections TODO: reconsider whether a connection should be bound to a workspace. Slack/Discord style is one connection per user, with workspace_id ca
pkg/app/system/db/queries.sql.go:48
↓ 1 callersMethodCreateMemoryForUser
(ctx context.Context, arg CreateMemoryForUserParams)
pkg/app/notes/db/queries.sql.go:40
↓ 1 callersMethodCreateMessage
(ctx context.Context, arg CreateMessageParams)
pkg/app/chat/db/queries.sql.go:65
↓ 1 callersMethodCreateSession
CreateSession creates a new chat session in the given workspace owned by userID and attached to one or more agents.
pkg/client/client.go:228
↓ 1 callersMethodCreateSession
(ctx context.Context, arg CreateSessionParams)
pkg/app/chat/db/queries.sql.go:110
↓ 1 callersMethodCreateUser
Users
pkg/app/system/service.go:64
↓ 1 callersMethodCreateWSConnectRecord
Connections
pkg/app/system/service.go:298
↓ 1 callersMethodCreateWorkspace
Workspaces
pkg/app/system/service.go:182
↓ 1 callersMethodDeleteConnection
(ctx context.Context, connectionID string)
pkg/app/system/db/queries.sql.go:106
↓ 1 callersMethodDeleteUserPassword
(ctx context.Context, userID string)
pkg/app/system/db/queries.sql.go:115
↓ 1 callersMethodDeleteWSConnectRecord
(ctx context.Context, connectionID string)
pkg/app/system/service.go:306
↓ 1 callersMethodDescription
()
pkg/tool/tool.go:8
↓ 1 callersMethodFormatUserMemoryForPrompt
FormatUserMemoryForPrompt FormatForPrompt returns the memories that agent X has recorded about user Y as a single string for injection into the system
pkg/app/notes/service.go:68
↓ 1 callersMethodFullName
FullName returns the "author/name" identifier for this skill.
pkg/app/skills/types.go:23
↓ 1 callersMethodGetAdminID
(ctx context.Context)
main.go:97
↓ 1 callersMethodGetAgentFromWorkspace
(ctx context.Context, workspaceID, id string)
pkg/app/agents/service.go:51
↓ 1 callersMethodGetConnectionsByUser
(ctx context.Context, userID string)
pkg/app/system/service.go:310
↓ 1 callersMethodGetMembership
(ctx context.Context, userID, workspaceID string)
pkg/app/system/service.go:265
↓ 1 callersMethodGetSession
(ctx context.Context, id string)
pkg/app/chat/service.go:106
↓ 1 callersMethodGetSessionInWorkspace
(ctx context.Context, workspaceID, id string)
main.go:67
↓ 1 callersMethodGetUserByEmail
(ctx context.Context, email string)
pkg/app/system/service.go:109
↓ 1 callersMethodGetUserPasswordHash
User Passwords
pkg/app/system/db/queries.sql.go:231
↓ 1 callersMethodGetUserSetting
User scope
pkg/app/settings/service.go:60
↓ 1 callersMethodInstallSkill
InstallSkill records a skill installation in the given workspace. The metadata is snapshotted at install time so the agent doesn't need to call the re
pkg/app/skills/service.go:24
↓ 1 callersMethodListAgentsByWorkspace
(ctx context.Context, workspaceID string)
pkg/app/agents/service.go:62
↓ 1 callersMethodListMemoriesByAgentAndUser
(ctx context.Context, arg ListMemoriesByAgentAndUserParams)
pkg/app/notes/db/queries.sql.go:112
← previousnext →101–200 of 765, ranked by callers