MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / createAutonomyQueuedPrompt

Function createAutonomyQueuedPrompt

src/utils/autonomyRuns.ts:872–907  ·  view source on GitHub ↗
(params: {
  trigger: AutonomyTriggerKind
  basePrompt: string
  rootDir?: string
  currentDir?: string
  sourceId?: string
  sourceLabel?: string
  ownerKey?: string
  workload?: string
  priority?: 'now' | 'next' | 'later'
  shouldCreate?: () => boolean
  flow?: AutonomyRunFlowRef
})

Source from the content-addressed store, hash-verified

870}
871
872export async function createAutonomyQueuedPrompt(params: {
873 trigger: AutonomyTriggerKind
874 basePrompt: string
875 rootDir?: string
876 currentDir?: string
877 sourceId?: string
878 sourceLabel?: string
879 ownerKey?: string
880 workload?: string
881 priority?: 'now' | 'next' | 'later'
882 shouldCreate?: () => boolean
883 flow?: AutonomyRunFlowRef
884}): Promise<QueuedCommand | null> {
885 const rootDir = resolve(params.rootDir ?? getProjectRoot())
886 const currentDir = resolve(params.currentDir ?? getCwd())
887 const prepared = await prepareAutonomyTurnPrompt({
888 basePrompt: params.basePrompt,
889 trigger: params.trigger,
890 rootDir,
891 currentDir,
892 })
893 if (params.shouldCreate && !params.shouldCreate()) {
894 return null
895 }
896 return commitAutonomyQueuedPrompt({
897 prepared,
898 rootDir,
899 currentDir,
900 sourceId: params.sourceId,
901 sourceLabel: params.sourceLabel,
902 ownerKey: params.ownerKey,
903 workload: params.workload,
904 priority: params.priority,
905 flow: params.flow,
906 })
907}
908
909export async function createAutonomyQueuedPromptIfNoActiveSource(params: {
910 trigger: AutonomyTriggerKind

Calls 5

getProjectRootFunction · 0.85
getCwdFunction · 0.85
resolveFunction · 0.70

Tested by

no test coverage detected