Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8978cc2
feat(assistant): add scheduled read-only discovery to Rust Bot
sunrioa Nov 9, 2026
96d8744
fix(assistant): enforce discovery cancellation and source boundaries
sunrioa Nov 9, 2026
80e3a2d
fix(discovery): adapt recovery to current rust-preview
sunrioa Nov 10, 2026
7106f6b
chore: sync discovery with rust-preview
sunrioa Nov 10, 2026
a3d0adc
test(desktop): follow durable steering semantics
sunrioa Nov 10, 2026
6e09582
fix(discovery): integrate automatic execution recovery
sunrioa Nov 10, 2026
809d563
test(process): observe Windows fixture before timing drain
sunrioa Nov 10, 2026
7232fc4
fix(agent): wake queued goals after releasing admission gate
sunrioa Nov 10, 2026
5029351
refactor(discovery): limit A1 changes to scheduled investigations
sunrioa Nov 10, 2026
05b016a
chore(discovery): sync A1 with rust-preview
sunrioa Nov 11, 2026
ad42b59
chore(discovery): sync A1 with rust-preview
sunrioa Nov 11, 2026
0d25166
fix(discovery): preserve queued reports when stopping a Bot run
sunrioa Nov 11, 2026
fce07a9
chore(discovery): sync scheduler branch with rust-preview
sunrioa Nov 12, 2026
a0c8b6c
refactor(discovery): reuse active fire validation
sunrioa Nov 12, 2026
bba89f1
test(discovery): restrict scheduler fixture to exercised methods
sunrioa Nov 12, 2026
62fac4f
refactor(discovery): keep only the Run in settlement receipts
sunrioa Nov 12, 2026
af835ba
merge: sync scheduled investigations with rust-preview
sunrioa Nov 12, 2026
541d8c8
fix(discovery): keep read tools in the upstream declaration catalog
sunrioa Nov 12, 2026
df76de5
fix(discovery): keep scheduled workers independent of subagent presets
sunrioa Nov 12, 2026
ea4966b
merge: sync scheduled discovery with rust-preview
sunrioa Nov 14, 2026
0e282f7
fix(discovery): retain the approval-required result for unapproved plans
sunrioa Nov 14, 2026
3df9c14
chore(sdk): regenerate the synchronized discovery loop contracts
sunrioa Nov 14, 2026
27f89b9
fix(discovery): keep discovery plans outside the automation editor
sunrioa Nov 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 166 additions & 4 deletions packages/plugin-sdk/src/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31575,6 +31575,25 @@ export const contracts: {
additionalProperties: false,
required: ['kind', 'taskId', 'revision', 'input'],
},
{
type: 'object',
properties: {
kind: {
type: 'string',
const: 'approve',
},
taskId: {
type: 'string',
},
revision: {
type: 'integer',
format: 'uint64',
minimum: 0,
},
},
additionalProperties: false,
required: ['kind', 'taskId', 'revision'],
},
{
type: 'object',
properties: {
Expand Down Expand Up @@ -31898,6 +31917,35 @@ export const contracts: {
additionalProperties: false,
required: ['kind', 'target', 'model'],
},
{
description:
'Read-only investigation in a fresh worker. The target is the current Bot.',
type: 'object',
properties: {
kind: {
type: 'string',
const: 'discovery',
},
target: {
$ref: '#/$defs/AgentScheduledTarget',
},
model: {
$ref: '#/$defs/ModelSelection',
},
thinkingLevel: {
anyOf: [
{
$ref: '#/$defs/ThinkingLevel',
},
{
type: 'null',
},
],
},
},
additionalProperties: false,
required: ['kind', 'target', 'model'],
},
],
},
AutomationDelivery: {
Expand Down Expand Up @@ -32166,6 +32214,28 @@ export const contracts: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
title: 'AgentScheduleRead',
oneOf: [
{
type: 'object',
properties: {
kind: {
type: 'string',
const: 'discovery',
},
sessionId: {
type: 'string',
},
cursor: {
type: ['string', 'null'],
},
expectedRevision: {
type: ['integer', 'null'],
format: 'uint64',
minimum: 0,
},
},
additionalProperties: false,
required: ['kind', 'sessionId'],
},
{
type: 'object',
properties: {
Expand Down Expand Up @@ -32289,6 +32359,9 @@ export const contracts: {
script: {
type: 'boolean',
},
approved: {
type: 'boolean',
},
status: {
$ref: '#/$defs/Status',
},
Expand All @@ -32304,7 +32377,7 @@ export const contracts: {
},
},
additionalProperties: false,
required: ['id', 'revision', 'title', 'sessionId', 'script', 'status'],
required: ['id', 'revision', 'title', 'sessionId', 'script', 'approved', 'status'],
},
Status: {
type: 'string',
Expand All @@ -32327,12 +32400,15 @@ export const contracts: {
misfire: {
$ref: '#/$defs/Misfire',
},
approved: {
type: 'boolean',
},
pendingFire: {
type: ['string', 'null'],
},
},
additionalProperties: false,
required: ['revision', 'task', 'timezone', 'misfire'],
required: ['revision', 'task', 'timezone', 'misfire', 'approved'],
},
Task: {
type: 'object',
Expand Down Expand Up @@ -32611,6 +32687,35 @@ export const contracts: {
additionalProperties: false,
required: ['kind', 'target', 'model'],
},
{
description:
'Read-only investigation in a fresh worker. The target is the current Bot.',
type: 'object',
properties: {
kind: {
type: 'string',
const: 'discovery',
},
target: {
$ref: '#/$defs/AgentScheduledTarget',
},
model: {
$ref: '#/$defs/ModelSelection',
},
thinkingLevel: {
anyOf: [
{
$ref: '#/$defs/ThinkingLevel',
},
{
type: 'null',
},
],
},
},
additionalProperties: false,
required: ['kind', 'target', 'model'],
},
],
},
AutomationDelivery: {
Expand Down Expand Up @@ -40290,6 +40395,28 @@ export const contracts: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
title: 'AgentScheduleRead',
oneOf: [
{
type: 'object',
properties: {
kind: {
type: 'string',
const: 'discovery',
},
sessionId: {
type: 'string',
},
cursor: {
type: ['string', 'null'],
},
expectedRevision: {
type: ['integer', 'null'],
format: 'uint64',
minimum: 0,
},
},
additionalProperties: false,
required: ['kind', 'sessionId'],
},
{
type: 'object',
properties: {
Expand Down Expand Up @@ -40413,6 +40540,9 @@ export const contracts: {
script: {
type: 'boolean',
},
approved: {
type: 'boolean',
},
status: {
$ref: '#/$defs/Status',
},
Expand All @@ -40428,7 +40558,7 @@ export const contracts: {
},
},
additionalProperties: false,
required: ['id', 'revision', 'title', 'sessionId', 'script', 'status'],
required: ['id', 'revision', 'title', 'sessionId', 'script', 'approved', 'status'],
},
Status: {
type: 'string',
Expand All @@ -40451,12 +40581,15 @@ export const contracts: {
misfire: {
$ref: '#/$defs/Misfire',
},
approved: {
type: 'boolean',
},
pendingFire: {
type: ['string', 'null'],
},
},
additionalProperties: false,
required: ['revision', 'task', 'timezone', 'misfire'],
required: ['revision', 'task', 'timezone', 'misfire', 'approved'],
},
Task: {
type: 'object',
Expand Down Expand Up @@ -40735,6 +40868,35 @@ export const contracts: {
additionalProperties: false,
required: ['kind', 'target', 'model'],
},
{
description:
'Read-only investigation in a fresh worker. The target is the current Bot.',
type: 'object',
properties: {
kind: {
type: 'string',
const: 'discovery',
},
target: {
$ref: '#/$defs/AgentScheduledTarget',
},
model: {
$ref: '#/$defs/ModelSelection',
},
thinkingLevel: {
anyOf: [
{
$ref: '#/$defs/ThinkingLevel',
},
{
type: 'null',
},
],
},
},
additionalProperties: false,
required: ['kind', 'target', 'model'],
},
],
},
AutomationDelivery: {
Expand Down
19 changes: 19 additions & 0 deletions packages/plugin-sdk/src/generated/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2430,6 +2430,12 @@ export type AgentRecapFailure =
| 'incomplete_output'
| 'model_unavailable';
export type AgentScheduleRead =
| {
kind: 'discovery';
sessionId: string;
cursor?: string | null;
expectedRevision?: number | null;
}
| {
kind: 'list';
cursor?: string | null;
Expand Down Expand Up @@ -2504,6 +2510,12 @@ export type AgentScheduledEffect =
target: AgentScheduledTarget;
model: ModelSelection;
thinkingLevel?: ThinkingLevel | null;
}
| {
kind: 'discovery';
target: AgentScheduledTarget;
model: ModelSelection;
thinkingLevel?: ThinkingLevel | null;
};
export type AutomationDelivery = 'steering' | 'followup';
export type Creator =
Expand All @@ -2530,6 +2542,11 @@ export type AgentScheduleChange =
revision: number;
input: AgentScheduledInput;
}
| {
kind: 'approve';
taskId: string;
revision: number;
}
| {
kind: 'pause';
taskId: string;
Expand Down Expand Up @@ -7119,6 +7136,7 @@ export interface AgentScheduledSummary {
title: string;
sessionId: string;
script: boolean;
approved: boolean;
status: Status;
nextFireAt?: number | null;
pendingFire?: string | null;
Expand All @@ -7129,6 +7147,7 @@ export interface AgentScheduledDetail {
task: Task;
timezone: string;
misfire: Misfire;
approved: boolean;
pendingFire?: string | null;
}
export interface Task {
Expand Down
20 changes: 19 additions & 1 deletion plugins/agent/api/src/contract/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,20 @@ pub enum ScheduledEffect {
model: ModelSelection,
thinking_level: Option<maka_agent_facts::execution::ThinkingLevel>,
},
/// Read-only investigation in a fresh worker. The target is the current Bot.
Discovery {
target: ScheduledTarget,
model: ModelSelection,
thinking_level: Option<maka_agent_facts::execution::ThinkingLevel>,
},
}
impl ScheduledEffect {
pub fn target(&self) -> &ScheduledTarget {
match self {
Self::Session { target, .. }
| Self::ExecutorSession { target, .. }
| Self::AgentRun { target, .. } => target,
| Self::AgentRun { target, .. }
| Self::Discovery { target, .. } => target,
}
}
}
Expand Down Expand Up @@ -113,6 +120,11 @@ pub struct ScheduledInput {
)]
#[schemars(rename = "AgentScheduleRead")]
pub enum ScheduleRead {
Discovery {
session_id: String,
cursor: Option<String>,
expected_revision: Option<u64>,
},
List {
cursor: Option<String>,
expected_revision: Option<u64>,
Expand All @@ -130,6 +142,7 @@ pub struct ScheduledSummary {
pub title: String,
pub session_id: String,
pub script: bool,
pub approved: bool,
pub status: maka_scheduler::task::Status,
pub next_fire_at: Option<i64>,
pub pending_fire: Option<String>,
Expand All @@ -143,6 +156,7 @@ pub struct ScheduledDetail {
pub task: maka_scheduler::task::Task<ScheduledEffect>,
pub timezone: String,
pub misfire: TaskMisfire,
pub approved: bool,
pub pending_fire: Option<String>,
}
#[derive(Serialize, JsonSchema)]
Expand Down Expand Up @@ -183,6 +197,10 @@ pub enum ScheduleChange {
revision: u64,
input: ScheduledInput,
},
Approve {
task_id: String,
revision: u64,
},
Pause {
task_id: String,
revision: u64,
Expand Down
Loading
Loading