MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

↓ 12 callersMethodBackfillEffort
BackfillEffort owes the attention set to every candidate, then writes the marker. owed is the number of jobs owed by this call (0 when the marker was
internal/decision/effort_backfill.go:121
↓ 12 callersFunctionCaptureSessionOwner
CaptureSessionOwner reads this process's session owner from the environment. Precedence for the pid, most explicit first: 1. $PAD_SESSION_PID — the h
internal/cli/session_owner.go:135
↓ 12 callersMethodClaimAccountByProvider
ClaimAccountByProvider is ClaimAccountByVerification for a sign-in provider that vouched for the address (TASK-3351): the provider's verified assertio
internal/store/account_claim.go:134
↓ 12 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:829
↓ 12 callersMethodDeleteSchedule
DeleteSchedule removes an item's schedule, its managed reminder row and its resolved occurrences, reporting whether there was one.
internal/store/schedules.go:1149
↓ 12 callersMethodDeleteScheduleLink
DeleteScheduleLink removes a link. It needs edit on both ends.
internal/store/commitment_links.go:866
↓ 12 callersMethodDeleteSession
DeleteSession destroys a session by its plaintext token.
internal/store/sessions.go:438
↓ 12 callersFunctionDeriveClaimCode
DeriveClaimCode produces the 6-digit code for the given (user, workspace) at the given wall-clock time. Exported so the Phase E "Connect project" moda
internal/server/claim_codes.go:78
↓ 12 callersFunctionFormatForTool
FormatForTool takes the raw embedded skill content and formats it for a specific tool. Returns the appropriately formatted content with tool-specific
internal/cli/agents.go:284
↓ 12 callersMethodGetItemQ
GetItemQ is GetItem parameterized over its executor, so the same read can run against the pool or on an in-flight transaction's connection (see Querye
internal/store/items.go:757
↓ 12 callersFunctionIsReservedItemField
IsReservedItemField reports whether key is system-written metadata rather than a user-facing schema field. Callers that filter, migrate, or render an
internal/models/item.go:322
↓ 12 callersMethodIsWorkspaceMember
IsWorkspaceMember checks if a user is a member of a workspace.
internal/store/workspace_members.go:971
↓ 12 callersMethodListDocuments
(workspaceID string, params models.DocumentListParams)
internal/store/documents.go:14
↓ 12 callersMethodListMCPAuditByUser
ListMCPAuditByUser returns the user's most recent audit rows in reverse-chronological order. limit caps the page; offset paginates. Caller must enforc
internal/store/mcp_audit.go:115
↓ 12 callersMethodListRemindersForItem
ListRemindersForItem returns every reminder on an item, armed or not, soonest first. History is included because a fired reminder is the record that a
internal/store/reminders.go:202
↓ 12 callersMethodListWorkspaceActivity
(workspaceID string, params models.ActivityListParams)
internal/store/activities.go:831
↓ 12 callersFunctionNULProtectedColumns
NULProtectedColumns returns the full population, oauth expansion included. Exported so the guard test and the migration generator consume the SAME va
internal/store/nulcolumns.go:535
↓ 12 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
↓ 12 callersFunctionProductionRegistry
ProductionRegistry returns a registry holding every question set the server ships. ConventionsCommentsSet is defined but NOT shipped: it was retired i
internal/decision/attention.go:149
↓ 12 callersMethodQueryContext
(ctx context.Context, query string, args ...any)
internal/store/store.go:994
↓ 12 callersFunctionRelativeTime
(t time.Time)
internal/cli/format.go:123
↓ 12 callersMethodServeInline
ServeInline reports whether an allowlisted attachment's bytes may be sent with Content-Disposition: inline. It is the server-side safety gate for BUG-
internal/attachments/mime.go:192
↓ 12 callersMethodSubscribe
Subscribe registers a local subscriber for the given workspace. Starts a Redis subscription for the workspace if this is the first local subscriber, a
internal/events/redis_bus.go:961
↓ 12 callersFunctionTrustedProxyRealIP
TrustedProxyRealIP returns middleware that rewrites r.RemoteAddr from X-Real-IP / X-Forwarded-For ONLY when the direct TCP peer is within one of the s
internal/server/middleware_realip.go:51
↓ 12 callersFunctionValidateExamples
ValidateExamples is the contractual mechanism by which cmdhelp v0.1 prevents documentation drift (spec §6, §11 Q5). For every example in every command
internal/cmdhelp/example_validation.go:28
↓ 12 callersFunctionValidatePartialFields
ValidatePartialFields validates ONLY the keys present in `patch` against the schema (TASK-2022, field-level PATCH / IDEA-1480). Unlike ValidateFields
internal/items/validate.go:322
↓ 12 callersMethodValidateToken
ValidateToken hashes the provided plaintext token, looks it up in the database, checks expiry, and updates last_used_at. Returns nil if the token is i
internal/store/api_tokens.go:311
↓ 12 callersFunctionWithCollectionAliasFallback
withCollectionAliasFallback runs op against the RAW collection slug the user typed, and — only if that fails specifically because the collection was n
internal/cli/collection_alias.go:59
↓ 12 callersFunctionWithTokenWorkspaceID
WithTokenWorkspaceID returns ctx decorated with a workspace-scope hint, mirroring TokenAuth's behaviour for workspace-scoped API tokens. Pass an empty
internal/server/context.go:59
↓ 12 callersFunctionWriteChatDirection
()
internal/cli/chat_direction_state.go:25
↓ 12 callersMethodadvance
(d time.Duration)
internal/server/task3939b_push_fixture_test.go:245
↓ 12 callersFunctionappSHA
(b []byte)
internal/server/handlers_apps_install_test.go:51
↓ 12 callersMethodauthorizeCollabAccess
authorizeCollabAccess mirrors RequireWorkspaceAccess but keyed on the item's workspace ID (the WS URL path doesn't carry a workspace slug). It checks:
internal/server/handlers_collab.go:595
↓ 12 callersMethodautoCreateWorkspace
--- Auto-create Workspace (TASK-432) --- autoCreateWorkspace creates a default workspace for a new user in cloud mode. Called after user creation in r
internal/server/handlers_cloud.go:1972
↓ 12 callersFunctionbootstrapBody
(email string)
internal/server/handlers_auth_bootstrap_token_test.go:45
↓ 12 callersMethodbuild
(workspace string)
internal/cmdhelp/dynamic_test.go:22
↓ 12 callersMethodbuildItem
---- the blocker has no commitment, or none left ---- buildItem makes an item in a collection whose terminal and abandoned options are its own: shippe
internal/store/commitment_gates_outcome_test.go:266
↓ 12 callersFunctionbytes32ForTest
()
internal/server/handlers_oauth_test.go:77
↓ 12 callersFunctioncalItems
(m map[string]any)
internal/server/handlers_calendar_test.go:43
↓ 12 callersFunctioncarPointingAt
carPointingAt creates an item in `cars` whose `color` relation names target.
internal/store/relation_links_test.go:49
↓ 12 callersFunctionchangesOf
changesOf reads the human-readable change list the PATCH handler stamps into an activity's metadata, which is what identifies WHICH write a row came f
internal/server/handlers_activity_debounce_actor_test.go:112
↓ 12 callersMethodchannelFor
(workspaceID string)
internal/events/redis_heartbeat_test.go:77
↓ 12 callersFunctionchdir
(t *testing.T, dir string)
internal/cli/agent_identity_test.go:87
↓ 12 callersMethodcommitFixture
nativeCommit is a schedule created native, so no conversion guards its overdue deadline. commitFixture is the legacy row a native write converts. comm
internal/store/commitment_c1_test.go:45
↓ 12 callersFunctioncommitmentJournal
(t *testing.T, s *Store, id string)
internal/store/commitment_journal_test.go:25
↓ 12 callersFunctioncommitmentOldRows
(t *testing.T, s *Store)
internal/store/commitment_dates_migration_test.go:102
↓ 12 callersFunctioncontainsToolText
containsToolText looks for substr in any TextContent block of res. MCP results can carry multiple content blocks; checking all of them keeps the asser
internal/mcp/dispatch_http_test.go:969
↓ 12 callersMethodconvention
(t *testing.T, title, fields, body string)
internal/decision/conventions_test.go:71
↓ 12 callersMethodcount
(t *testing.T, q string, args ...any)
internal/appstore/items_test.go:107
↓ 12 callersFunctioncountFor
countFor is the reverse count a viewer who sees everything gets.
internal/store/relation_links_test.go:39
↓ 12 callersFunctioncurrent
()
web/src/lib/stores/workspace.svelte.ts:272
↓ 12 callersFunctiondecodeErrorCode
(t *testing.T, rr *httptest.ResponseRecorder)
internal/server/handlers_items_bug3133_pending_guard_test.go:66
↓ 12 callersMethoddevice
device registers a device for u on a fresh live session, created ago ago.
internal/server/task3939b_push_fixture_test.go:150
↓ 12 callersMethoddo
(method, path, tok string, body any)
internal/server/workspace_access_notify_test.go:116
↓ 12 callersFunctiondrain
drain reads up to n events from ch with a short timeout so a missing/slow event doesn't hang the test.
internal/collab/bus_test.go:258
↓ 12 callersMethodemitItemEventTx
emitItemEventTx writes one item-subject event to the outbox on the caller's transaction, carrying the post-mutation snapshot. The snapshot must be re
internal/store/event_outbox.go:1074
↓ 12 callersMethodencrypt
encrypt encrypts plaintext using AES-256-GCM and returns a base64-encoded ciphertext prefixed with "enc:" to distinguish from plaintext values.
internal/store/encryption.go:33
↓ 12 callersFunctionexitedProcessPID
exitedProcessPID starts and reaps a trivial process, returning its pid, which is then dead. Skips on platforms without a shell.
internal/cli/session_arm_state_test.go:333
↓ 12 callersFunctionexpandPath
expandPath substitutes {key} placeholders in template using input. Each placeholder must appear as a non-empty string in input; otherwise expandPath r
internal/mcp/dispatch_http_routes.go:117
↓ 12 callersMethodexpect
(since int64, want ...string)
internal/server/workspace_access_notify_test.go:103
↓ 12 callersMethodexpr
Walks an expression in evaluation order; returns `safe` after it.
web/src/test/identityFenceAst.ts:1292
↓ 12 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:639
↓ 12 callersMethodfanOutFromRedis
fanOutLocally appends to the replay buffer and sends to every live local subscriber, under the single mutex — see SubscribeAndReplaySince for why thos
internal/watchevents/redis_bus.go:1496
↓ 12 callersMethodforcePast
forcePast moves the outstanding occurrence to the 28th at 09:00 UTC.
internal/store/schedule_copy_test.go:78
↓ 12 callersMethodgateRows
(t *testing.T)
internal/store/commitment_gates_test.go:36
↓ 12 callersMethodguest
(edit ...int)
internal/server/commitment_graph_entry_test.go:59
↓ 12 callersMethodhandleResponse
(resp *http.Response, result interface{})
internal/cli/client.go:3342
↓ 12 callersFunctioninitialCursor
BUG-3240: the room elects ONE seeder, the only peer allowed to run the client's lazy seed. Two tabs deciding by awareness both seeded a fresh doc (mea
internal/collab/seed_grant_bug3240_test.go:16
↓ 12 callersMethodinvalidate
Supersede every outstanding token without taking a new one.
web/src/lib/attachments/viewFence.ts:145
↓ 12 callersFunctionisDateOnly
(value: string)
web/src/lib/calendar/presentation.ts:264
↓ 12 callersFunctionisSupported
()
web/src/lib/stores/localIndexPersistence.ts:181
↓ 12 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:729
↓ 12 callersFunctionitoa
itoa is strconv.Itoa renamed to keep test bodies readable when they're already heavy on ref-formatting.
internal/store/wiki_links_test.go:1745
↓ 12 callersMethodjob
(t *testing.T, schema string)
internal/materialize/materialize_test.go:62
↓ 12 callersFunctionlinkWantError
(t *testing.T, err, sentinel error)
internal/schedule/links_test.go:61
↓ 12 callersMethodliveGen
liveGen reports the generation of the workspace's installed subscription, and whether there is one at all. Distinct from currentSubGen, which answers
internal/events/redis_heartbeat.go:388
↓ 12 callersFunctionmatchRequestBody
(text string)
internal/server/handlers_playbook_match_test.go:56
↓ 12 callersFunctionmentionUser
TASK-3917 (IDEA-3906): comment_mentions is a derived index of which humans a live comment @-mentions. These tests pin the lifecycle, the population of
internal/store/task3917_comment_mentions_test.go:21
↓ 12 callersFunctionmintServiceToken
(t *testing.T, srv *Server, in testInstall)
internal/server/task3394_install_tokens_test.go:107
↓ 12 callersFunctionmount
(ref = 'i1')
web/src/lib/components/items/itemDetailIdentityLoad.svelte.test.ts:186
↓ 12 callersMethodmovedTo
movedTo parses the response and returns the moved_to block. It also asserts the disclosure rule's negative half: when the block is absent the KEY must
internal/server/item_moved_to_test.go:181
↓ 12 callersFunctionnewAppFixture
(t *testing.T, opts Options)
internal/appstore/items_test.go:42
↓ 12 callersFunctionnewBug3837Fixture
(t *testing.T, accessLifespan time.Duration)
internal/server/bug3837_mcp_credential_tick_test.go:35
↓ 12 callersFunctionnewCloudEmailServer
newCloudEmailServer returns a cloud-mode server with a usable base URL and a capturing email sink, bootstrapped with one admin. This is the configurat
internal/server/handlers_verify_email_test.go:92
↓ 12 callersFunctionnewDownloadAuthzFixture
(t *testing.T, srv *Server)
internal/server/handlers_attachments_download_authz_test.go:83
↓ 12 callersFunctionnewHTTPResourceFetcher
newHTTPResourceFetcher wires an HTTPResourceFetcher over a test mux with a fixed authenticated user, mirroring the dispatch_http_*_test.go setup. The
internal/mcp/resources_http_test.go:24
↓ 12 callersMethodnewItem
(title string, assignee *string)
internal/server/task3939b_push_fixture_test.go:131
↓ 12 callersFunctionnewRefResolverFixture
(t *testing.T)
internal/server/handlers_ref_resolver_test.go:51
↓ 12 callersFunctionnewTestConfig
newTestConfig points DataDir at a fresh tmp dir and BrowserURL at the given test server. Most tests want both wired up together.
internal/cli/bootstrap_test.go:39
↓ 12 callersFunctionnewTypesafe
(apiKey, model string)
internal/decision/typesafe.go:149
↓ 12 callersFunctionnewUploadFixture
(t *testing.T)
internal/appstore/attachments_test.go:44
↓ 12 callersMethodnoLongerNeeded
(t *testing.T, i int)
internal/store/commitment_cancel_test.go:36
↓ 12 callersFunctiononeOf
(v string, set []string)
internal/store/schedules.go:106
↓ 12 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:194
↓ 12 callersFunctionreadArmState
readArmState reads and unmarshals the current session's arm-state file. A missing file returns (nil, path, nil) — the common "not armed" case, not an
internal/cli/session_arm_state.go:335
↓ 12 callersFunctionreadMigrationNames
readMigrationNames returns sorted .sql filenames from an embedded FS directory.
internal/store/store.go:673
↓ 12 callersFunctionrecoveryRunner
(t *testing.T)
internal/server/materialize_recovery_test.go:62
↓ 12 callersMethodrefuseAppPrincipalQ
refuseAppPrincipalQ returns ErrAppPrincipal when userID is a bot.
internal/store/app_principal.go:39
↓ 12 callersMethodresolveVisibleItem
resolveVisibleItem resolves {itemSlug} and enforces read visibility, writing the error response itself. Returns nil when the caller should stop.
internal/server/handlers_reminders.go:309
↓ 12 callersFunctionroleGateReason
roleGateReason is the reason for a refusal by a workspace-role gate. A guest holds grants, not a role, and a caller with no workspace role at all (a p
internal/server/server.go:3012
← previousnext →1,201–1,300 of 28,840, ranked by callers