Graphorin API reference v0.8.0
Graphorin API reference / @graphorin/proactive / / CreateProactiveCronTaskOptions
Interface: CreateProactiveCronTaskOptions<TDeps>
Defined in: packages/proactive/src/cron-task.ts:109
Options for createProactiveCronTask.
Stable
Type Parameters
| Type Parameter | Default type |
|---|---|
TDeps | unknown |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
activeHours? | readonly | ActiveHours | Daily window in which fires may run. Absent = always. | packages/proactive/src/cron-task.ts:145 |
agent | readonly | Agent<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? | readonly | boolean | Explicit recursive-scheduling grant. Default false. | packages/proactive/src/cron-task.ts:162 |
budget? | readonly | Pick<RunBudget, "maxCostUsd" | "maxTokens"> | Per-fire run budget (C5). onExceed is pinned to 'stop'. | packages/proactive/src/cron-task.ts:143 |
grant? | readonly | ProactiveOutcomeKind | Maximum 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 (B3) - fail-closed config check. | packages/proactive/src/cron-task.ts:135 |
id | readonly | string | Task identity: the trigger id and the outcome taskId. | packages/proactive/src/cron-task.ts:111 |
memory? | readonly | MemoryIngestGateEvidence | Evidence 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 | () => number | Override the wall clock - used by tests. | packages/proactive/src/cron-task.ts:182 |
onOutcome? | readonly | (outcome) => void | Promise<void> | Observer for ladder outcomes. Errors are caught + WARNed. | packages/proactive/src/cron-task.ts:151 |
prompt | readonly | string | (() => string | Promise<string>) | The instruction each fire runs with. | packages/proactive/src/cron-task.ts:122 |
provider | readonly | Provider | REQUIRED 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? | readonly | string | Registry 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:180 |
reviewOptions? | readonly | readonly ProactiveOutcomeOption[] | Approve / deny button labels for review-rung outcomes. | packages/proactive/src/cron-task.ts:164 |
schedule | readonly | ProactiveCronSchedule | - | packages/proactive/src/cron-task.ts:120 |
scheduler | readonly | Scheduler | - | packages/proactive/src/cron-task.ts:119 |
schedulingToolNames? | readonly | readonly 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) is the primary enforcement until E1's deny-by-name lands. | packages/proactive/src/cron-task.ts:160 |
sessions? | readonly | SessionManager | Session manager: when present, each fire creates a real session. | packages/proactive/src/cron-task.ts:147 |
suspendedRuns? | readonly | SuspendedRunRegistryLike | C3 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:173 |
userId? | readonly | string | User the created sessions belong to. Default 'proactive'. | packages/proactive/src/cron-task.ts:149 |
warn? | readonly | (message) => void | WARN sink. Default console.warn. | packages/proactive/src/cron-task.ts:184 |