MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions31,685 in github.com/PerpetualSoftware/pad

↓ 15 callersMethoddecrypt
decrypt decrypts a value that was encrypted with encrypt(). If the value doesn't have the "enc:" prefix, it's treated as plaintext (backward compatibi
internal/store/encryption.go:63
↓ 15 callersFunctiondelegatedAPIFixture
delegatedAPIFixture is the U6 app world (a companion, a system and a private collection, an app item, a person's comment) with a PERSON signed in thro
internal/server/task3399b_delegated_api_test.go:29
↓ 15 callersMethoddeleteDoomed
(t *testing.T)
internal/store/bug3425_deleted_collection_reads_test.go:36
↓ 15 callersFunctiondoRequestWithCookieFrom
doRequestWithCookieFrom is like doRequestWithCookie but lets the caller set the request RemoteAddr so tests can simulate a session jumping to a differ
internal/server/middleware_session_ip_test.go:18
↓ 15 callersFunctiondownloadAs
downloadAs issues GET or HEAD on the blob endpoint as a specific user + workspace role, bypassing the auth middleware the same way deleteAsUser does.
internal/server/handlers_attachments_download_authz_test.go:158
↓ 15 callersFunctioneachBackend
(t *testing.T, fn func(t *testing.T, s *store.Store))
internal/store/bug3244_set_aside_test.go:18
↓ 15 callersMethodexpand
(t *testing.T, item *models.Item, view *time.Location, from, to, now string)
internal/store/schedule_agenda_test.go:24
↓ 15 callersFunctionextractStructuredCLIError
extractStructuredCLIError scans stderr for the `pad-structured-error/v1: {json}\n` marker line and lifts the structured error envelope into an MCP res
internal/mcp/errors.go:670
↓ 15 callersFunctionfetchTimelineAuthed
fetchTimelineAuthed is fetchTimeline with a session, since these tests run on an instance that has an owner and therefore requires auth.
internal/server/handlers_activity_debounce_actor_test.go:237
↓ 15 callersFunctiongetSessions
(t *testing.T, baseURL, token string)
internal/server/handlers_sessions_test.go:26
↓ 15 callersFunctiongroupCreate
(t *testing.T, s *Server, u *models.User, name string, ids ...string)
internal/server/handlers_workspace_groups_test.go:59
↓ 15 callersFunctionids
(ns []Notification)
internal/store/task3939_push_dispatch_test.go:50
↓ 15 callersMethodinvalidateWorkspaceAccess
invalidateWorkspaceAccess is invalidateUserAccess for every connection on a workspace.
internal/server/access_kick.go:233
↓ 15 callersFunctionisUniqueViolation
isUniqueViolation checks whether an error is a unique constraint violation. Works for both SQLite (UNIQUE constraint failed) and PostgreSQL (duplicate
internal/store/items.go:735
↓ 15 callersFunctionisValidFieldKey
isValidFieldKey checks that a field name contains only safe characters (alphanumeric, underscore, hyphen). This prevents SQL injection when field keys
internal/store/store.go:1633
↓ 15 callersMethodlogin
(t *testing.T, addr, tok string, linkPending *bool)
internal/server/task4745_pending_link_test.go:128
↓ 15 callersMethodmanifest
manifest returns a valid manifest for the test app with one companion collection and the golden playbook as its artifact.
internal/server/handlers_apps_install_test.go:121
↓ 15 callersFunctionmcpEnabledTestServer
mcpEnabledTestServer builds a Server with cloud mode + a stub streamable-HTTP transport so tests targeting auth / discovery / routing don't need to dr
internal/server/handlers_mcp_test.go:480
↓ 15 callersFunctionmoveEntries
(t *testing.T, f *schedFixture, id string)
internal/store/commitment_move_test.go:25
↓ 15 callersMethodmustBePinDenial
mustBePinDenial fails unless rr is the 403 a pinned token gets, naming its workspace and how to mint an unscoped token.
internal/server/bug3982_pinned_token_test.go:64
↓ 15 callersFunctionmustCreateUser
(t *testing.T, srv *Server, email, name, role string)
internal/server/token_workspace_consent_scope_test.go:47
↓ 15 callersFunctionmustList
mustList reads a registry's session list, failing the test if the read itself failed. ListForUser gained an error when an out-of-process implementati
internal/server/session_presence_test.go:192
↓ 15 callersFunctionnativeBundle
(t *testing.T)
internal/store/commitment_bundle_v2_test.go:46
↓ 15 callersFunctionnewAppsEnv
(t *testing.T)
internal/server/handlers_apps_install_test.go:54
↓ 15 callersFunctionnewDeleteAuthzFixture
(t *testing.T, srv *Server)
internal/server/handlers_storage_delete_authz_test.go:57
↓ 15 callersFunctionnewFenceFixture
(t *testing.T)
internal/store/fenced_tx_test.go:40
↓ 15 callersFunctionnewMCPStallFixture
(t *testing.T, opts ...mcpgo.StreamableHTTPOption)
internal/server/bug3808_mcp_stalled_reader_test.go:43
↓ 15 callersFunctionnewParentFixture
(t *testing.T)
internal/mcp/dispatch_http_clear_parent_test.go:46
↓ 15 callersFunctionnewRecordingObserver
()
internal/watchevents/observer_test.go:30
↓ 15 callersFunctionnewRedisPresencePair
BUG-2698 — the registry half. These drive TWO RedisSessionPresence values against ONE miniredis, because that is what the bug is: two padd processes
internal/server/session_presence_redis_test.go:19
↓ 15 callersFunctionnewRequestCapture
()
internal/mcp/dispatch_http_advanced_test.go:907
↓ 15 callersFunctionnewTask4699World
newTask4699World signs in the agenda world's owner with the given account zone and day start; "" and -1 leave either unset.
internal/server/task4699_placement_test.go:28
↓ 15 callersFunctionnilIfEmpty
(s string)
internal/store/activities.go:1167
↓ 15 callersMethodnonTerminalFilter
nonTerminalFilter builds a WHERE fragment (plus ordered args) that keeps only items whose resolved done-field value is NOT one of their collection's t
internal/store/items.go:5578
↓ 15 callersMethodoauthAvailable
oauthAvailable is PLAN-2310 DR-1's second predicate: MCP available, an OAuth server constructed, and, off cloud, an https auth-server URL. The server
internal/server/handlers_admin_mcp.go:78
↓ 15 callersFunctionoauthOnlyCloud
oauthOnlyCloud is a cloud server with an initialized instance and an OAuth-only account holding a fresh session.
internal/server/bug3336_account_delete_test.go:92
↓ 15 callersFunctionoutboxPayloadFor
outboxPayloadFor returns the decoded payload of the single event of the given type for an item, failing if there is not exactly one.
internal/store/event_outbox_test.go:50
↓ 15 callersFunctionpackageJSONResult
packageJSONResult converts a CLI stdout string into an MCP tool result. JSON bodies surface as structuredContent; non-JSON falls back to text. Top-lev
internal/mcp/dispatch.go:200
↓ 15 callersMethodpendingOutbox
(t *testing.T)
internal/server/handlers_apps_delivery_test.go:89
↓ 15 callersMethodpersistedFields
persistedFields reads the destination item's fields blob back out of the database. Deliberately NOT the response body: the contract being asserted is
internal/server/handlers_items_copy_test.go:121
↓ 15 callersFunctionplantLegacyRows
dropAllNULTriggers turns the store's database into a pre-S2 one for the duration of a test, so a raw handle can plant the LEGACY rows this unit exists
internal/store/nulscan_test.go:19
↓ 15 callersMethodread
(t *testing.T, canRead func(string) bool)
internal/store/milestone_test.go:63
↓ 15 callersFunctionrefuse
(format string, args ...any)
internal/appstore/items.go:38
↓ 15 callersFunctionrunItemList
runItemList runs `pad item list <args>` in the given format and returns stdout, stderr and the command's error.
cmd/pad/bug4024_item_list_json_autopage_test.go:105
↓ 15 callersFunctionseedCollabFixture
seedCollabFixture creates the minimum fixture chain needed to test the collab WS endpoint: workspace + collection + item, all in the store, returning
internal/server/handlers_collab_test.go:62
↓ 15 callersFunctionsetSQLiteRestoreEnv
(t *testing.T, dataDir string)
cmd/pad/cmd_db_restore_test.go:612
↓ 15 callersFunctionsignupTime
signupTime is the TEXT form agent_signups' timestamps are stored and compared in: fixed-width RFC3339 UTC, so lexical order is time order.
internal/store/agent_signups.go:119
↓ 15 callersMethodspec
()
internal/store/fenced_tx_test.go:59
↓ 15 callersFunctionstartEditor
(t *testing.T, f *startFixture)
internal/server/task4914_start_demote_test.go:15
↓ 15 callersFunctionstartMode
(item *models.Item)
internal/server/bootstrap_start.go:34
↓ 15 callersFunctionstop
(make)
plugin/hooks/register.js:511
↓ 15 callersMethodstopMCPSessionTracker
stopMCPSessionTracker signals both sweepers to exit. Called from Server.Stop. Idempotent.
internal/server/middleware_mcp_session.go:327
↓ 15 callersFunctiontask3462ItemByTitle
(t *testing.T, srv *Server, wsSlug, coll, title string)
internal/server/task3462_builtin_origin_test.go:29
↓ 15 callersFunctiontask3867Verify
(e *tokenAuthEnv, body any)
internal/server/task3867_token_access_test.go:44
↓ 15 callersFunctiontokenWorkspaceID
tokenWorkspaceID returns the workspace ID set by the TokenAuth middleware, or an empty string if no token was used.
internal/server/middleware_auth.go:651
↓ 15 callersMethoduser
(t *testing.T, email string)
internal/server/handlers_needs_not_mine_test.go:352
↓ 15 callersFunctionveDoBearer
veDoBearer issues a request authenticated with a Bearer PAT (which skips CSRF). Mirrors the CLI / connector path through TokenAuth.
internal/server/middleware_verified_email_test.go:121
↓ 15 callersFunctionwaitForFrameWithEvent
(t *testing.T, frames <-chan string, eventType string)
internal/server/handlers_events_resume_test.go:65
↓ 15 callersFunctionwriteStorePlanLimitError
writeStorePlanLimitError answers a *store.PlanLimitError with the same 403 the advisory pre-check writes, and reports whether err was one. note, when
internal/server/handlers_cloud.go:1738
↓ 15 callersFunctionwriteWorkspaceNotFound
writeWorkspaceNotFound writes the workspace-resolution 404 (BUG-3069). The message is passed through because two doors have long said "Workspace not f
internal/server/server.go:3135
↓ 14 callersMethodAddConnectionWorkspace
AddConnectionWorkspace inserts a (request_id, workspace_id) row in the allow-list join table. Idempotent: re-adding an existing pair is a no-op (INSER
internal/store/oauth_connections.go:508
↓ 14 callersMethodAgendaCounts
AgendaCounts reads the counts series for one workspace over [from, to) in loc's days. scope is the caller's visibility, applied to the items before an
internal/store/agenda_counts.go:125
↓ 14 callersMethodCreateOAuthUser
CreateOAuthUser creates a user from an OAuth provider with a random unusable password. OAuth users can later set a password via the password reset flo
internal/store/users.go:951
↓ 14 callersMethodDecisions
Decisions returns the item's latest answer per question, each marked Current when it was computed from the item's present state. A nil runner returns
internal/decision/runner.go:780
↓ 14 callersMethodDeleteSchedule
DeleteSchedule removes an item's schedule, its managed reminder row and its resolved occurrences, reporting whether there was one.
internal/store/schedules.go:1203
↓ 14 callersMethodError
()
internal/models/view_calendar.go:44
↓ 14 callersMethodError
()
internal/schedule/caps.go:92
↓ 14 callersMethodGetItemBySlug
(workspaceID, slug string)
internal/store/items.go:939
↓ 14 callersMethodInsertMCPAuditEntry
InsertMCPAuditEntry persists one audit row. Called from the audit middleware's async writer; the caller owns the buffered channel + the ordering, so t
internal/store/mcp_audit.go:54
↓ 14 callersFunctionIsDBBusy
Two classes of "the database was busy or interrupted the work" (TASK-4278), kept apart because they promise different things to the caller. IsDBBusy:
internal/store/busy_error.go:38
↓ 14 callersFunctionIsTerminalItem
IsTerminalItem reports whether an item's fields map indicates the item is in a terminal state for its collection. This is the canonical Go-side "is do
internal/models/terminal.go:385
↓ 14 callersMethodListUserOAuthConnections
ListUserOAuthConnections returns every OAuth connection the user has active. "Active" means at least one access OR refresh token in the chain still ha
internal/store/connected_apps.go:59
↓ 14 callersMethodListWorkspaceActivity
(workspaceID string, params models.ActivityListParams)
internal/store/activities.go:831
↓ 14 callersMethodLockWorkspaceSeq
LockWorkspaceSeq takes the workspace lock every human item write takes for item_number and seq (insertItemTx, acquireWorkspaceSeqLock), so an app writ
internal/store/fenced_tx.go:159
↓ 14 callersFunctionNewRedisBusWithKeys
NewRedisBusWithKeys is NewRedisBus with an explicit key namespace (BUG-2724). cmd/pad/cmd_server.go uses this one, passing the value shared with the w
internal/events/redis_bus.go:905
↓ 14 callersFunctionNewStorage
NewStorage wraps a *store.Store as a fosite-compatible adapter. The store must be a fully-initialized pad store (migrations applied); no validation he
internal/oauth/storage.go:131
↓ 14 callersFunctionNewTitleEscaper
NewTitleEscaper precomputes the escaped forms for one rename. oldTitle is REQUIRED, not optional, and that is deliberate: it is the only thing that c
internal/links/links.go:563
↓ 14 callersFunctionNormalizeItemLinkType
NormalizeItemLinkType canonicalizes supported link types and returns an error for unknown values.
internal/models/item_links.go:33
↓ 14 callersFunctionPlaybookLibrary
PlaybookLibrary returns all pre-defined playbook categories with their playbooks. As of PLAN-1397's invokable-first overhaul (TASK-1403), the library
internal/collections/playbook_library.go:39
↓ 14 callersMethodRegisterPushDevice
RegisterPushDevice binds a push token to a session in ONE transaction. When this user already holds the token, the row is UPDATED in place: id and cre
internal/store/push_devices.go:51
↓ 14 callersMethodScheduleGates
ScheduleGates is what one reader is shown of an item's gates. It is DISPLAY only: it evaluates every gate without writing, and then leaves out of the
internal/store/commitment_gates.go:715
↓ 14 callersMethodSetAuthToken
SetAuthToken sets the authorization token for API requests.
internal/cli/client.go:147
↓ 14 callersMethodSetCommitmentRoles
SetCommitmentRoles replaces a schedule's role columns and marks them native. Writing a legacy_backfill row converts it, and the journal row it writes
internal/store/commitment.go:459
↓ 14 callersMethodSetOAuthServer
OAuth 2.1 authorization-server HTTP handlers (PLAN-943 TASK-951). Sub-PR C built the /register, /authorize, /authorize/decide and token endpoints + th
internal/server/handlers_oauth.go:79
↓ 14 callersMethodTotal
Total is the number of offending values.
internal/store/nulscan.go:123
↓ 14 callersMethodUpdateRoleSortOrder
UpdateRoleSortOrder batch-updates role_sort_order for a list of items. Every entry must update exactly one live item in workspaceID, or the whole batc
internal/store/agent_roles.go:516
↓ 14 callersFunctionacquire
(exemptRoot: HTMLElement)
web/src/lib/a11y/viewerBackdrop.ts:217
↓ 14 callersFunctionappSHA
(b []byte)
internal/server/handlers_apps_install_test.go:52
↓ 14 callersFunctionasCap
(t *testing.T, err error, kind CapKind)
internal/schedule/caps_test.go:9
↓ 14 callersFunctionassertSourceSet
(t *testing.T, p *AttachmentCopyPlan, want ...string)
internal/store/attachments_copy_plan_test.go:115
↓ 14 callersMethodcancelLink
The cancel policy and "No longer needed" (TASK-4353, 2c). A link's cancel_policy says what a cancelled parent occurrence does to the child occurrence
internal/store/commitment_cancel_test.go:19
↓ 14 callersFunctionchatMessage
(t *testing.T, rr *httptest.ResponseRecorder)
internal/server/handlers_chat_test.go:57
↓ 14 callersFunctionchunkStrings
chunkStrings splits ids into slices of at most size elements.
internal/store/attachments_copy_plan.go:759
↓ 14 callersFunctionclearDecisionEnv
(t *testing.T)
internal/server/decision_settings_test.go:37
↓ 14 callersFunctionclearSessionEnv
clearSessionEnv unsets every variable CaptureSessionOwner and RegisterSession read, so a test's own harness (this suite runs inside Claude Code someti
internal/cli/session_owner_test.go:15
↓ 14 callersFunctioncontentState
(t *testing.T, s *store.Store, itemID string)
internal/store/bug3124_content_bearing_test.go:51
↓ 14 callersFunctioncountOpLog
BUG-2840 half B. On the no-room / no-applier path a content PATCH prunes the item's Yjs op-log and writes items.content. The prune used to run FIRST,
internal/server/handlers_collab_prune_atomicity_test.go:27
↓ 14 callersFunctioncreateBlocksLink
helper: create a "blocks" link from source to target
internal/server/handlers_dashboard_test.go:37
↓ 14 callersFunctiondecisionSettingsServer
decisionSettingsServer returns a server with an encryption key, the production question sets, a tick that never fires on its own (enabling typesafe mu
internal/server/decision_settings_test.go:47
↓ 14 callersFunctiondeviceTokens
(t *testing.T, s *Store, userID string)
internal/store/push_devices_test.go:39
← previousnext →1,101–1,200 of 31,685, ranked by callers