MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions6,005 in github.com/PerpetualSoftware/pad

↓ 2 callersFunctionintp
(i int)
internal/server/render/attachments_test.go:8
↓ 2 callersFunctionisAllReadOnly
(tool: ToolSurfaceTool)
web/src/lib/webmcp/descriptors.ts:78
↓ 2 callersFunctionisAllWhitespace
(b []byte)
internal/mcp/install.go:344
↓ 2 callersFunctionisAttachmentHref
(href: string | null | undefined)
web/src/lib/markdown/attachments.ts:47
↓ 2 callersFunctionisChildLinkType
isChildLinkType reports whether the given link type is one the open-children guard counts toward the children-set (i.e. matches the inclusion rule bak
internal/store/items.go:3771
↓ 2 callersFunctionisCloudAdminPath
isCloudAdminPath returns true if the request targets one of the three cloud-sidecar-only admin endpoints. Kept separate from the credential check so t
internal/server/handlers_cloud.go:93
↓ 2 callersFunctionisHiddenContentAcknowledged
(html: string)
web/src/lib/utils/hiddenContentDetector.ts:56
↓ 2 callersFunctionisPlausibleEmail
requestIsLoopback reports whether the request came from a local CLI running on the same machine as the Pad server. The check is intentionally strict:
internal/server/handlers_auth.go:225
↓ 2 callersFunctionisPrivateIP
isPrivateIP returns true for any IP we refuse to fetch from. This includes loopback, RFC1918, IPv4/IPv6 link-local (catches the AWS/GCP/ Azure cloud-m
internal/urlimport/fetch.go:333
↓ 2 callersFunctionisReadOnlyAction
isReadOnlyAction reports whether (toolName, action) performs no mutation. Defaults to false (write) for any pair not in the allowlist — the conservati
internal/mcp/tool_surface.go:133
↓ 2 callersFunctionisReservedCollectionSlug
isReservedCollectionSlug checks whether a slug would collide with a workspace-level UI route.
internal/store/collections.go:674
↓ 2 callersFunctionisSafeBundleEntryName
isSafeBundleEntryName rejects tar entry names that look like a path-traversal attempt. The bundle path is already hash-keyed at the storage layer (see
internal/server/handlers_import_bundle.go:554
↓ 2 callersFunctionisTerminalWithContext
isTerminalWithContext reports whether an item is in a terminal state given its collection's done-context. When the collection isn't in the map (e.g. d
internal/store/item_stars.go:208
↓ 2 callersFunctionisUUID
isUUID checks if a string looks like a UUID (8-4-4-4-12 hex).
internal/store/items.go:514
↓ 2 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:825
↓ 2 callersFunctionitem
(id: string, sort_order: number)
web/src/lib/collections/reorder.test.ts:6
↓ 2 callersFunctionitemCmd
()
cmd/pad/groups.go:103
↓ 2 callersFunctionitemFields
(t *testing.T, srv *Server, ws, slug string)
internal/server/handlers_items_bulk_test.go:29
↓ 2 callersFunctionitemFieldsAsMap
itemFieldsAsMap reads the parsed `fields` value off an item-shape structuredContent map. After BUG-991 path A's normalization the MCP boundary returns
internal/mcp/dispatch_http_advanced_test.go:591
↓ 2 callersFunctionitemOpenCmd
--- open ---
cmd/pad/cmd_item.go:709
↓ 2 callersFunctionitemRefString
itemRefString returns "TASK-5"-style refs for non-nil items, or the empty string when the collection prefix or item number is missing. Mirrors cli.Ite
internal/mcp/dispatch_http_links.go:528
↓ 2 callersFunctionitemStatusPriority
itemStatusPriority pulls the "status" and "priority" string values out of an item's fields JSON blob. Missing keys, non-string values, or malformed JS
internal/cli/format.go:184
↓ 2 callersFunctionitemUrlId
(item: Item)
web/src/lib/types/index.ts:1669
↓ 2 callersFunctionitemWebPath
(workspace models.Workspace, item models.Item)
cmd/pad/cmd_item.go:745
↓ 2 callersFunctionjsonEqual
jsonEqual compares two parsed-JSON maps for value equality. Cheaper than reflect.DeepEqual and accepts the float/string nuances of json.Unmarshal outp
internal/mcp/install.go:380
↓ 2 callersFunctionkey
(userId: string | null, ws: string)
web/src/lib/stores/localIndexPersistence.ts:86
↓ 2 callersFunctionleaderElectionSupported
()
web/src/lib/services/sse.svelte.ts:107
↓ 2 callersFunctionliftFieldsToColumns
liftFieldsToColumns scans fields for keys that map 1:1 to columns on the item record and moves them into payload at the top level. Mutates both maps.
internal/mcp/dispatch_http.go:867
↓ 2 callersFunctionlinkBlocks
linkBlocks wires blocker -> blocked via a `blocks` link.
internal/store/dashboard_batch_test.go:22
↓ 2 callersFunctionlinkEndpointDisplay
(link models.ItemLink, useSource bool)
cmd/pad/lineage.go:261
↓ 2 callersMethodlistTerminalItemsSince
listTerminalItemsSince fetches items in each of models.DefaultTerminalStatuses (one ListItems call per status — mirrors the CLI's loop rather than OR-
internal/server/handlers_project_intel.go:133
↓ 2 callersFunctionloadDashboard
(client *cli.Client, ws string)
cmd/pad/query.go:226
↓ 2 callersFunctionloadSuiteFixture
()
web/e2e/fixtures.ts:31
↓ 2 callersFunctionmapPflagType
mapPflagType translates pflag Value.Type() strings to the cmdhelp v0.1 type vocabulary (spec §5.1) and reports whether the flag is repeatable. pflag
internal/cmdhelp/json.go:444
↓ 2 callersFunctionmapWorkspaceClaim
mapWorkspaceClaim dispatches `pad workspace claim <code> --workspace <slug>`. POST /api/v1/oauth/claim with body {workspace, code} — see internal/ser
internal/mcp/dispatch_http_routes.go:1068
↓ 2 callersFunctionmatchModeAlias
(options []modeOption, input string)
cmd/pad/configure.go:291
↓ 2 callersFunctionmatchesEvent
matchesEvent checks whether a webhook's event filter (JSON array) includes the given event name, or the wildcard "*".
internal/webhooks/dispatcher.go:290
↓ 2 callersMethodmaybeWarnStorageQuota
maybeWarnStorageQuota emits a slog warning if the workspace's usage has crossed the owner-plan storage limit. Phase 1 is observational only — see DOC-
internal/server/handlers_attachments.go:549
↓ 2 callersMethodmcpAuditDroppedSnapshot
mcpAuditDroppedSnapshot returns the cumulative number of audit entries dropped due to buffer-full backpressure. Exported as a method on Server so admi
internal/server/middleware_mcp_audit.go:198
↓ 2 callersFunctionmcpAuditEntryToDTO
(e models.MCPAuditEntry)
internal/server/handlers_mcp_audit.go:58
↓ 2 callersFunctionmcpConnectionStatsKey
mcpConnectionStatsKey is the canonical map key for the result of MCPConnectionStatsForUser. Exposed via a helper so callers constructing lookup keys d
internal/store/mcp_audit.go:258
↓ 2 callersFunctionmergeChildAndCheckboxProgress
( childRows: ProgressRow[], checkboxRows: ProgressRow[], )
web/src/lib/collections/progressMerge.ts:47
↓ 2 callersFunctionmergeDispatchInput
mergeDispatchInput returns a copy of the user-supplied MCP input augmented with the same default injections BuildCLIArgs applies — session workspace,
internal/mcp/dispatch.go:80
↓ 2 callersFunctionmergeFieldsPatch
mergeFieldsPatch applies a shallow JSON-merge-patch (RFC 7396 semantics, one level deep) of `patch` onto the item's current fields JSON (IDEA-1480 TAS
internal/store/items.go:1762
↓ 2 callersFunctionmergeGitHubPRIntoFields
(fieldsJSON string, livePR *GitHubPR)
cmd/pad/reconcile.go:386
↓ 2 callersFunctionmergeParameters
mergeParameters combines path-item-level parameters with operation-level ones, deduping on the (name, in) tuple. Operation- level parameters win on co
internal/urlimport/openapi.go:221
↓ 2 callersFunctionmockMailerooEndpoint
mockMailerooEndpoint stands up an httptest server that speaks enough of Maileroo's v2 JSON API to satisfy email.Sender. Returning 500 exercises the se
internal/server/cloud_admin_gate_test.go:753
↓ 2 callersMethodmodelClientToFosite
modelClientToFosite turns a stored client row into the fosite.DefaultClient fosite expects. Public clients only — Secret stays empty; PKCE is the only
internal/oauth/storage.go:553
↓ 2 callersFunctionmoveDrag
(clientY: number)
web/src/lib/components/editor/block-drag-handle.ts:700
↓ 2 callersFunctionmustCreate
mustCreate is a small helper for the deadlock test's seeding — keeps the test body focused on the race itself rather than boilerplate response parsing
internal/server/handlers_items_open_children_guard_test.go:1258
↓ 2 callersMethodmustExec
(t *testing.T, query string, args ...interface{})
internal/store/workspace_purge_test.go:40
↓ 2 callersFunctionmustJSONRequest
(t *testing.T, method, path string, body any)
internal/mcp/dispatch_http_test.go:962
↓ 2 callersFunctionnewFromTemplate
newFromTemplate builds (once) and copies the template DB, then opens the copy via store.New. Shared by NewSQLite and NewSQLiteUnmanaged; the only diff
internal/store/storetest/storetest.go:75
↓ 2 callersFunctionnewMetricsTestServer
newMetricsTestServer builds a Server with metrics enabled and the given static token, via storetest.NewSQLite (IDEA-1914) — see testServer in server_t
internal/server/metrics_auth_test.go:15
↓ 2 callersFunctionnewReplayBuffer
(size int)
internal/events/bus.go:139
↓ 2 callersFunctionnewSeedID
newSeedID is a stable test-only ID derived from the email. Used as both the user.id AND the unique-per-row component of user.username, so collisions a
internal/server/handlers_admin_billing_test.go:77
↓ 2 callersFunctionnewStorageInfoCache
(ttl time.Duration)
internal/server/handlers_storage.go:44
↓ 2 callersFunctionnewStructuredEntryID
newStructuredEntryID mirrors the CLI's helper for note/decision IDs (cmd/pad/notes.go). The actual collision-avoidance is handled by combining the pre
internal/mcp/dispatch_http_project.go:636
↓ 2 callersFunctionnewStructuredEntryID
(prefix string)
cmd/pad/notes.go:152
↓ 2 callersFunctionnilIfEmpty
(s string)
internal/store/activities.go:498
↓ 2 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:3460
↓ 2 callersFunctionnormalizeBaseURL
(raw string)
cmd/pad/configure.go:334
↓ 2 callersFunctionnormalizeGitRemoteSlug
(raw string)
internal/cli/workspace_context_detect.go:156
↓ 2 callersFunctionnormalizeItemConventionMetadata
(metadata *ItemConventionMetadata)
internal/models/item.go:469
↓ 2 callersFunctionnormalizeRecoveryCode
normalizeRecoveryCode prepares a user-entered recovery code for hashed comparison against stored codes: strip ASCII whitespace and dashes, then upperc
internal/server/handlers_2fa.go:409
↓ 2 callersFunctionnotify
(result: SyncResult)
web/src/lib/services/sync.svelte.ts:177
↓ 2 callersFunctionoauthScopesToJSON
oauthScopesToJSON serializes fosite's granted-scope slice to the JSON array form tokenScopeAllows expects. Crucial fail-closed: nil / empty granted s
internal/server/middleware_mcp_auth.go:542
↓ 2 callersMethodobserveRevocation
observeRevocation looks up the oldest active-token issuance time for the family and fires the configured observer. Always called AFTER the family has
internal/oauth/storage.go:90
↓ 2 callersFunctionofferSkillInstall
()
cmd/pad/cmd_workspace.go:637
↓ 2 callersFunctionopenPostgresDB
openPostgresDB opens and configures a PostgreSQL connection pool.
internal/store/store.go:213
↓ 2 callersFunctionpadInitCmd
()
cmd/pad/init.go:23
↓ 2 callersFunctionparentChainCycles
parentChainCycles walks the `parent` edges up from startID and reports whether the chain revisits a node (a cycle) within a bounded number of hops. Th
internal/store/parent_link_concurrency_test.go:183
↓ 2 callersFunctionparseAttachmentFilename
parseAttachmentFilename pulls the filename parameter out of a Content-Disposition header. Returns "" when the header is absent or unparseable so the c
cmd/pad/cmd_attachment.go:225
↓ 2 callersFunctionparseAttachmentHref
(href: string | null | undefined)
web/src/lib/markdown/attachments.ts:56
↓ 2 callersFunctionparseCORSOrigins
parseCORSOrigins parses a comma-separated list of origins into a slice. Returns default localhost origins if the input is empty. The '*' wildcard is
internal/server/middleware_security.go:71
↓ 2 callersFunctionparseCrossWorkspaceBody
(body: string)
web/src/lib/utils/markdown.ts:444
↓ 2 callersFunctionparseDaysParam
This file implements the browser/REST surface for the "project intelligence" reads (PLAN-1888 / TASK-1894): next, standup, changelog. KEEP IN SYNC —
internal/server/handlers_project_intel.go:48
↓ 2 callersFunctionparseExamples
parseExamples turns cobra's Example field (a single multiline string) into individual Example entries. Each non-empty, non-comment line is taken as on
internal/cmdhelp/json.go:483
↓ 2 callersFunctionparseFieldChange
parseFieldChange extracts the from/to value for a given field out of a single activities.metadata `changes` string. The string is built by handlers_do
internal/store/status_transitions_backfill.go:39
↓ 2 callersFunctionparseFieldFlag
parseFieldFlag parses a --field key=value flag value according to the field's declared schema type. JSON-typed and multi_select fields receive parsed
cmd/pad/cmd_item.go:30
↓ 2 callersFunctionparseFieldKVP
* Parse the catalog's `field` param (array of "key=value" strings for * schema-declared custom fields) into a key→value object. Throws on a * malfor
web/src/lib/webmcp/dispatch.ts:143
↓ 2 callersFunctionparseItemListParams
parseItemListParams extracts item list parameters from the request query string.
internal/server/handlers_items.go:2529
↓ 2 callersFunctionparseItemNumber
parseItemNumber parses a bare numeric string (e.g. "843") into a positive item number. Returns false for empty strings, non-digit input, zero, or valu
internal/store/items.go:626
↓ 2 callersFunctionparseQuery
parseQuery is a thin wrapper around url.ParseQuery that returns the values directly. Convenience for the route tests where the function signature is t
internal/mcp/dispatch_http_routes_test.go:21
↓ 2 callersFunctionparseRetryAfterMs
(header: string | null | undefined)
web/src/lib/api/client.ts:158
↓ 2 callersFunctionparseWorkspaceListJSON
parseWorkspaceListJSON decodes the JSON shape `pad workspace list --format json` emits into the WorkspaceHint slice. Lenient about optional fields — o
internal/mcp/dispatch.go:316
↓ 2 callersFunctionpeerAddr
peerAddr extracts the IP from a RemoteAddr string, which may be either "host:port" (the stdlib default) or a bare "host" (what some middleware leaves
internal/server/middleware_realip.go:126
↓ 2 callersFunctionpersistDelta
( userId: string | null, ws: string, rows: ItemIndexRow[], cursor: string, removeIds: string[] = [], )
web/src/lib/stores/localIndexPersistence.ts:243
↓ 2 callersFunctionpersistRemovals
( userId: string | null, ws: string, ids: string[], )
web/src/lib/stores/localIndexPersistence.ts:281
↓ 2 callersFunctionpgDbnameFromURL
pgDbnameFromURL extracts just the database name from a PostgreSQL DSN for display purposes. Handles both the URI form (postgres://.../dbname) and the
cmd/pad/cmd_db.go:28
↓ 2 callersFunctionplaceholders
placeholders returns a comma-separated string of SQL placeholders: "?, ?, ?"
internal/store/search.go:34
↓ 2 callersFunctionplaybookStatus
playbookStatus reads the `status` value out of a playbook item's fields JSON. Status lives in the typed fields blob, not as a top-level Item column, s
internal/server/handlers_playbooks.go:249
↓ 2 callersFunctionpollAndSaveCLIAuth
pollAndSaveCLIAuth polls a pending CLI auth session until it is approved, then persists the issued token as credentials for cfg.BaseURL(). It is the s
cmd/pad/cmd_auth.go:440
↓ 2 callersFunctionpositionHandle
(blockDOM: HTMLElement)
web/src/lib/components/editor/block-drag-handle.ts:369
↓ 2 callersMethodprefetchItemFields
prefetchItemFields GETs the item at itemPath and returns its `fields` JSON string. Surfaces 404s and parse errors as IsError-flagged tool results so t
internal/mcp/dispatch_http_project.go:607
↓ 2 callersFunctionprintOnboardingHints
(cfg *config.Config, templateName string)
cmd/pad/cmd_workspace.go:741
↓ 2 callersFunctionprintWorkspaceContext
(workspace *models.Workspace)
cmd/pad/workspace_context.go:131
↓ 2 callersFunctionprobeMetadata
(forUuid: string)
web/src/lib/components/editor/attachment-chip.ts:338
↓ 2 callersMethodprojectIntelVisibility
projectIntelVisibility computes the (collectionIDs, itemIDs) visibility-scoping pair for the item-list calls the standup/changelog handlers make direc
internal/server/handlers_project_intel.go:108
↓ 2 callersMethodpublishEvent
publishEvent publishes a real-time event if the event bus is available (best-effort).
internal/server/handlers_documents.go:218
← previousnext →1,401–1,500 of 6,005, ranked by callers