Skip to content

Graphorin API reference v0.15.1


Graphorin API reference / @graphorin/proactive / / CreateProactiveCronTaskOptions

Interface: CreateProactiveCronTaskOptions<TDeps>

Defined in: packages/proactive/src/cron-task.ts:109

Stable

Options for createProactiveCronTask.

Type Parameters

Type ParameterDefault type
TDepsunknown

Properties

PropertyModifierTypeDescriptionDefined in
activeHours?readonlyActiveHoursDaily window in which fires may run. Absent = always.packages/proactive/src/cron-task.ts:145
agentreadonlyAgent<TDeps, string>The dedicated agent every fire runs on. BY-CONSTRUCTION contract: its toolset must not carry trigger-registering tools (see schedulingToolNames), and it should be a separate instance from the interactive agent (one run per instance).packages/proactive/src/cron-task.ts:118
allowRecursiveScheduling?readonlybooleanExplicit recursive-scheduling grant. Default false.packages/proactive/src/cron-task.ts:163
budget?readonlyPick<RunBudget, "maxCostUsd" | "maxTokens">Per-fire run budget. onExceed is pinned to 'stop'.packages/proactive/src/cron-task.ts:143
grant?readonlyProactiveOutcomeKindMaximum escalation rung (default 'notify'). 'notify' / 'question' fires run capability: 'read-only' - side effects are impossible by construction. 'act' additionally requires memory with an ACTIVE ingest gate - fail-closed config check.packages/proactive/src/cron-task.ts:135
idreadonlystringTask identity: the trigger id and the outcome taskId.packages/proactive/src/cron-task.ts:111
memory?readonlyMemoryIngestGateEvidenceEvidence for the 'act' grant: the memory facade whose ingestGate is non-null (createMemory({ ingestGate })). Ignored for lower grants.packages/proactive/src/cron-task.ts:141
now?readonly() => numberOverride the wall clock - used by tests.packages/proactive/src/cron-task.ts:183
onOutcome?readonly(outcome) => void | Promise<void>Observer for ladder outcomes. Errors are caught + WARNed.packages/proactive/src/cron-task.ts:151
promptreadonlystring | (() => string | Promise<string>)The instruction each fire runs with.packages/proactive/src/cron-task.ts:122
providerreadonlyProviderREQUIRED fail-closed model pin: every fire resolves to exactly this provider and never consults the agent's fallback chain.packages/proactive/src/cron-task.ts:127
registryAgentId?readonlystringRegistry id the dedicated agent is registered under for REST resume (see suspendedRuns). Default proactive-<id>. Avoid ':' in the id - it is the scope-segment separator (agents:invoke:<id>).packages/proactive/src/cron-task.ts:181
reviewOptions?readonlyreadonly ProactiveOutcomeOption[]Approve / deny button labels for review-rung outcomes.packages/proactive/src/cron-task.ts:165
schedulereadonlyProactiveCronSchedule-packages/proactive/src/cron-task.ts:120
schedulerreadonlyScheduler-packages/proactive/src/cron-task.ts:119
schedulingToolNames?readonlyreadonly string[]Names of trigger-registering tools that must NOT be reachable from this task. Checked against the dedicated agent's registry at creation time; a hit throws ProactiveConfigError unless allowRecursiveScheduling grants it explicitly. Default [] - the by-construction contract (a curated toolset without scheduling tools) stays the primary enforcement; E1's deny-by-name rules (shipped in 0.9.0) compose on top as a policy layer.packages/proactive/src/cron-task.ts:161
sessions?readonlySessionManagerSession manager: when present, each fire creates a real session.packages/proactive/src/cron-task.ts:147
suspendedRuns?readonlySuspendedRunRegistryLikeC3 messenger bridge: register a parked fire's resumable state with the server's run tracker so POST /v1/runs/:runId/resume can find it. Structural (GraphorinServer.runs satisfies it); pair with registering the dedicated agent under registryAgentId in the server's agent registry. Absent, question/review outcomes are still delivered - resolution then happens library-side.packages/proactive/src/cron-task.ts:174
userId?readonlystringUser the created sessions belong to. Default 'proactive'.packages/proactive/src/cron-task.ts:149
warn?readonly(message) => voidWARN sink. Default console.warn.packages/proactive/src/cron-task.ts:185