MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions6,005 in github.com/PerpetualSoftware/pad

↓ 1 callersFunctionnormalizeWorkspaceInput
(input *models.WorkspaceCreate)
internal/server/handlers_workspaces.go:19
↓ 1 callersFunctionnormalizeWorkspaceUpdateInput
(input *models.WorkspaceUpdate)
internal/server/handlers_workspaces.go:38
↓ 1 callersFunctionnotFoundHintFor
notFoundHintFor generates the actionable hint for ErrNotFound. References the route + ref/slug + suggests verification of the path the caller passed.
internal/mcp/errors.go:1069
↓ 1 callersFunctionnotFoundMessageFor
notFoundMessageFor returns a kind-aware short message for the not_found code. Falls back to a generic "Resource not found" when the kind doesn't match
internal/mcp/errors.go:1046
↓ 1 callersFunctionnoteCmd
()
cmd/pad/notes.go:17
↓ 1 callersFunctionnotifyAccessRevoked
* Fire the registered access-revoked handler for a 403 response. The * handler is called best-effort — its failures are swallowed so the * caller st
web/src/lib/api/client.ts:354
↓ 1 callersFunctionnotifyRateLimited
* Best-effort fire of the registered rate-limit handler. Swallows handler * failures so a broken UI hook can't corrupt the API error path. TASK-2080.
web/src/lib/api/client.ts:281
↓ 1 callersFunctionnotifyServerBusy
(retryAfterMs?: number, now: number = Date.now())
web/src/lib/api/serverBusyToast.ts:52
↓ 1 callersFunctionnum
* Read a number param. Absent (undefined/null) returns undefined. Accepts a * numeric string (the MCP transport may deliver numbers as strings) — an
web/src/lib/webmcp/dispatch.ts:67
↓ 1 callersFunctionok
(result: unknown)
web/src/lib/webmcp/dispatch.ts:272
↓ 1 callersMethodonPendingDelta
+1 when an upload starts, -1 when it settles — drives the busy gate.
web/src/lib/utils/commentAttachments.ts:97
↓ 1 callersFunctiononTabResume
Called when the tab becomes visible again.
web/src/lib/services/sync.svelte.ts:97
↓ 1 callersFunctionopenBroadcastChannel
(workspaceSlug: string)
web/src/lib/services/sse.svelte.ts:111
↓ 1 callersFunctionopenBrowser
(url string)
cmd/pad/cmd_server.go:985
↓ 1 callersMethodopenChildrenGuardChildVisible
openChildrenGuardChildVisible mirrors the visibility check used by the per-parent progress endpoint (handlers_items.go around `progVisIDs` / `isCollec
internal/server/handlers_items_open_children_guard.go:257
↓ 1 callersFunctionopenCmd
--- open ---
cmd/pad/cmd_server.go:961
↓ 1 callersFunctionopenCropModal
(opts: OpenCropModalOptions)
web/src/lib/components/editor/attachment-crop-modal.ts:61
↓ 1 callersFunctionopenEventSource
(workspaceSlug: string)
web/src/lib/services/sse.svelte.ts:166
↓ 1 callersFunctionopenImageLightbox
* Open a centered <dialog> showing the full-resolution attachment. * Closes on backdrop click, the close button, or the Esc key.
web/src/lib/components/editor/attachment-image.ts:649
↓ 1 callersMethodopenOriginalForThumbnail
openOriginalForThumbnail resolves the parent row's storage key against the registry and returns a stream positioned at the start of the blob. The call
internal/server/handlers_attachments_thumbnails.go:130
↓ 1 callersFunctionopenSyncedEditor
* Two-client convergence: text typed in one browser context appears in * a second context viewing the same item — no reload. This exercises * the li
web/e2e/collab-persistence.spec.ts:152
↓ 1 callersFunctionopeningFence
openingFence checks if line starts a CommonMark fenced code block. Returns the fence character (' ` ' or '~'), the length, and ok.
internal/server/render/attachments.go:381
↓ 1 callersFunctionoptionAllowed
optionAllowed reports whether val is among options. An empty options list means the field is unconstrained (any value allowed).
internal/server/handlers_artifact_import.go:263
↓ 1 callersFunctionpadCell
padCell left-aligns s in a column of the given visible width by appending spaces. If s is already at least that wide the string is returned unchanged
internal/cli/format.go:155
↓ 1 callersFunctionparamDefToToolOption
paramDefToToolOption maps a ParamDef to the matching mcp-go helper. Unknown Type strings fall through to WithString — same defensive default the cmdhe
internal/mcp/catalog.go:305
↓ 1 callersFunctionparamToProperty
(param: ToolSurfaceParam)
web/src/lib/webmcp/descriptors.ts:66
↓ 1 callersFunctionparse
(result: { content: { text: string }[]; isError?: boolean })
web/src/lib/webmcp/dispatch.test.ts:116
↓ 1 callersFunctionparseAccessRevokedScope
* Parse a URL path and decide whether a 403 on it indicates that the * caller's READ access to the workspace's item set has been revoked. * Returns
web/src/lib/api/client.ts:313
↓ 1 callersFunctionparseArgs
(cmd *cobra.Command)
internal/cmdhelp/json.go:272
↓ 1 callersFunctionparseArgumentLine
(line: string)
web/src/lib/playbooks/arguments.ts:205
↓ 1 callersFunctionparseArtifactRequest
parseArtifactRequest is the guarded HTTP-boundary parse used by the import handler. It applies three checks IN ORDER: 1. Byte cap on the raw body (ht
internal/server/artifact_import.go:67
↓ 1 callersFunctionparseBody
parseBody decodes the inside of a `[[...]]`. Returns nil if the body doesn't match any of the five recognized forms. Mirrors the editor's body-parsing
internal/links/extract.go:514
↓ 1 callersMethodparseConsentPayload
parseConsentPayload extracts and validates the user's tier choice + workspace access mode + creation flag + per-workspace selection from the consent f
internal/server/handlers_oauth.go:928
↓ 1 callersFunctionparseContentDispositionFilename
* Pull the filename out of a Content-Disposition header value. Handles both * the RFC 5987 extended `filename*=charset'lang'value` form (preferred wh
web/src/lib/api/client.ts:553
↓ 1 callersFunctionparseDurationEnv
humanBytes formats a byte count with the smallest IEC unit that keeps the value under 1024 — matches the convention used across the web UI's storage b
cmd/pad/cmd_server.go:1044
↓ 1 callersFunctionparseFieldsDSL
parseFieldsDSL is the cmd/pad-local alias for the canonical parser at collections.ParseFieldsDSL. Moved up to internal/collections so the MCP HTTP rou
cmd/pad/cmd_collection.go:142
↓ 1 callersFunctionparseJSONStringList
parseJSONStringList decodes a JSON array string back to []string. Empty / null inputs produce an empty (non-nil) slice so callers can range without ni
internal/store/oauth.go:769
↓ 1 callersFunctionparseLength
* Parse a CSS length declaration like `12px`, `0`, `-9999px`, `1.5em` * into a number when the unit is bare (`0`) or px. Returns `null` for * percen
web/src/lib/utils/hiddenContentDetector.ts:223
↓ 1 callersFunctionparseLevel
(s string)
internal/logging/logging.go:48
↓ 1 callersFunctionparsePlaybookArguments
parsePlaybookArguments pulls the `arguments` field out of the playbook item's fields JSON and decodes it into a list of PlaybookArgumentSpec entries.
internal/server/handlers_playbooks.go:329
↓ 1 callersFunctionparsePublicItem
(raw: unknown, index = 0)
web/src/lib/components/share/shareView.ts:138
↓ 1 callersFunctionparseRefForRedirect
parseRefForRedirect splits a validated ref (the regex caller already confirmed `[A-Za-z][A-Za-z0-9]*-\d+`) into its uppercase prefix and number. GetIt
internal/server/handlers_ref_resolver.go:257
↓ 1 callersFunctionparseSearchQuery
(raw: string)
web/src/lib/stores/localSearch.svelte.ts:111
↓ 1 callersFunctionparseStructured
parseStructured pulls the JSON body out of a structured tool result and unmarshals it. mcp-go's NewToolResultStructured serializes the Go value as tex
internal/mcp/catalog_meta_test.go:260
↓ 1 callersFunctionparseV2
parseV2 unmarshals a v2 file. Tolerates a missing or zero version field and a nil credentials map by normalizing both — anything else (malformed JSON,
internal/cli/credentials.go:149
↓ 1 callersFunctionpercentileDuration
(durations []time.Duration, p float64)
internal/store/bench_concurrent_test.go:140
↓ 1 callersFunctionpermissionHintFor
permissionHintFor generates the actionable hint for ErrPermissionDenied. References the route + the inner backend message (which often names the missi
internal/mcp/errors.go:1109
↓ 1 callersFunctionpermissionLevel
permissionLevel returns a numeric level for grant permission comparison.
internal/server/middleware_auth.go:774
↓ 1 callersMethodpersistThumbnail
persistThumbnail encodes the resized image, hashes the bytes, writes through the content-addressed storage backend, and inserts the derived attachment
internal/server/handlers_attachments_thumbnails.go:147
↓ 1 callersFunctionpersistUpserts
( userId: string | null, ws: string, rows: ItemIndexRow[], )
web/src/lib/stores/localIndexPersistence.ts:207
↓ 1 callersMethodpickApplier
pickApplier returns the longest-connected roomConn that hasn't already been tried, or nil if there are no candidates left. The stable ordering (sort b
internal/collab/applier.go:297
↓ 1 callersFunctionplanLimitDefault
planLimitDefault returns the hardcoded default for a plan+feature pair.
internal/server/handlers_admin_users.go:854
↓ 1 callersFunctionplanLimitHintFor
planLimitHintFor generates the actionable hint for ErrPlanLimitExceeded. The upgrade_url is already in the Details blob; the hint surfaces it in prose
internal/mcp/errors.go:1179
↓ 1 callersFunctionplanLimitMessage
planLimitMessage returns a human-readable statement-of-fact sentence for a plan limit violation. Each surface (web toast, CLI, MCP hint) appends its o
internal/server/handlers_cloud.go:1158
↓ 1 callersFunctionplansProgressToMap
(rows: ProgressRow[])
web/src/lib/collections/progressMerge.ts:30
↓ 1 callersFunctionplaybookCmd
playbookCmd is the `pad playbook` command group for the first-class invokable-procedure surface introduced in PLAN-1377 / TASK-1382. Three subcommands
cmd/pad/cmd_playbook.go:23
↓ 1 callersFunctionplaybookListCmd
()
cmd/pad/cmd_playbook.go:35
↓ 1 callersFunctionplaybookRunCmd
()
cmd/pad/cmd_playbook.go:128
↓ 1 callersFunctionplaybookShowCmd
()
cmd/pad/cmd_playbook.go:88
↓ 1 callersFunctionpollUntilSetupDone
pollUntilSetupDone tickets every bootstrapPollInterval and returns nil the first time CheckSession reports setup_required: false. Returns ctx.Err() on
internal/cli/bootstrap.go:228
↓ 1 callersMethodpostLibraryItem
postLibraryItem POSTs an ItemCreate body into the named collection's items endpoint. Shared between conventions / playbooks branches of dispatchLibrar
internal/mcp/dispatch_http_library.go:105
↓ 1 callersFunctionprefixColumns
prefixColumns rewrites a comma-separated SELECT list with the given prefix, e.g. "id, email" with "u." → "u.id, u.email". Small helper to keep userCol
internal/store/users.go:563
↓ 1 callersMethodpreprocessArtifactFields
preprocessArtifactFields applies the forgiving import coercions, mutating fields in place and returning the accumulated warnings: - Any select field
internal/server/handlers_artifact_import.go:179
↓ 1 callersFunctionprintAvailableCollections
printAvailableCollections fetches collections from the API and prints them with their descriptions and valid status values. Used by create --help. Fai
cmd/pad/cmd_collection.go:439
↓ 1 callersFunctionprintBootstrapMarkdown
printBootstrapMarkdown renders a human-friendly summary of the bootstrap blob. Intended for quick inspection from the terminal; the canonical machine
cmd/pad/cmd_bootstrap.go:67
↓ 1 callersFunctionprintContextSection
(tw *tabwriter.Writer, section string, fields [][2]string)
cmd/pad/workspace_context.go:206
↓ 1 callersFunctionprintInitStatus
printInitStatus prints a clean status summary when everything is already configured.
cmd/pad/init.go:570
↓ 1 callersFunctionprintItemsGroupedByCollection
(items []models.Item)
cmd/pad/cmd_item.go:434
↓ 1 callersFunctionprintServerInfo
(report *serverInfoReport)
cmd/pad/server_info.go:211
↓ 1 callersFunctionprintStructuredTimelineEntry
(createdAt, createdBy, title, body string)
cmd/pad/notes.go:164
↓ 1 callersMethodprintSummary
(clients int, dur time.Duration, opsPerSec float64)
cmd/loadtest-collab/main.go:331
↓ 1 callersFunctionpriorityColor
(priority: string)
web/src/lib/components/share/shareView.ts:288
↓ 1 callersFunctionpriorityField
(collection: Collection)
web/src/lib/collections/itemSort.ts:24
↓ 1 callersFunctionpriorityRank
Blocked-item resolution (both the attention-blocked section and the suggested_next blocked-filter) is driven by the firstActiveBlocker map computed on
internal/server/handlers_dashboard.go:178
↓ 1 callersFunctionpriorityWeight
(item: Item, options: string[])
web/src/lib/collections/itemSort.ts:35
↓ 1 callersFunctionprojectBootstrapCollection
projectBootstrapCollection converts a models.Collection into the slim bootstrap projection. The `schema` field is emitted as a nested JSON object when
internal/server/handlers_bootstrap.go:107
↓ 1 callersFunctionprojectBootstrapRole
projectBootstrapRole converts a models.AgentRole into the slim bootstrap projection. Stateless — the role count recompute for restricted callers happe
internal/server/handlers_bootstrap.go:235
↓ 1 callersFunctionprojectCmd
()
cmd/pad/groups.go:82
↓ 1 callersFunctionpromptForMode
()
cmd/pad/configure.go:195
↓ 1 callersFunctionpromptForValue
(label, defaultValue string)
cmd/pad/configure.go:305
↓ 1 callersMethodpublishBulkItemsEvent
publishBulkItemsEvent emits one ItemsBulkUpdated SSE event for the slice of a batch mutation that landed in `collection` (TASK-1668). Collection is se
internal/server/handlers_items_bulk.go:641
↓ 1 callersFunctionputString
(m map[string]any, k, v string)
internal/artifact/decode.go:74
↓ 1 callersFunctionqs
(params?: Record<string, string | number | boolean | undefined>)
web/src/lib/api/client.ts:586
↓ 1 callersMethodqueryCrossWorkspaceBacklinksForWorkspace
queryCrossWorkspaceBacklinksForWorkspace fetches up to `cap` rows from a single source workspace whose item_wiki_links point at the target via target_
internal/store/wiki_links.go:1338
↓ 1 callersMethodqueue
* Queue a save for the given markdown: records it as the pending (dirty) * content and (re)arms the debounce. Rapid successive calls coalesce — *
web/src/lib/items/contentSaver.svelte.ts:44
↓ 1 callersFunctionrateLimitHintFor
rateLimitHintFor generates the actionable hint for ErrRateLimited. 429s are recoverable with backoff — the hint encodes that bias and points at the Re
internal/mcp/errors.go:1206
↓ 1 callersFunctionrateLimitKey
rateLimitKey returns a key for rate limiting: user ID if authenticated, IP otherwise.
internal/server/middleware_ratelimit.go:512
↓ 1 callersMethodreadCollections
readCollections handles pad://workspace/{ws}/collections.
internal/mcp/resources.go:362
↓ 1 callersFunctionreadCredsFile
readCredsFile returns the on-disk JSON of credentials.json. Used to assert post-Save behavior — confirms the v2 format actually lands on disk rather t
internal/cli/credentials_test.go:37
↓ 1 callersFunctionreadEntry
readEntry reads exactly size bytes from a tar reader (the rest of the current entry) into a buffer, validating that the read length matches the header
internal/server/handlers_import_bundle.go:417
↓ 1 callersMethodreadItems
readItems handles pad://workspace/{ws}/items.
internal/mcp/resources.go:323
↓ 1 callersMethodreadLoop
readLoop is the inbound side: pull frames off the WebSocket, route sync frames through the op-log + broadcast, awareness frames to broadcast only. Ret
internal/collab/room.go:289
↓ 1 callersFunctionreadOrSetConsentCSRF
readOrSetConsentCSRF reads the current __Host-pad_csrf cookie or mints a new one if absent. The cookie's value is what gets rendered into the consent
internal/server/handlers_oauth.go:1860
↓ 1 callersFunctionreadPID
(path string)
cmd/pad/server_info.go:199
↓ 1 callersFunctionreadPackageManifest
(path string)
internal/cli/detect.go:355
↓ 1 callersFunctionreadParentRef
readParentRef returns the ref of the item's current `parent` link target, or "" if there is no parent link. Used by the PATCH-atomic test to assert th
internal/server/handlers_items_open_children_guard_test.go:1328
↓ 1 callersFunctionreadSchemaInputBytes
readSchemaInputBytes resolves the --schema flag value into raw JSON bytes, honoring the "-" (stdin), "@path" (file), and inline-literal modes.
cmd/pad/cmd_collection.go:118
↓ 1 callersFunctionreadSendTimestamp
readSendTimestamp extracts the embedded ts from a frame produced by buildFrame. Returns zero time if the frame is too short or its header byte doesn't
cmd/loadtest-collab/main.go:320
↓ 1 callersFunctionreadStoredCursor
(itemID: string)
web/src/lib/collab/wsProvider.svelte.ts:128
↓ 1 callersMethodreadWorkspaces
readWorkspaces handles pad://workspaces — the top-level workspace list (TASK-974). Shells out to `pad workspace list --format json` so the resource sh
internal/mcp/resources.go:353
← previousnext →2,401–2,500 of 6,005, ranked by callers