Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
28,840 in github.com/PerpetualSoftware/pad
⨍
Functions
28,840
◇
Types & classes
3,245
↓ 12 callers
Method
BackfillEffort
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 callers
Function
CaptureSessionOwner
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 callers
Method
ClaimAccountByProvider
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 callers
Method
CreateOAuthUser
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 callers
Method
DeleteSchedule
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 callers
Method
DeleteScheduleLink
DeleteScheduleLink removes a link. It needs edit on both ends.
internal/store/commitment_links.go:866
↓ 12 callers
Method
DeleteSession
DeleteSession destroys a session by its plaintext token.
internal/store/sessions.go:438
↓ 12 callers
Function
DeriveClaimCode
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 callers
Function
FormatForTool
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 callers
Method
GetItemQ
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 callers
Function
IsReservedItemField
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 callers
Method
IsWorkspaceMember
IsWorkspaceMember checks if a user is a member of a workspace.
internal/store/workspace_members.go:971
↓ 12 callers
Method
ListDocuments
(workspaceID string, params models.DocumentListParams)
internal/store/documents.go:14
↓ 12 callers
Method
ListMCPAuditByUser
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 callers
Method
ListRemindersForItem
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 callers
Method
ListWorkspaceActivity
(workspaceID string, params models.ActivityListParams)
internal/store/activities.go:831
↓ 12 callers
Function
NULProtectedColumns
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 callers
Function
PlaybookLibrary
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 callers
Function
ProductionRegistry
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 callers
Method
QueryContext
(ctx context.Context, query string, args ...any)
internal/store/store.go:994
↓ 12 callers
Function
RelativeTime
(t time.Time)
internal/cli/format.go:123
↓ 12 callers
Method
ServeInline
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 callers
Method
Subscribe
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 callers
Function
TrustedProxyRealIP
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 callers
Function
ValidateExamples
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 callers
Function
ValidatePartialFields
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 callers
Method
ValidateToken
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 callers
Function
WithCollectionAliasFallback
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 callers
Function
WithTokenWorkspaceID
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 callers
Function
WriteChatDirection
()
internal/cli/chat_direction_state.go:25
↓ 12 callers
Method
advance
(d time.Duration)
internal/server/task3939b_push_fixture_test.go:245
↓ 12 callers
Function
appSHA
(b []byte)
internal/server/handlers_apps_install_test.go:51
↓ 12 callers
Method
authorizeCollabAccess
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 callers
Method
autoCreateWorkspace
--- 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 callers
Function
bootstrapBody
(email string)
internal/server/handlers_auth_bootstrap_token_test.go:45
↓ 12 callers
Method
build
(workspace string)
internal/cmdhelp/dynamic_test.go:22
↓ 12 callers
Method
buildItem
---- 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 callers
Function
bytes32ForTest
()
internal/server/handlers_oauth_test.go:77
↓ 12 callers
Function
calItems
(m map[string]any)
internal/server/handlers_calendar_test.go:43
↓ 12 callers
Function
carPointingAt
carPointingAt creates an item in `cars` whose `color` relation names target.
internal/store/relation_links_test.go:49
↓ 12 callers
Function
changesOf
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 callers
Method
channelFor
(workspaceID string)
internal/events/redis_heartbeat_test.go:77
↓ 12 callers
Function
chdir
(t *testing.T, dir string)
internal/cli/agent_identity_test.go:87
↓ 12 callers
Method
commitFixture
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 callers
Function
commitmentJournal
(t *testing.T, s *Store, id string)
internal/store/commitment_journal_test.go:25
↓ 12 callers
Function
commitmentOldRows
(t *testing.T, s *Store)
internal/store/commitment_dates_migration_test.go:102
↓ 12 callers
Function
containsToolText
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 callers
Method
convention
(t *testing.T, title, fields, body string)
internal/decision/conventions_test.go:71
↓ 12 callers
Method
count
(t *testing.T, q string, args ...any)
internal/appstore/items_test.go:107
↓ 12 callers
Function
countFor
countFor is the reverse count a viewer who sees everything gets.
internal/store/relation_links_test.go:39
↓ 12 callers
Function
current
()
web/src/lib/stores/workspace.svelte.ts:272
↓ 12 callers
Function
decodeErrorCode
(t *testing.T, rr *httptest.ResponseRecorder)
internal/server/handlers_items_bug3133_pending_guard_test.go:66
↓ 12 callers
Method
device
device registers a device for u on a fresh live session, created ago ago.
internal/server/task3939b_push_fixture_test.go:150
↓ 12 callers
Method
do
(method, path, tok string, body any)
internal/server/workspace_access_notify_test.go:116
↓ 12 callers
Function
drain
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 callers
Method
emitItemEventTx
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 callers
Method
encrypt
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 callers
Function
exitedProcessPID
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 callers
Function
expandPath
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 callers
Method
expect
(since int64, want ...string)
internal/server/workspace_access_notify_test.go:103
↓ 12 callers
Method
expr
Walks an expression in evaluation order; returns `safe` after it.
web/src/test/identityFenceAst.ts:1292
↓ 12 callers
Function
extractStructuredCLIError
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 callers
Method
fanOutFromRedis
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 callers
Method
forcePast
forcePast moves the outstanding occurrence to the 28th at 09:00 UTC.
internal/store/schedule_copy_test.go:78
↓ 12 callers
Method
gateRows
(t *testing.T)
internal/store/commitment_gates_test.go:36
↓ 12 callers
Method
guest
(edit ...int)
internal/server/commitment_graph_entry_test.go:59
↓ 12 callers
Method
handleResponse
(resp *http.Response, result interface{})
internal/cli/client.go:3342
↓ 12 callers
Function
initialCursor
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 callers
Method
invalidate
Supersede every outstanding token without taking a new one.
web/src/lib/attachments/viewFence.ts:145
↓ 12 callers
Function
isDateOnly
(value: string)
web/src/lib/calendar/presentation.ts:264
↓ 12 callers
Function
isSupported
()
web/src/lib/stores/localIndexPersistence.ts:181
↓ 12 callers
Function
isUniqueViolation
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 callers
Function
itoa
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 callers
Method
job
(t *testing.T, schema string)
internal/materialize/materialize_test.go:62
↓ 12 callers
Function
linkWantError
(t *testing.T, err, sentinel error)
internal/schedule/links_test.go:61
↓ 12 callers
Method
liveGen
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 callers
Function
matchRequestBody
(text string)
internal/server/handlers_playbook_match_test.go:56
↓ 12 callers
Function
mentionUser
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 callers
Function
mintServiceToken
(t *testing.T, srv *Server, in testInstall)
internal/server/task3394_install_tokens_test.go:107
↓ 12 callers
Function
mount
(ref = 'i1')
web/src/lib/components/items/itemDetailIdentityLoad.svelte.test.ts:186
↓ 12 callers
Method
movedTo
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 callers
Function
newAppFixture
(t *testing.T, opts Options)
internal/appstore/items_test.go:42
↓ 12 callers
Function
newBug3837Fixture
(t *testing.T, accessLifespan time.Duration)
internal/server/bug3837_mcp_credential_tick_test.go:35
↓ 12 callers
Function
newCloudEmailServer
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 callers
Function
newDownloadAuthzFixture
(t *testing.T, srv *Server)
internal/server/handlers_attachments_download_authz_test.go:83
↓ 12 callers
Function
newHTTPResourceFetcher
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 callers
Method
newItem
(title string, assignee *string)
internal/server/task3939b_push_fixture_test.go:131
↓ 12 callers
Function
newRefResolverFixture
(t *testing.T)
internal/server/handlers_ref_resolver_test.go:51
↓ 12 callers
Function
newTestConfig
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 callers
Function
newTypesafe
(apiKey, model string)
internal/decision/typesafe.go:149
↓ 12 callers
Function
newUploadFixture
(t *testing.T)
internal/appstore/attachments_test.go:44
↓ 12 callers
Method
noLongerNeeded
(t *testing.T, i int)
internal/store/commitment_cancel_test.go:36
↓ 12 callers
Function
oneOf
(v string, set []string)
internal/store/schedules.go:106
↓ 12 callers
Function
packageJSONResult
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 callers
Function
readArmState
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 callers
Function
readMigrationNames
readMigrationNames returns sorted .sql filenames from an embedded FS directory.
internal/store/store.go:673
↓ 12 callers
Function
recoveryRunner
(t *testing.T)
internal/server/materialize_recovery_test.go:62
↓ 12 callers
Method
refuseAppPrincipalQ
refuseAppPrincipalQ returns ErrAppPrincipal when userID is a bot.
internal/store/app_principal.go:39
↓ 12 callers
Method
resolveVisibleItem
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 callers
Function
roleGateReason
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
← previous
next →
1,201–1,300 of 28,840, ranked by callers