Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
6,005 in github.com/PerpetualSoftware/pad
⨍
Functions
6,005
◇
Types & classes
763
↓ 1 callers
Function
isZeroOpacity
(value: string | undefined)
web/src/lib/utils/hiddenContentDetector.ts:233
↓ 1 callers
Function
isolateEnv
isolateEnv points HOME and PATH at empty temp directories and chdirs into an empty temp directory, so DetectTools sees none of this machine's real sig
internal/cli/agents_test.go:164
↓ 1 callers
Function
item
(id: string, sort_order: number, created_at: string)
web/src/lib/collections/itemSort.test.ts:7
↓ 1 callers
Function
itemComparator
( mode: SortMode, collection: Collection )
web/src/lib/collections/itemSort.ts:51
↓ 1 callers
Function
itemExportCmd
--- artifact export / import ---
cmd/pad/cmd_item.go:1256
↓ 1 callers
Function
itemImportCmd
()
cmd/pad/cmd_item.go:1355
↓ 1 callers
Function
itemLinkRoutesKeys
itemLinkRoutesKeys returns the registered link_type values in stable sort order, used in error messages so users see the same listing every time.
internal/mcp/catalog_item.go:491
↓ 1 callers
Function
itemMatchesParentFilter
itemMatchesParentFilter mirrors the CLI's parent-filter matching (cmd/pad/main.go's changelogCmd): case-insensitive comparison against the item's pare
internal/server/handlers_project_intel.go:64
↓ 1 callers
Function
itemMissingHint
itemMissingHint is the per-error-code hint generator for ErrItemNotFound. References the actual ref + route so the agent can pin the failure without r
internal/mcp/errors.go:1010
↓ 1 callers
Function
itoa
itoa is a tiny strconv.Itoa wrapper kept local to avoid an extra import in this single-file test.
internal/server/handlers_admin_users_test.go:194
↓ 1 callers
Function
joinCmd
()
cmd/pad/cmd_workspace.go:211
↓ 1 callers
Function
joinSorted
joinSorted concatenates ss with ", " between values. Caller is expected to pass a pre-sorted slice (the only call site uses itemLinkRoutesKeys which s
internal/mcp/catalog_item.go:503
↓ 1 callers
Function
jsonLen
jsonLen marshals v to compact JSON and returns the byte count. Test helper; errors are squashed because they'd indicate a programming error in the tes
internal/server/handlers_bootstrap_test.go:747
↓ 1 callers
Function
jsonSchemaType
(catalogType: string)
web/src/lib/webmcp/descriptors.ts:51
↓ 1 callers
Function
jsonStringList
jsonStringList encodes a []string as a JSON array string suitable for both SQLite (TEXT column) and Postgres (JSONB column — pgx accepts a JSON-shaped
internal/store/oauth.go:755
↓ 1 callers
Function
keys
keys is a tiny helper for deterministic-ish error messages — fmt.Sprintf("%v", map) order isn't stable across Go versions and hides the actual content
internal/server/handlers_export_bundle_test.go:312
↓ 1 callers
Function
keysNotIn
keysNotIn returns the entries of want that are not already present in have. Used to detect parent lock keys that appeared on a post-lock re-read (BUG-
internal/store/items.go:3660
↓ 1 callers
Function
keysOf
(m map[string]ActionFn)
internal/mcp/catalog_project_test.go:54
↓ 1 callers
Function
kindForCollectionSlug
kindForCollectionSlug maps a collection slug to the artifact Kind it exports as. Only the playbooks and conventions collections carry the structured f
internal/server/handlers_artifact_export.go:20
↓ 1 callers
Function
knownTriggersList
knownTriggersList returns the accepted-triggers set as a comma-joined string for assertion-failure messages.
internal/collections/playbook_library_test.go:234
↓ 1 callers
Method
lastID
()
internal/server/handlers_account_test.go:54
↓ 1 callers
Function
lastIndexOf
(s string, c byte)
internal/store/store_test.go:239
↓ 1 callers
Function
libraryActivateCmd
()
cmd/pad/cmd_library.go:242
↓ 1 callers
Function
libraryCmd
()
cmd/pad/cmd_library.go:16
↓ 1 callers
Function
libraryGetCmd
()
cmd/pad/cmd_library.go:156
↓ 1 callers
Function
libraryGroupCmd
()
cmd/pad/groups.go:163
↓ 1 callers
Function
linkCmd
()
cmd/pad/cmd_workspace.go:570
↓ 1 callers
Function
listCmd
()
cmd/pad/cmd_item.go:269
↓ 1 callers
Method
listItemsFTS
(workspaceID string, params models.ItemListParams)
internal/store/items.go:1547
↓ 1 callers
Method
listParentChildLockKeys
listParentChildLockKeys returns every target_id this item is the `source_id` of under a childLinkTypes link — i.e. every parent whose children-set inc
internal/store/items.go:3692
↓ 1 callers
Method
listUserCollectionGrants
(workspaceID, userID string)
internal/store/grants.go:201
↓ 1 callers
Method
listUserItemGrants
(workspaceID, userID string)
internal/store/grants.go:231
↓ 1 callers
Function
lockedCopyFromSQLiteTemplate
lockedCopyFromSQLiteTemplate builds the template (once) and copies it to dst, holding sqliteTemplateMu for read across both steps so removeSQLiteTempl
internal/store/store_test.go:73
↓ 1 callers
Function
lockedCopyFromTemplate
lockedCopyFromTemplate builds the template (once) and copies it to dst, holding templateMu for read across both steps so Cleanup (which takes the writ
internal/store/storetest/storetest.go:94
↓ 1 callers
Function
logBootstrapBanner
logBootstrapBanner emits a single multi-line INFO log entry pointing the operator at the /setup#token=<x> URL they need to visit to claim the first ad
cmd/pad/cmd_server.go:853
↓ 1 callers
Method
logBundleStreamError
logBundleStreamError logs at warn level with structured context. Mid-stream failures can't be turned into a clean HTTP error response (we've already s
internal/server/handlers_export_bundle.go:310
↓ 1 callers
Function
logOpenBootstrapBanner
logOpenBootstrapBanner is the PAD_BYPASS_SETUP_TOKEN companion to logBootstrapBanner. When the operator opts into the bypass, no token is generated —
cmd/pad/cmd_server.go:912
↓ 1 callers
Function
loginCmd
()
cmd/pad/cmd_auth.go:328
↓ 1 callers
Function
loginTestUserAs
loginTestUserAs is a variant of loginTestUser that takes explicit email/name/password so multiple distinct users can coexist within one test (loginTes
internal/server/handlers_connected_apps_mutations_test.go:402
↓ 1 callers
Function
loginViaForm
(page: import('@playwright/test').Page, email: string)
web/e2e/account-delete.spec.ts:79
↓ 1 callers
Function
logoutCmd
()
cmd/pad/cmd_auth.go:734
↓ 1 callers
Function
longestBacktickRun
* Returns the length of the longest backtick run in `s`. Used by the * markdown serializer to pick a fence length one longer than any run of * backt
web/src/lib/components/editor/extensions/htmlBlock.ts:145
↓ 1 callers
Function
looksLikeJSON
looksLikeJSON returns true when the body's first non-whitespace byte is `{` or `[`.
internal/urlimport/detect.go:83
↓ 1 callers
Method
lookupAssigneeID
lookupAssigneeID issues an in-handler GET against api/v1/workspaces/{ws}/members and returns the user_id whose name OR email matches `assign`. Case-in
internal/mcp/dispatch_http_advanced.go:189
↓ 1 callers
Method
lookupRoleID
lookupRoleID issues an in-handler GET against api/v1/workspaces/{ws}/agent-roles/{slug} and returns the role's canonical id. The handler accepts eithe
internal/mcp/dispatch_http_advanced.go:143
↓ 1 callers
Function
makeFlusher
(overrides: Partial<CollabFlusherConfig> = {})
web/src/lib/collab/collabFlush.test.ts:21
↓ 1 callers
Function
makeIntegrationJPEG
(t *testing.T, w, h int)
internal/server/handlers_attachments_thumbnails_test.go:45
↓ 1 callers
Function
makeStr
(n int, c byte)
internal/server/password_strength_test.go:176
↓ 1 callers
Function
markdownRefFor
(result: AttachmentUploadResult)
web/src/lib/utils/commentAttachments.ts:84
↓ 1 callers
Function
maskPassword
maskPassword replaces the password in a PostgreSQL URL for safe display.
cmd/pad/cmd_db.go:473
↓ 1 callers
Function
maskWebhookSecret
maskWebhookSecret blanks the plaintext HMAC secret before a webhook is returned in a list/get response, so the raw signing secret is never echoed afte
internal/server/handlers_webhooks.go:19
↓ 1 callers
Method
maybeAutoAddCreatorConnection
maybeAutoAddCreatorConnection inserts the newly-created workspace into the calling OAuth connection's allow-list when the grant has `may_create_worksp
internal/server/handlers_workspaces.go:312
↓ 1 callers
Method
maybeRebuildOnSchemaMismatch
maybeRebuildOnSchemaMismatch implements the TASK-1268 rebuild flow. Reads the latest persisted op-log row's schema_version for itemID. If a row exist
internal/collab/manager.go:303
↓ 1 callers
Function
mcpCmd
mcpCmd is the parent of `pad mcp ...` subcommands. - `pad mcp serve` — run the stdio MCP server. - `pad mcp install [agent]` — write a "pad" entry in
cmd/pad/mcp.go:20
↓ 1 callers
Function
mcpInstallCmd
mcpInstallCmd implements `pad mcp install [agent]`. With no arguments, prints the install status across supported agents (so the user picks one). Wit
cmd/pad/mcp.go:48
↓ 1 callers
Function
mcpServeCmd
mcpServeCmd implements the stdio MCP server. The cobra command is a thin wrapper around internal/mcp.Server — all transport / handshake behaviour and
cmd/pad/mcp.go:226
↓ 1 callers
Function
mcpStatusCmd
mcpStatusCmd implements `pad mcp status` — same as `pad mcp install` with no args, but exposed as a dedicated command for shell scripts.
cmd/pad/mcp.go:137
↓ 1 callers
Function
mcpUninstallCmd
mcpUninstallCmd implements `pad mcp uninstall <agent>`.
cmd/pad/mcp.go:107
↓ 1 callers
Function
membersCmd
()
cmd/pad/cmd_workspace.go:89
↓ 1 callers
Function
mergeRow
* Apply a single row to a workspace's items map with the per-row * seq guard. Used by `bootstrap` (both warm and cold paths) and * `upsert`/`applyDe
web/src/lib/stores/localIndex.svelte.ts:160
↓ 1 callers
Method
migrate
()
internal/store/store.go:290
↓ 1 callers
Method
migratePostgres
migratePostgres applies PostgreSQL migrations. PostgreSQL supports multi-statement execution natively, so we don't need execMulti.
internal/store/store.go:419
↓ 1 callers
Method
migrateToWorkspaceNumbering
migrateToWorkspaceNumbering performs a one-time migration from per-collection item numbering to per-workspace item numbering. It detects the old index
internal/store/store.go:968
↓ 1 callers
Function
migrateV1
migrateV1 reads a v1 single-blob file and returns an in-memory v2 store keyed by the legacy ServerURL. A v1 file with an empty server_url is treated a
internal/cli/credentials.go:134
↓ 1 callers
Function
migrateValue
migrateValue attempts to convert a value from sourceType to the targetField's type. Returns the migrated value and true if successful, or zero-value a
internal/items/migrate.go:79
↓ 1 callers
Function
mimeInPredicate
mimeInPredicate builds a `a.mime_type IN (?,?,...)` fragment with matching args. Helper used by mimePredicateForCategory for the non-prefix categories
internal/store/attachments.go:315
↓ 1 callers
Function
mimePredicateForCategory
mimePredicateForCategory maps an attachments.Category value to a SQL fragment + matching argument list that selects all MIMEs in that bucket. Categori
internal/store/attachments.go:242
↓ 1 callers
Function
mimeToFormat
(mime: string)
web/src/lib/components/editor/attachment-metadata.ts:86
↓ 1 callers
Function
mintUsedVerificationToken
mintUsedVerificationToken creates an unverified user, mints a verification token, and consumes it — leaving a single used (reaper-eligible) row.
internal/server/token_reaper_test.go:44
↓ 1 callers
Function
mockApi
()
web/src/lib/webmcp/dispatch.test.ts:7
↓ 1 callers
Function
mockFetchOnce
(status: number, body: unknown)
web/src/lib/api/client.test.ts:22
↓ 1 callers
Function
mockFetchSequence
* Fetch mock that returns a scripted sequence of responses. Each entry is * `{ status, body, retryAfter? }`; the last entry repeats for any calls *
web/src/lib/api/client.test.ts:107
↓ 1 callers
Function
moveCmd
--- move ---
cmd/pad/cmd_item.go:1191
↓ 1 callers
Function
moveGhost
(clientY: number)
web/src/lib/components/editor/block-drag-handle.ts:645
↓ 1 callers
Method
moveItemWithPreCheckOnce
( itemID, targetCollectionID, newFieldsJSON string, precheck func(tx *sql.Tx, existing *models.Item) error,
internal/store/items.go:4012
↓ 1 callers
Function
mustCreateUserForTest
mustCreateUserForTest creates a user for tests that need a user row but don't need a session. Counterpart to loginTestUser, which creates BOTH a user
internal/server/handlers_mcp_test.go:1753
↓ 1 callers
Function
mustParseCIDRs
(networks ...string)
internal/webhooks/validate.go:99
↓ 1 callers
Function
newDynamicResolver
newDynamicResolver constructs a cmdhelp.Resolver bound to the current pad runtime: workspace, configured server URL, and credentials. Returns nil whe
cmd/pad/help_cmdhelp.go:176
↓ 1 callers
Function
newIPRateLimiter
(cfg rateLimitConfig)
internal/server/middleware_ratelimit.go:58
↓ 1 callers
Function
newId
* Crypto-strong-ish placeholder id. crypto.randomUUID is the preferred * source; the Math.random fallback is only hit in environments without * the
web/src/lib/components/editor/attachment-upload.ts:86
↓ 1 callers
Method
newItem
newItem creates a fresh item in the given (hidden/visible) collection. Used by tests that mutate the fixture's default hiddenItem/visibleItem (e.g. ar
internal/server/handlers_items_test.go:2547
↓ 1 callers
Function
newJSONRequest
newJSONRequest is a local helper for tests that need to thread custom headers (Bearer auth, RemoteAddr) through to a request — the package's doRequest
internal/server/handlers_ref_resolver_test.go:19
↓ 1 callers
Function
newMCPAuditWriter
newMCPAuditWriter constructs a writer with a 4096-deep queue. The caller is responsible for kicking the worker via run() and for stopping it via stop(
internal/server/middleware_mcp_audit.go:108
↓ 1 callers
Function
newPostgresConn
newPostgresConn opens a raw postgres connection (no migrations).
internal/store/store_test.go:204
↓ 1 callers
Function
newRunContext
(d time.Duration)
cmd/loadtest-collab/main.go:155
↓ 1 callers
Function
newSafeTransport
newSafeTransport returns an *http.Transport whose DialContext resolves each hostname inside the dialer and validates every returned IP. Only IPs that
internal/urlimport/fetch.go:273
↓ 1 callers
Function
newSignatureForTest
()
internal/server/handlers_connected_apps_test.go:86
↓ 1 callers
Function
newStatusError
(code int, kind, message string)
internal/server/handlers_collab.go:511
↓ 1 callers
Function
newTestOAuthServer
newTestOAuthServer builds an internal/oauth.Server matched to the test harness's canonical audience (testCanonicalAudience). Used by mcpAndOAuthEnable
internal/server/handlers_mcp_test.go:1772
↓ 1 callers
Function
newTestWorkspace
newTestWorkspace creates a workspace bound to the test store with the given slug. Helper for store-level tests that don't already use the larger setup
internal/store/agent_roles_test.go:50
↓ 1 callers
Function
nextCmd
--- next ---
cmd/pad/cmd_project.go:207
↓ 1 callers
Function
nextConnID
()
internal/collab/room.go:501
↓ 1 callers
Function
noWorkspaceResult
noWorkspaceResult builds the standard ErrNoWorkspace envelope with available_workspaces populated by the supplied lookup. Lookup is best-effort: failu
internal/mcp/errors.go:250
↓ 1 callers
Function
nodeForResult
* Build the node that should replace a placeholder for a given upload * result. Image MIMEs become `attachmentImage`; everything else becomes * `att
web/src/lib/components/editor/attachment-upload.ts:198
↓ 1 callers
Function
nodeScriptCmd
(pm, script string)
internal/cli/detect.go:336
↓ 1 callers
Function
normalizeArguments
normalizeArguments coerces the arguments value into []map[string]any so it serializes as a stable YAML sequence of maps. Accepts []map[string]any or [
internal/artifact/encode.go:109
↓ 1 callers
Function
normalizeBody
normalizeBody trims a trailing run of whitespace/newlines and ensures the body ends with exactly one trailing "\n". An empty body becomes "\n".
internal/artifact/encode.go:87
↓ 1 callers
Function
normalizeBulkUpdateRefs
normalizeBulkUpdateRefs accepts the JSON shapes the MCP transport can deliver for an array<string> param: []string (canonical), []any (mcp-go's typica
internal/mcp/catalog_item.go:567
↓ 1 callers
Function
normalizeColor
(c: string)
web/src/lib/utils/hiddenContentDetector.ts:239
↓ 1 callers
Function
normalizePragma
(p string)
internal/store/store.go:699
← previous
next →
2,301–2,400 of 6,005, ranked by callers