Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Ckokoski/authorclaw
/ functions
Functions
1,032 in github.com/Ckokoski/authorclaw
⨍
Functions
1,032
◇
Types & classes
335
↓ 1 callers
Method
maybeDraftFromProject
* Auto-trigger: called by the gateway when a project completes. Decides * whether to draft a skill, then runs the drafter. Fire-and-forget.
gateway/src/services/auto-skill.ts:153
↓ 1 callers
Method
median
(values: number[])
gateway/src/services/style-clone.ts:388
↓ 1 callers
Method
mergeEntity
Merge a new entity into an existing canonical entry.
gateway/src/services/series-bible.ts:274
↓ 1 callers
Method
migrateEnvKeyIfPresent
* If the repo .env contains AUTHORCLAW_VAULT_KEY matching the given key, * migrate it to the out-of-repo key file and comment out the .env line.
gateway/src/security/vault.ts:122
↓ 1 callers
Function
mockAIComplete
(dimensionsJson: object)
gateway/src/services/writing-judge.test.ts:162
↓ 1 callers
Method
normalizeCategory
(value: any)
gateway/src/services/plot-promises.ts:484
↓ 1 callers
Method
normalizeContradiction
* Coerce one raw object into a Contradiction, or return null to drop it. * A finding with no evidence on EITHER side isn't evidence-chained, so it'
gateway/src/services/contradiction-detector.ts:343
↓ 1 callers
Method
normalizeDescription
(desc: string)
gateway/src/services/revision-orchestrator.ts:446
↓ 1 callers
Method
normalizeWhitespace
Collapse excessive whitespace but preserve intentional structure.
gateway/src/services/kdp-exporter.ts:148
↓ 1 callers
Method
optimize
* Analyze provided AMS performance data (pasted from Amazon Advertising UI * export) and produce optimization recommendations. * * Never prop
gateway/src/services/ams-ads.ts:130
↓ 1 callers
Function
overBudgetDeps
(captured: { system?: string })
gateway/src/services/message-pipeline-tiered.test.ts:279
↓ 1 callers
Method
parseContradictions
* Parse the model's JSON and coerce each entry into a well-typed * Contradiction. Invalid entries (bad category/subtype/severity, missing * evid
gateway/src/services/contradiction-detector.ts:320
↓ 1 callers
Method
parseDialogueParagraph
Parse one paragraph into its dialogue core, tag, and inferred speaker.
gateway/src/services/dialogue-auditor.ts:106
↓ 1 callers
Method
parseFeedback
* Parse an AI response into a structured ChapterFeedback. * Resilient to minor JSON issues.
gateway/src/services/beta-reader.ts:116
↓ 1 callers
Method
parseField
(field: string, min: number, max: number)
gateway/src/services/cron-scheduler.ts:88
↓ 1 callers
Function
parseInlineFormatting
* Parse inline markdown formatting (bold, italic) into TextRuns.
gateway/src/services/docx-export.ts:298
↓ 1 callers
Function
parseMarkdownToDocx
* Parse markdown content into DOCX paragraphs with professional formatting.
gateway/src/services/docx-export.ts:214
↓ 1 callers
Method
parsePlanResponse
* Parse the AI's JSON plan response, handling common formatting issues
gateway/src/services/projects.ts:464
↓ 1 callers
Method
parseSkill
(content: string, name: string, category: 'core' | 'author' | 'marketing' | 'premium' | 'ops')
gateway/src/skills/loader.ts:127
↓ 1 callers
Method
passClassifyThreads
Pass 3 — classify each open plot thread as open|resolved.
gateway/src/services/sleep-consolidation.ts:474
↓ 1 callers
Method
passDistillStyle
Pass 4 — distill a ≤600-char style digest from SOUL/STYLE-GUIDE/VOICE.
gateway/src/services/sleep-consolidation.ts:525
↓ 1 callers
Method
passRefreshEntities
Pass 1 — extract entities on the newest chapters we can read text for.
gateway/src/services/sleep-consolidation.ts:336
↓ 1 callers
Method
passRefreshSeriesBible
Pass 5 — refresh (rebuild) the Series Bible report for this project's series.
gateway/src/services/sleep-consolidation.ts:570
↓ 1 callers
Method
passReindexAndBackfill
Pass 7 — reindex FTS then backfill project_id/persona_id via a slug→owner map.
gateway/src/services/sleep-consolidation.ts:585
↓ 1 callers
Method
passSummarizeArcs
Pass 2 — 1–2 sentence arc per major/promoted character.
gateway/src/services/sleep-consolidation.ts:430
↓ 1 callers
Method
pauseAutonomous
* Pause autonomous mode temporarily (resumes on next enableAutonomous call)
gateway/src/services/heartbeat.ts:191
↓ 1 callers
Method
persist
(projectId: string)
gateway/src/services/character-voices.ts:170
↓ 1 callers
Method
persist
()
gateway/src/services/goals.ts:292
↓ 1 callers
Method
persist
()
gateway/src/services/cron-scheduler.ts:337
↓ 1 callers
Method
persistContext
(projectId: string)
gateway/src/services/context-engine.ts:349
↓ 1 callers
Method
persistReport
(projectId: string, report: ContinuityReport)
gateway/src/services/context-engine.ts:358
↓ 1 callers
Method
poll
()
gateway/src/bridges/telegram.ts:76
↓ 1 callers
Method
pollLoop
()
gateway/src/bridges/telegram.ts:68
↓ 1 callers
Method
process
( userMessage: string, assistantResponse: string, context?: { personaId?: string | null; projectId
gateway/src/services/memory.ts:150
↓ 1 callers
Method
proposeCampaigns
* Propose three campaign templates from a base set of keywords + book metadata.
gateway/src/services/ams-ads.ts:78
↓ 1 callers
Method
proposeStep
* Kick off a single launch step. Does NOT execute irreversible actions * itself — creates a ConfirmationRequest and returns its ID. Caller * pol
gateway/src/services/launch-orchestrator.ts:253
↓ 1 callers
Method
proposeTranslation
* Propose actually running a translation. Creates a ConfirmationRequest * with the full cost + disclosure text. Caller must wait for approval *
gateway/src/services/translation-pipeline.ts:255
↓ 1 callers
Method
queryPerplexityDirect
(query: string, apiKey: string, maxWords: number)
gateway/src/services/research-lookup.ts:116
↓ 1 callers
Method
queryViaOpenRouter
(query: string, apiKey: string, maxWords: number)
gateway/src/services/research-lookup.ts:141
↓ 1 callers
Method
readChapterText
Read a chapter's full prose from disk (preferred) or fall back to summary.
gateway/src/services/sleep-consolidation.ts:401
↓ 1 callers
Method
readStyleGuideFallback
Read and cap the STYLE-GUIDE.md fallback. Never throws.
gateway/src/services/memory-tier.ts:290
↓ 1 callers
Method
recordActivity
(type: string, data: Record<string, any>)
gateway/src/services/heartbeat.ts:661
↓ 1 callers
Method
recoverTruncatedJson
* Attempt to close a truncated JSON object/array by: * 1. Finding the last complete element (object or value followed by `,`) * 2. Counting
gateway/src/services/context-engine.ts:242
↓ 1 callers
Method
recoverTruncatedJson
* Best-effort close of a truncated JSON string: walk the structure tracking * string context + brace/bracket depth, then append the missing closers
gateway/src/services/contradiction-detector.ts:449
↓ 1 callers
Method
reformatBlurb
(amazonBlurb: string, warnings: string[])
gateway/src/services/bookbub-submitter.ts:111
↓ 1 callers
Function
registerAudioRoutes
(ctx: ApiContext)
gateway/src/api/routes/audio.ts:11
↓ 1 callers
Function
registerAuthorOSToolsRoutes
(ctx: ApiContext)
gateway/src/api/routes/authoros-tools.ts:11
↓ 1 callers
Function
registerBackupRoutes
(ctx: ApiContext)
gateway/src/api/routes/backup.ts:9
↓ 1 callers
Function
registerContextHeartbeatRoutes
(ctx: ApiContext)
gateway/src/api/routes/context-heartbeat.ts:10
↓ 1 callers
Function
registerCronRoutes
(ctx: ApiContext)
gateway/src/api/routes/cron.ts:9
↓ 1 callers
Function
registerDocumentRoutes
(ctx: ApiContext)
gateway/src/api/routes/documents.ts:13
↓ 1 callers
Function
registerExternalCoversRoutes
(ctx: ApiContext)
gateway/src/api/routes/external-covers.ts:11
↓ 1 callers
Function
registerImageRoutes
(ctx: ApiContext)
gateway/src/api/routes/images.ts:10
↓ 1 callers
Function
registerJudgeCharacterVoiceRoutes
(ctx: ApiContext)
gateway/src/api/routes/judge-character-voices.ts:9
↓ 1 callers
Function
registerKdpTrackChangesRoutes
(ctx: ApiContext)
gateway/src/api/routes/kdp-track-changes.ts:11
↓ 1 callers
Function
registerManuscriptQualityRoutes
(ctx: ApiContext)
gateway/src/api/routes/manuscript-quality.ts:11
↓ 1 callers
Function
registerMemorySearchRoutes
(ctx: ApiContext)
gateway/src/api/routes/memory-search.ts:9
↓ 1 callers
Function
registerPersonaRoutes
(ctx: ApiContext)
gateway/src/api/routes/personas.ts:9
↓ 1 callers
Function
registerProjectRoutes
(ctx: ApiContext)
gateway/src/api/routes/projects.ts:9
↓ 1 callers
Function
registerResearchLookupRoutes
(ctx: ApiContext)
gateway/src/api/routes/research-lookup.ts:10
↓ 1 callers
Function
registerResearchWebRoutes
(ctx: ApiContext)
gateway/src/api/routes/research-web.ts:9
↓ 1 callers
Function
registerSkillDraftRoutes
(ctx: ApiContext)
gateway/src/api/routes/skill-drafts.ts:9
↓ 1 callers
Function
registerSneakersRoutes
(ctx: ApiContext)
gateway/src/api/routes/sneakers.ts:9
↓ 1 callers
Function
registerStructuresPlotRoutes
(ctx: ApiContext)
gateway/src/api/routes/structures-plot.ts:9
↓ 1 callers
Function
registerSystemRoutes
(ctx: ApiContext)
gateway/src/api/routes/system.ts:10
↓ 1 callers
Function
registerUserModelRoutes
(ctx: ApiContext)
gateway/src/api/routes/user-model.ts:9
↓ 1 callers
Function
registerVideoResearchRoutes
(ctx: ApiContext)
gateway/src/api/routes/video-research.ts:9
↓ 1 callers
Function
registerWave3GatedRoutes
(ctx: ApiContext)
gateway/src/api/routes/wave3-gated.ts:10
↓ 1 callers
Function
registerWebsiteRoutes
(ctx: ApiContext)
gateway/src/api/routes/website.ts:11
↓ 1 callers
Method
removeBlogPost
(siteId: string, postSlug: string)
gateway/src/services/website-sites.ts:251
↓ 1 callers
Method
removeBook
(siteId: string, bookSlug: string)
gateway/src/services/website-sites.ts:220
↓ 1 callers
Method
removeEvent
(id: string)
gateway/src/services/release-calendar.ts:75
↓ 1 callers
Method
removeGoal
(goalId: string)
gateway/src/services/goals.ts:165
↓ 1 callers
Method
removeProject
(seriesId: string, projectId: string)
gateway/src/services/series-bible.ts:140
↓ 1 callers
Method
removeScript
(id: string)
gateway/src/services/orchestrator.ts:416
↓ 1 callers
Method
renderArchivalHit
Render one archival hit: title + snippet + source-type + date.
gateway/src/services/memory-tier.ts:547
↓ 1 callers
Method
renderedSheetsLength
Length of the rendered character sheets block body (lines only).
gateway/src/services/memory-tier.ts:438
↓ 1 callers
Method
reportPath
(projectId: string)
gateway/src/services/context-engine.ts:321
↓ 1 callers
Method
resolveRequestedPasses
Resolve which passes to run. Unknown names are ignored; omitting the * filter runs every registered pass.
gateway/src/services/revision-orchestrator.ts:418
↓ 1 callers
Method
resolveTargets
(projectId?: string)
gateway/src/services/sleep-consolidation.ts:193
↓ 1 callers
Function
resolveThreshold
()
gateway/src/services/logger.ts:32
↓ 1 callers
Method
resolveVaultKey
()
gateway/src/security/vault.ts:150
↓ 1 callers
Function
resolveVoiceForRequest
* Resolve voice priority: explicit voice > persona's voice > project preset > default. * Used by both /api/audio/generate and the project narration
gateway/src/api/routes/audio.ts:22
↓ 1 callers
Method
restart
()
gateway/src/services/orchestrator.ts:311
↓ 1 callers
Method
restartProject
* Reset the entire project: every failed/active step → pending, project * status → pending. Useful when the user wants to clean-start after a *
gateway/src/services/projects.ts:702
↓ 1 callers
Method
restartScript
(id: string)
gateway/src/services/orchestrator.ts:443
↓ 1 callers
Method
resumeAutonomous
* Resume autonomous mode after pause
gateway/src/services/heartbeat.ts:200
↓ 1 callers
Method
retryStep
* Reset a single failed (or active) step back to pending so the user can * retry it. Clears the error message + result. Does NOT delete the step's
gateway/src/services/projects.ts:673
↓ 1 callers
Method
runAntiSlopPass
(chapterText: string, chapterId?: string)
gateway/src/services/revision-orchestrator.ts:381
↓ 1 callers
Method
runContinuityPass
(input: RevisionAnalyzeInput)
gateway/src/services/revision-orchestrator.ts:206
↓ 1 callers
Method
runCraftPass
(chapterText: string, chapterId?: string)
gateway/src/services/revision-orchestrator.ts:335
↓ 1 callers
Method
runFactPass
(_input: RevisionAnalyzeInput)
gateway/src/services/revision-orchestrator.ts:403
↓ 1 callers
Method
runFormatPro
* Run Format Pro to produce a publication-ready export. * Returns the path to the output file.
gateway/src/services/external-tools.ts:120
↓ 1 callers
Method
runManuscriptAutopsy
* Run Manuscript Autopsy on a manuscript text (any length). * Writes text to a temp file, invokes the tool, reads the JSON output.
gateway/src/services/external-tools.ts:73
↓ 1 callers
Method
runNow
Manually run a job NOW. Useful for testing without waiting.
gateway/src/services/cron-scheduler.ts:270
↓ 1 callers
Method
runVoicePass
(input: RevisionAnalyzeInput)
gateway/src/services/revision-orchestrator.ts:283
↓ 1 callers
Method
safeJson
Best-effort JSON parse (strips code fences); returns null on failure.
gateway/src/services/sleep-consolidation.ts:635
↓ 1 callers
Method
safeParseJson
* Robust JSON recovery, mirroring ContextEngine.parseAIJson's strategy * (fences → first-brace/last-brace slice → common-fix pass → truncation *
gateway/src/services/contradiction-detector.ts:389
↓ 1 callers
Method
sanitize
(metadata: Record<string, any>)
gateway/src/services/activity-log.ts:165
↓ 1 callers
Method
sanitizePayload
Redact API keys / bearer tokens from persisted payloads.
gateway/src/services/confirmation-gate.ts:302
← previous
next →
601–700 of 1,032, ranked by callers