MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions31,743 in github.com/PerpetualSoftware/pad

↓ 174 callersMethodCreateAPIToken
(userID string, input models.APITokenCreate, defaultExpiryDays, maxLifetimeDays int, opts ...MintOption)
internal/store/api_tokens.go:33
↓ 172 callersMethodPrintf
(_ context.Context, format string, v ...interface{})
cmd/pad/redis_logger.go:39
↓ 170 callersMethodRebind
Rebind converts a query with "?" placeholders to the dialect's format. For SQLite this is a no-op. For PostgreSQL, "?" becomes "$1", "$2", etc.
internal/store/dialect.go:29
↓ 170 callersMethodgetWorkspaceID
getWorkspaceID resolves workspace slug/ID from the request. If RequireWorkspaceAccess already resolved the workspace, reads from context. Otherwise fa
internal/server/server.go:3554
↓ 169 callersMethodset
The list an outside fetch got back, under the token it reserved.
web/src/lib/stores/pendingInvitations.svelte.ts:65
↓ 168 callersMethodName
()
internal/needs/needs.go:355
↓ 166 callersMethodGetCollectionBySlug
(workspaceID, slug string)
internal/store/collections.go:357
↓ 165 callersMethodListItems
(workspaceID string, params models.ItemListParams)
internal/store/items.go:1274
↓ 162 callersMethodDeleteItem
(T, ...store.MutationOption)
internal/appstore/testdata/genericifacebody/x.go:8
↓ 161 callersMethodD
D returns the store's dialect for building backend-specific SQL.
internal/store/store.go:400
↓ 159 callersMethodstatus
(t *testing.T, tok string, it models.Item, status string)
internal/server/task3615_catch_up_test.go:98
↓ 158 callersMethodDispatch
Dispatch satisfies the Dispatcher interface. cliArgs are accepted for interface compatibility but ignored — HTTPHandlerDispatcher reads the structured
internal/mcp/dispatch_http.go:289
↓ 157 callersMethodreload
(t *testing.T, itemID string)
internal/store/schedule_fire_test.go:33
↓ 157 callersFunctiontextOf
textOf returns the text of the first content block, or empty string. Robust to mcp-go's content-type variations (TextContent, ErrorContent).
internal/mcp/catalog_test.go:397
↓ 154 callersFunctionfixedUserResolver
fixedUserResolver is a tiny helper for the unit tests that need a deterministic user without standing up the auth middleware.
internal/mcp/dispatch_http_test.go:23
↓ 153 callersFunctiongetClient
()
cmd/pad/main.go:387
↓ 152 callersFunctionwaitFor
( what: string, fn: () => T | null | undefined | false | Promise<T | null | undefined | false>, timeoutMs =
web/e2e/lib/real-install.ts:288
↓ 149 callersFunctiontick
()
web/src/lib/collab/materializer/materializerParity.svelte.test.ts:191
↓ 148 callersMethodcreate
(t *testing.T, in models.ScheduleCreate)
internal/store/schedules_test.go:42
↓ 147 callersMethodSetMemberCollectionAccess
SetMemberCollectionAccess updates a member's collection_access mode and replaces their specific collection grants atomically.
internal/store/workspace_members.go:720
↓ 147 callersMethodcall
(tool: string, args: Record<string, unknown>)
web/src/mcp-app/bridge.ts:20
↓ 146 callersFunctioncurrentUser
currentUser returns the authenticated user from the request context, or nil if no user is authenticated.
internal/server/middleware_auth.go:658
↓ 145 callersFunctionnewAgendaWorld
(t *testing.T, slugs ...string)
internal/server/handlers_agenda_test.go:36
↓ 144 callersMethodadd
(m: ChatMessage)
web/src/lib/stores/chatThread.svelte.test.ts:93
↓ 143 callersMethodremove
* Delete a message (V6, V7: idempotent, a repeat answers 200 with the same * tombstone) and merge the tombstone in place only after server success.
web/src/lib/stores/chatThread.svelte.ts:567
↓ 142 callersMethodErr
Err is the stream's first write or flush failure, or nil.
internal/server/sse_stream.go:85
↓ 141 callersMethodCreateItemGrant
--- Item Grants --- CreateItemGrant creates a direct grant on an item for a user.
internal/store/grants.go:128
↓ 139 callersMethodGetUserByEmail
GetUserByEmail retrieves a user by email address (case-insensitive).
internal/store/users.go:281
↓ 138 callersMethodError
()
internal/cli/client.go:2697
↓ 138 callersFunctionneedsBackends
TASK-3920: GET /me/needs, the cross-workspace needs-you inbox. Every test runs on SQLite and, with PAD_TEST_POSTGRES_URL set, on Postgres too. Fixture
internal/server/handlers_me_needs_test.go:29
↓ 137 callersMethodAddr
Addr returns the host:port listen address.
internal/config/config.go:1034
↓ 136 callersFunctiondoRequestWithHeaders
doRequestWithHeaders is a thin variant of doRequest that lets a test set arbitrary request headers (e.g. Authorization) without spinning up a real aut
internal/server/handlers_items_test.go:19
↓ 135 callersMethodurl
(rest string)
internal/server/bug3814_version_chain_snapshot_test.go:92
↓ 132 callersMethodtoken
(u *models.User, scopes string)
internal/server/handlers_commitments_http_test.go:47
↓ 131 callersMethodStop
()
internal/server/home_hint.go:17
↓ 131 callersFunctionmustUser
(t *testing.T, srv *Server, email, username, role string)
internal/server/authz_cross_workspace_test.go:76
↓ 129 callersFunctioncaptureStdout
captureStdout runs fn with os.Stdout redirected and returns what it wrote. The list commands print through fmt/os.Stdout rather than cmd.OutOrStdout,
cmd/pad/format_markdown_routing_test.go:48
↓ 127 callersFunctionNewWorkspaceState
NewWorkspaceState returns a state pre-seeded with `initial`. Pass an empty string to start with no default — the first tool call will then need an exp
internal/mcp/workspace.go:57
↓ 125 callersMethodLen
()
internal/schedule/internal/rrule/util.go:22
↓ 121 callersMethodDecode
Decode reads bytes from r and returns the decoded image plus the detected format ("png", "jpeg", "gif", "bmp", "tiff", …). The returned format is the
internal/attachments/processor.go:35
↓ 121 callersFunctionPrintJSON
PrintJSON prints any value as indented (human-readable) JSON.
internal/cli/format.go:509
↓ 121 callersMethodmust
(rr *httptest.ResponseRecorder, code int, what string)
internal/server/workspace_access_notify_test.go:121
↓ 119 callersMethodWrite
(p []byte)
internal/server/sse_stream.go:91
↓ 119 callersFunctiongetWorkspace
()
cmd/pad/main.go:396
↓ 119 callersMethodmustResolve
(t *testing.T, item *models.Item, in ResolveInput, now string)
internal/store/schedule_resolve_test.go:72
↓ 117 callersFunctionrender
()
web/src/routes/(console)/settings/admin/mcpAuditTab.svelte.test.ts:33
↓ 116 callersFunctionparseTime
(s string)
internal/store/store.go:1661
↓ 115 callersFunctionNewMemoryOpBus
NewMemoryOpBus returns a ready-to-use in-process bus.
internal/collab/memory_bus.go:38
↓ 114 callersMethodclear
()
web/src/lib/stores/lastWorkspace.svelte.ts:26
↓ 113 callersMethodError
()
internal/mcp/catalog.go:289
↓ 112 callersFunctiondecodeJSON
2 MiB decodeJSON reads and unmarshals the JSON body into v. Wraps the body in http.MaxBytesReader so an attacker can't exhaust memory by POSTing a mul
internal/server/server.go:3311
↓ 112 callersFunctionloginTestUser
loginTestUser creates a user + session, returns the user + the raw session token suitable for AddCookie.
internal/server/handlers_oauth_test.go:2439
↓ 107 callersMethodIsZero
IsZero reports whether the secret is empty.
internal/secret/secret.go:53
↓ 106 callersFunctiondoRequestWithBearer
doRequestWithBearer dispatches a request with an Authorization: Bearer header set. The existing test helpers in server_test.go don't take a token para
internal/server/middleware_auth_public_paths_test.go:25
↓ 106 callersMethodmember
(ws *models.Workspace, u *models.User, role string)
internal/server/handlers_me_needs_test.go:67
↓ 105 callersMethodClose
Close shuts down the bus. All subscriber channels are closed under the same write-lock that gates Publish/Subscribe so a final inflight Publish can't
internal/collab/memory_bus.go:209
↓ 105 callersMethodallEdit
()
internal/store/commitment_links_test.go:54
↓ 105 callersFunctionmkUser
(t *testing.T, srv *Server, email string)
internal/server/handlers_storage_delete_authz_test.go:107
↓ 104 callersMethodClose
Close shuts the bus down, closing every subscriber channel.
internal/watchevents/watchevents.go:356
↓ 104 callersFunctionNewClientFromURL
NewClientFromURL creates a client from a full base URL (e.g., "https://app.getpad.dev").
internal/cli/client.go:81
↓ 104 callersMethodcontains
(id string)
cmd/pad/cmd_watch_chat.go:201
↓ 103 callersMethodSetCloudMode
SetCloudMode enables cloud mode with the shared sidecar secret(s). Accepts a comma-separated list of secrets for rotation support: "new-key,old-key" —
internal/server/server.go:1018
↓ 100 callersMethodpath
(p string)
internal/server/task3401_app_api_test.go:195
↓ 99 callersMethoddo
(t *testing.T, method, path string, body any)
internal/server/task4699_placement_test.go:50
↓ 97 callersFunctioncreateWSForTest
(t *testing.T, srv *Server)
internal/server/server_test.go:275
↓ 95 callersFunctionNewRoomManager
NewRoomManager wires the store + bus together with production defaults.
internal/collab/manager.go:363
↓ 95 callersMethodinput
()
internal/store/agent_claim_test.go:62
↓ 95 callersFunctionsetupWatchTestUser
setupWatchTestUser seeds a workspace + item, mints a real user + user-scoped Bearer token (mirrors handlers_stars_test.go's pattern), and returns ever
internal/server/handlers_watches_test.go:16
↓ 94 callersMethodClose
Close shuts down the event bus and cleans up resources.
internal/events/bus.go:321
↓ 94 callersFunctionNewSQLite
NewSQLite returns a *store.Store backed by a fresh SQLite file in t.TempDir(), fully migrated. See the package doc for the template+copy mechanism. St
internal/store/storetest/storetest.go:55
↓ 94 callersMethodmustExec
(t *testing.T, query string, args ...interface{})
internal/store/workspace_purge_test.go:62
↓ 92 callersFunctionNew
New creates a new Metrics instance with a custom registry and registers all application metrics plus Go runtime and process collectors.
internal/metrics/metrics.go:572
↓ 92 callersMethodString
String renders a violation the way the CLI reports it.
internal/store/nulscan.go:77
↓ 90 callersMethodSet
Set adds or replaces the credential for the given server URL. The canonical URL is mirrored into the value's ServerURL field so a caller reading the c
internal/cli/credentials.go:336
↓ 90 callersMethodas
(tok, method, path string, body any)
internal/server/handlers_commitments_http_test.go:79
↓ 90 callersMethodassign
(t *testing.T, itemID, userID string)
internal/store/schedule_fire_test.go:75
↓ 88 callersFunctioncurrentUserID
currentUserID returns the authenticated user's ID, or empty string.
internal/server/middleware_auth.go:720
↓ 87 callersMethodWrite
(p []byte)
internal/mcp/response_cap.go:164
↓ 87 callersFunctionnewSchedHTTP
(t *testing.T)
internal/server/handlers_commitments_http_test.go:32
↓ 87 callersFunctionptr
(v T)
internal/store/schedule_fire.go:218
↓ 86 callersMethodSeedCollectionsFromTemplate
SeedCollectionsFromTemplate seeds the workspace with collections from the named template. An empty template name materializes the default collections
internal/store/collections.go:1264
↓ 86 callersMethodUnsubscribe
Unsubscribe removes a subscriber and closes its channel.
internal/events/bus.go:280
↓ 85 callersMethodExportWorkspace
ExportWorkspace exports all data for a workspace into a portable format, every section read from ONE snapshot (see ExportWorkspaceSnapshot).
internal/store/export.go:154
↓ 85 callersMethodclose
()
web/src/lib/services/sseStreamBudget.svelte.test.ts:166
↓ 84 callersFunctionWithCurrentUser
Exported context-key helpers for callers that need to synthesize an authenticated request without going through the auth middleware chain (e.g. the in
internal/server/context.go:36
↓ 83 callersMethodReplace
(text string)
internal/store/redact_match.go:75
↓ 83 callersFunctionliveCmdhelpDoc
liveCmdhelpDoc returns a minimal cmdhelp.Document with every command path the read-only catalog references. Lighter than re-running pad's full cobra e
internal/mcp/catalog_readonly_test.go:554
↓ 82 callersFunctionnewCopyPreflightFixture
(t *testing.T)
internal/server/handlers_items_copy_preflight_test.go:81
↓ 81 callersMethodCreateComment
CreateComment adds a new comment to an item. userID is the authenticated user authoring the comment (empty for agent/system comments); it's stored as
internal/store/comments.go:20
↓ 81 callersMethodEventsSince
EventsSince returns events for a workspace with IDs greater than sinceID. Used to replay missed events on SSE reconnect (Last-Event-ID). Returns nil
internal/events/bus.go:318
↓ 81 callersFunctionoauthEnabledTestServer
oauthEnabledTestServer builds a Server with cloud mode + a real internal/oauth.Server backed by the test store. Returns the Server so each test can dr
internal/server/handlers_oauth_test.go:54
↓ 80 callersMethodUpdateCollection
(id string, input models.CollectionUpdate)
internal/store/collections.go:559
↓ 79 callersMethodCount
()
internal/ics/ics.go:30
↓ 79 callersMethodSubscribe
Subscribe returns a channel that receives every future Notification, with NO replay. There is exactly one logical stream (unlike internal/events.Event
internal/watchevents/watchevents.go:315
↓ 79 callersFunctionregisterTestClient
===================================================================== Helpers ===================================================================== re
internal/server/handlers_oauth_test.go:2412
↓ 78 callersFunctionbothBackends
bothBackends runs body against SQLite and, under `make test-pg`, Postgres. testServer is SQLite-only whatever gate is running, so the Postgres leg nee
internal/server/bug3163_reserved_write_doors_test.go:38
↓ 77 callersMethodGetSchedule
GetSchedule returns an item's schedule, or (nil, nil) when it has none.
internal/store/schedules.go:444
↓ 77 callersFunctionNew
New creates a new in-memory EventBus with default replay buffer settings.
internal/events/bus.go:725
↓ 77 callersFunctionnotifyUser
(t *testing.T, s *Store, email string)
internal/store/notification_settings_test.go:27
↓ 76 callersMethodImportWorkspace
ImportWorkspace is ImportWorkspaceWithReport for callers with no use for the report.
internal/store/export.go:736
← previousnext →101–200 of 31,743, ranked by callers