Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
31,685 in github.com/PerpetualSoftware/pad
⨍
Functions
31,685
◇
Types & classes
3,533
↓ 3 callers
Function
IsStartSlotCollection
IsStartSlotCollection reports whether a playbook collection declares the session start select.
internal/collections/templates.go:618
↓ 3 callers
Function
IsStartSlotField
IsStartSlotField reports whether a declared field is the session start select: key start, type select, offering both run and offer. A workspace may de
internal/collections/templates.go:549
↓ 3 callers
Function
IsTerminal
IsTerminal returns true if stdin is a terminal (not piped/redirected).
internal/cli/skills.go:107
↓ 3 callers
Function
IsUIDismissalKey
IsUIDismissalKey reports whether key is in UIDismissalKeys or is a well-formed tz-mismatch pair key.
internal/models/ui_dismissals.go:48
↓ 3 callers
Function
IsUniqueViolation
IsUniqueViolation is the exported form of isUniqueViolation, for HTTP handlers that have to turn a store error into a 409 without re-implementing the
internal/store/items.go:731
↓ 3 callers
Method
Item
Item reads a live item of this workspace in this transaction: the collection, ref and title a write publishes are the ones it wrote under, not an earl
internal/store/fenced_items.go:163
↓ 3 callers
Method
ItemRestoreBoundaryOpID
ItemRestoreBoundaryOpID returns items.restore_boundary_op_id — the DURABLE op-log-id restore boundary (BUG-2264), or (0, false) when the item has neve
internal/store/yjs_updates.go:460
↓ 3 callers
Method
ItemSeqChain
ItemSeqChain walks the item's stamped activity entries from toSeq back to fromSeq and returns them newest first, at most max. Complete is true only wh
internal/store/activity_seq_chain.go:32
↓ 3 callers
Method
ItemsCreatedViaApp
ItemsCreatedViaApp returns, for the items an app CREATED, that app (items.created_via_app, set once). The item JSON's via_app is the creator, agreed w
internal/store/app_attribution.go:78
↓ 3 callers
Method
ItemsModifiedSince
ItemsModifiedSince returns one page of the items in a workspace that were updated at or after the given timestamp. Used for incremental sync on tab re
internal/store/items.go:7213
↓ 3 callers
Method
JSONArrayContains
JSONArrayContains returns SQL + the arg to check if a JSON array column contains a given text value, compared exactly (case and all). SQLite: a json_e
internal/store/dialect.go:144
↓ 3 callers
Function
KeyFor
KeyFor is the row's key under a sort.
internal/needs/cursor.go:66
↓ 3 callers
Method
LatestAssignmentTimes
LatestAssignmentTimes returns, per item, when it was last assigned to its current assignee: the newest "updated" activity recording an assignment to t
internal/store/needs_read.go:461
↓ 3 callers
Function
LatestInstant
LatestInstant is the latest instant a reading at or before w (within a day of it) can resolve to in loc: w less the smaller of the two offsets Resolve
internal/schedule/wall.go:103
↓ 3 callers
Function
LeaseCountdown
RelativeTime returns a human-readable relative time string. LeaseCountdown renders a lease expiry as a short human countdown ("expires in 12m"). Sub-m
internal/cli/format.go:112
↓ 3 callers
Function
LibraryPlaybookFields
LibraryPlaybookFields is the stored fields blob for an active item made from a library playbook. Every door that brings one in (template seed, library
internal/collections/templates.go:363
↓ 3 callers
Method
ListAllCollectionItems
ListAllCollectionItems is ListAllItems for one collection: it follows the server's next-offset until has-more is false (BUG-3793).
internal/cli/client.go:473
↓ 3 callers
Method
ListAllCollectionItemsReport
ListAllCollectionItemsReport is ListAllCollectionItems from startOffset, also returning the first page's UndeclaredKeys (BUG-4024).
internal/cli/client.go:480
↓ 3 callers
Method
ListArchivedCollections
TASK-2189: archiving a collection (DeleteCollection) is a soft delete of the collection row; its items are untouched and only hidden by that row's del
internal/store/collections_archive.go:22
↓ 3 callers
Method
ListChildItems
ListChildItems is GetChildItems with the caller's visibility applied in the query and an optional window over it (BUG-3789). Visibility is in the quer
internal/store/items.go:5969
↓ 3 callers
Method
ListDormantOpLogItemsBefore
ListDormantOpLogItemsBefore + PruneItemOpLogIfDormantBefore power the periodic prune sweep (TASK-1309). Selects items whose ENTIRE op-log is older tha
internal/collab/room.go:334
↓ 3 callers
Method
ListItemVersionsBeforeTime
ListItemVersionsBeforeTime returns versions for an item created before the given time, ordered newest-first, limited to `limit` results. Used for curs
internal/store/items.go:7006
↓ 3 callers
Method
ListItemsReport
ListItemsReport is ListItems plus what the response says besides its rows (ItemListPage), for a caller that warns about undeclared keys or truncation.
internal/cli/client.go:488
↓ 3 callers
Method
ListMCPAuditByConnection
ListMCPAuditByConnection returns the audit rows for one OAuth connection (or one PAT). Used by the per-connection drilldown the connected-apps page ex
internal/store/mcp_audit.go:149
↓ 3 callers
Method
ListMovedOutSince
ListMovedOutSince finds items that the main /items-changes delta drops because they moved OUT of the caller's visible scope: their CURRENT collection
internal/store/items.go:1898
↓ 3 callers
Method
ListUIDismissals
ListUIDismissals returns the keys userID has dismissed, sorted. An unknown user answers sql.ErrNoRows.
internal/store/ui_dismissals.go:38
↓ 3 callers
Method
ListVersionsResolvedSnapshot
ListVersionsResolvedSnapshot reads the document's body and its versions in one read snapshot, and resolves the versions from that body (BUG-3833, the
internal/store/versions.go:151
↓ 3 callers
Method
ListWorkspaceAppPrincipals
ListWorkspaceAppPrincipals returns the workspace's bots for the Apps section, or none when the policy hides them.
internal/store/app_principal.go:119
↓ 3 callers
Method
ListWorkspaceGraphLinks
ListWorkspaceGraphLinks returns every edge for the workspace graph view: all item_links rows (parent / blocks / implements / related) plus resolved sa
internal/store/graph.go:59
↓ 3 callers
Method
ListWorkspaceRoleFinishedItemsQ
ListWorkspaceRoleFinishedItemsQ returns candidate completion transitions for live items in workspaceID assigned to one of roleIDs at or after since, m
internal/store/role_park.go:453
↓ 3 callers
Function
LoadPushConfigAutoArm
LoadPushConfigAutoArm reads ONLY the [push] auto_arm value from the user's config.toml with STRICT fail-closed semantics for the consent gate (PLAN-26
internal/config/config.go:462
↓ 3 callers
Method
LogFile
()
internal/config/config.go:1235
↓ 3 callers
Method
LookupCalendarFeed
LookupCalendarFeed gates live human ownership in the lookup itself. Invalid token shapes return without querying, and no error includes the credential
internal/store/calendar_feeds.go:143
↓ 3 callers
Method
LookupPasswordReset
LookupPasswordReset performs a read-only validation of a reset token and returns the associated user WITHOUT consuming the token. Used by the reset ha
internal/store/password_resets.go:59
↓ 3 callers
Method
MCPAuditLog
MCPAuditLog wraps next with audit recording. Mounts after MCPBearerAuth in registerMCPRoutes so currentUser + the token identity stashed by the auth m
internal/server/middleware_mcp_audit.go:216
↓ 3 callers
Method
MCPBlockedReason
MCPBlockedReason says why MCP cannot be served although it is turned on (TASK-1069), or "" when it is off or available. One rule for the admin panel's
internal/server/handlers_admin_mcp.go:231
↓ 3 callers
Method
MCPConnectionStatsForUser
MCPConnectionStatsForUser returns last-used + 30-day-count keyed by (token_kind, token_ref) for every connection the user has any audit-log activity f
internal/store/mcp_audit.go:215
↓ 3 callers
Function
MCPConnectionStatsKey
MCPConnectionStatsKey is the exported wrapper for callers in other packages (notably internal/server/handlers_connected_apps.go in TASK-954) that need
internal/store/mcp_audit.go:276
↓ 3 callers
Function
MCPPropertyName
MCPPropertyName converts a CLI flag or argument name to the snake_case form used inside the dispatch input map. Hyphens become underscores; everything
internal/mcp/registry.go:130
↓ 3 callers
Method
ManagesLocalServer
ManagesLocalServer reports whether this client configuration should auto-manage a local Pad server process.
internal/config/config.go:975
↓ 3 callers
Function
ManifestURL
ManifestURL is where a base URL's manifest is published.
internal/appmanifest/manifest.go:429
↓ 3 callers
Method
MarkCloudOwned
MarkCloudOwned records that a cloud-mode server owns this database. Every cloud boot calls it before its own plan backfill. Idempotent.
internal/store/instance_mode.go:65
↓ 3 callers
Function
MarkFirstConnect
MarkFirstConnect reports whether this is THIS session's first connect, where /pad:connect offers the workspace's session-start playbook, and marks it
internal/cli/session_arm_state.go:592
↓ 3 callers
Method
MarkOutboxAttemptFailed
MarkOutboxAttemptFailed records a failed dispatch attempt, leaving the event pending so the next drain retries it. The CLAIM IS RELEASED here, not le
internal/store/event_outbox.go:1833
↓ 3 callers
Method
MarkOutboxDispatched
MarkOutboxDispatched stamps events as delivered, for the claim that holds them. Called AFTER the surfaces have been handed the event, never before. T
internal/store/event_outbox.go:1789
↓ 3 callers
Method
MarkStart
(userID, workerID, workspaceID, playbookID string)
internal/server/session_presence_start_test.go:14
↓ 3 callers
Method
MarkStripeEventProcessed
MarkStripeEventProcessed is ClaimStripeEvent with the pre-BUG-3561 answer: alreadyProcessed is false only for a claim, and true for a done event and f
internal/store/stripe_events.go:18
↓ 3 callers
Function
Message
Message concatenates the context, a zero byte, the public key and challenge. A 32-byte public key and 32-byte challenge produce exactly 105 bytes.
internal/serveridentity/identity.go:19
↓ 3 callers
Method
MinOpLogID
MinOpLogID powers the resume-cursor / force-refresh check (TASK-1319): when a reconnecting client announces `?since=<id>` and that id is below MIN, ro
internal/collab/room.go:340
↓ 3 callers
Method
Namespace
Namespace returns the configured namespace, empty for Default. For log lines and health output — not for building names, which is Name's job.
internal/redisns/redisns.go:158
↓ 3 callers
Function
NativeItems
NativeItems wraps a slice of items so JSON marshaling emits each item's `fields` and `tags` as native JSON. A nil or empty slice returns a non-nil emp
internal/cli/native_item.go:37
↓ 3 callers
Function
NewCollabObserver
NewCollabObserver returns an observer writing into m.
internal/metrics/collab_observer.go:11
↓ 3 callers
Function
NewPostgresBounded
NewPostgresBounded is NewPostgres followed by BoundRuntimePool(limits): the store a server runs on after boot (TASK-4278), with the startup pool alrea
internal/store/storetest/postgres.go:79
↓ 3 callers
Function
NewRelationTargetList
NewRelationTargetList wraps an ordered list of targets.
internal/models/item.go:238
↓ 3 callers
Function
NewRelationTargetSet
NewRelationTargetSet wraps one scalar target.
internal/models/item.go:233
↓ 3 callers
Function
NewWithReplaySize
NewWithReplaySize creates a MemoryBus with a custom replay buffer capacity (tests use a small one).
internal/watchevents/watchevents.go:503
↓ 3 callers
Method
NextSeq
NextSeq returns the workspace's next seq (nextWorkspaceSeqSubquery), read under LockWorkspaceSeq.
internal/store/fenced_tx.go:188
↓ 3 callers
Function
NoulValue
NoulValue reads the probability out of a stored Noul answer. ok is false for a row of another kind or an unreadable answer.
internal/decision/attention.go:122
↓ 3 callers
Method
OAuthIdentityOwner
OAuthIdentityOwner returns the pad account the provider account `subject` is bound to, or "" when it is bound to none.
internal/store/oauth_identities.go:166
↓ 3 callers
Method
Open
Open is Get with the concrete *os.File, for a caller that must not call through an interface (the app store, TASK-3396). The caller closes it.
internal/attachments/fs_store.go:199
↓ 3 callers
Method
OversizedPendingOutbox
OversizedPendingOutbox lists undispatched rows over MaxOutboxClaimableBytes. THE CLAIM'S CEILING, not the write cap, because the question this answer
internal/store/event_outbox.go:2223
↓ 3 callers
Function
ParseAttachmentHref
ParseAttachmentHref returns the UUID portion of a `pad-attachment:UUID` reference, or "" if href is not a pad-attachment reference / has an empty UUID
internal/server/render/attachments.go:69
↓ 3 callers
Function
ParseDayStart
ParseDayStart reads a 24-hour "HH:MM" day start as a minute of the day. It accepts exactly two hour digits 00-23, a colon and two minute digits 00-59:
internal/usertz/daystart.go:15
↓ 3 callers
Function
ParseLineRange
ParseLineRange reads "A-B", "A-" (to the end) or "A". A range past the body's end is clipped by SliceBodyLines, not refused here.
internal/bodypatch/lines.go:30
↓ 3 callers
Function
ParsePlaybookCLIArgs
ParsePlaybookCLIArgs splits a sequence of positional args + bareword flags + key=value pairs into a typed map matching the playbook's declared spec. E
internal/server/handlers_playbooks.go:818
↓ 3 callers
Method
PlanExpired
IsDisabled returns true if the user account has been disabled. PlanExpired reports whether the user's plan carries an expiry at or before now (BUG-335
internal/models/user.go:115
↓ 3 callers
Method
PopulateHasChildren
PopulateHasChildren sets HasChildren=true on items that have at least one child linked via parent link_type. Operates in-place on the slice.
internal/store/items.go:6192
↓ 3 callers
Method
PostRaw
PostRaw sends raw bytes to the API and decodes the JSON response.
internal/cli/client.go:2208
↓ 3 callers
Function
ProjectReplaceTitle
ProjectReplaceTitle is len(ReplaceTitle(content, oldTitle, newTitle)) and the number of links it rewrites, computed WITHOUT allocating: the document c
internal/links/links.go:55
↓ 3 callers
Method
PruneItemOpLogIfDormantBefore
(itemID string, before time.Time)
internal/collab/room.go:335
↓ 3 callers
Method
PruneYjsUpdatesBefore
PruneYjsUpdatesBefore deletes op-log rows for an item with created_at strictly before the given cutoff and returns the row count removed. **Not safe
internal/store/yjs_updates.go:655
↓ 3 callers
Method
PruneYjsUpdatesBefore
PruneYjsUpdatesBefore deletes every row for itemID whose CreatedAt is strictly less than the cutoff. Tests pass a far-future cutoff to wipe an op-log;
internal/collab/manager_test.go:200
↓ 3 callers
Method
PushDispatchRunning
PushDispatchRunning reports whether the dispatch loop has been started and not stopped. Read-only; startup's wiring test reads it (TASK-3939 B2c).
internal/server/push_dispatch.go:273
↓ 3 callers
Method
PushItem
PushItem publishes a self-addressed push notification (IDEA-2544 Phase 1) on an item, over the same watch-events bus/stream `pad watch --stream --for-
internal/cli/client.go:900
↓ 3 callers
Function
ReadBootstrapToken
ReadBootstrapToken reads <DataDir>/.bootstrap-token. The file is created by EnsureBootstrapToken in internal/server/bootstrap.go with mode 0600 and co
internal/cli/bootstrap.go:197
↓ 3 callers
Method
RecentComments
RecentComments returns an item's newest n comments, oldest first — the "recent trail" a decision's state carries. Ordered by (created_at, id) so a bur
internal/store/decisions.go:680
↓ 3 callers
Method
Record
(member string, raw []byte)
internal/models/export_decode.go:16
↓ 3 callers
Method
RedeemInstallCode
RedeemInstallCode consumes a code and rotates the install client's secret in one transaction. Every failure is ErrInstallCodeInvalid. Lock order is t
internal/store/app_provision.go:496
↓ 3 callers
Method
Refuses
Refuses reports whether an unresolvable value of this origin REFUSES the request, or is dropped and reported. THIS IS THE ONE STATEMENT OF THE RULE (
internal/store/relation_referents.go:1191
↓ 3 callers
Method
Register
Register installs store under prefix (e.g. "fs", "s3"). The prefix MUST NOT contain a colon — Resolve splits keys on the first colon, so a prefix with
internal/attachments/registry.go:37
↓ 3 callers
Method
RegisterOAuthActiveTokensCollector
RegisterOAuthActiveTokensCollector exposes pad_oauth_active_tokens as a callback-driven gauge. Pulled on every scrape — same pattern as the db-stats c
internal/metrics/metrics.go:1194
↓ 3 callers
Method
ReindexCollectionRelationLinks
ReindexCollectionRelationLinks rebuilds the reverse index for every live item in one collection. WHY THIS EXISTS (the U5 contract). The index is a fu
internal/store/relation_links.go:205
↓ 3 callers
Method
ReleaseIdempotencyKey
ReleaseIdempotencyKey gives up a claim the write refused, so a corrected retry with the same key can proceed. A pending claim is deleted; an unknown o
internal/store/idempotency.go:140
↓ 3 callers
Method
Remove
Remove implements SessionPresence. Removing the user's last session deletes the user's bucket too, so an idle server doesn't accumulate an empty map p
internal/server/session_presence.go:406
↓ 3 callers
Function
RemoveArmState
RemoveArmState disarms the current session by removing its arm-state file. It reports whether a file was actually present (so `pad session disarm` can
internal/cli/session_arm_state.go:317
↓ 3 callers
Method
RemoveConnectionWorkspace
RemoveConnectionWorkspace deletes one (request_id, workspace_id) row. Idempotent: removing a pair that isn't present is a no-op (no error). Phase D's
internal/store/oauth_connections.go:601
↓ 3 callers
Method
RenameConnection
RenameConnection updates the human-readable name. Touches updated_at. Returns ErrOAuthConnectionNotFound if the row doesn't exist. Trim is the caller
internal/store/oauth_connections.go:256
↓ 3 callers
Function
RenderCollectionMarkdown
RenderCollectionMarkdown is the writer-taking core of PrintCollectionMarkdown. Columns mirror PrintCollectionTable's.
internal/cli/format_markdown.go:168
↓ 3 callers
Method
RenegotiateCommitment
RenegotiateCommitment previews or applies one plan. Authority belongs to the handler; expectedAssignee guards its decision (nil for an owner). The clo
internal/store/commitment_renegotiate.go:29
↓ 3 callers
Method
ReopenOccurrence
(workspaceID, itemID string, in ReopenInput)
internal/store/schedule_reopen.go:484
↓ 3 callers
Function
Resolve
Resolve merges configuration sources, LATER sources winning per field. Only non-empty fields override, so a source that says nothing about a field lea
internal/decision/config.go:84
↓ 3 callers
Method
ResolveLateRelationDefaultsQ
ResolveLateRelationDefaultsQ is ResolveLateRelationDefaults on a caller-supplied read executor — the copy door runs inside a transaction.
internal/store/relation_referents.go:1708
↓ 3 callers
Function
ResolveMode
ResolveMode picks the billing mode from PAD_BILLING and, for one release, its predecessor PAD_BILLING_AVAILABLE (TASK-3577): - PAD_BILLING set: it de
internal/billing/offer.go:42
↓ 3 callers
Function
ResolveOutboundSecret
ResolveOutboundSecret picks the secret to send on pad → pad-cloud calls given the inbound rotation list and an optional explicit override. Pulled out
internal/billing/cloud_client.go:52
↓ 3 callers
Method
ResolvePath
ResolvePath returns the config path for the given agent using the installer's home/cwd + goos overrides. CWDBased agents (Claude Code) resolve against
internal/mcp/install.go:644
↓ 3 callers
Method
RestoreCollection
RestoreCollection un-archives a collection by slug or id (TASK-2189).
internal/cli/client.go:346
↓ 3 callers
Function
RetryableStatus
RetryableStatus reports whether a receiver's HTTP status means "try again later" rather than "this request is unacceptable": any 5xx, and the three 4x
internal/webhooks/dispatcher.go:747
↓ 3 callers
Method
RevokeInstallClientGrantsTx
RevokeInstallClientGrantsTx deletes every code, PKCE row, access and refresh token the install's client holds, with their bindings. The caller holds t
internal/store/install_clients.go:277
↓ 3 callers
Method
RevokeUserCalendarFeedsTx
RevokeUserCalendarFeedsTx participates in credential revocation with the user row locked before feed rows, the same lock order as feed creation.
internal/store/calendar_feeds.go:136
↓ 3 callers
Function
RewriteRawItemJSON
RewriteRawItemJSON lexically rewrites only the `fields` and `tags` values of item objects reachable along path from the root of raw, preserving every
internal/cli/native_item.go:65
← previous
next →
5,001–5,100 of 31,685, ranked by callers