Skip to Content
SDKvibexMission

mission

Module: vibex/mission

Mission - User’s substantial intent within a Space

A Mission represents a high-level goal that requires multiple tasks to complete. Example: “Write a research paper on AI” is a Mission containing tasks like “Research sources”, “Create outline”, “Write introduction”, etc.

Hierarchy: Space (persistent container) └── Mission (user’s intent, has lifecycle) └── Plan (strategy, evolves) └── Task[] (individual work items)

Classes

Mission

View source

Properties:

NameTypeDescription
idstring
titlestring
descriptionstring
statusMissionStatus
priority"low" | "medium" | "high"
tagsstring[]
metadataRecord<string, unknown>
planPlan
createdAtDate
updatedAtDate
completedAtDate

Methods:

setPlan

View source

Set the plan for this mission

function setPlan(plan: Plan): void

Parameters:

NameTypeDescription
planPlan

getTasks

View source

Get all tasks from the plan

function getTasks(): Task[]

getTasksByStatus

View source

Get tasks by status

function getTasksByStatus(status: TaskStatus): Task[]

Parameters:

NameTypeDescription
statusTaskStatus

getNextTask

View source

Get the next actionable task

function getNextTask(): Task | undefined

getCurrentTask

View source

Get current running task

function getCurrentTask(): Task | undefined

getProgress

View source

Calculate mission progress (0-100)

function getProgress(): number

pause

View source

Pause the mission

function pause(): void

resume

View source

Resume a paused mission

function resume(): void

complete

View source

Complete the mission

function complete(): void

abandon

View source

Abandon the mission

function abandon(): void

isFinished

View source

Check if mission is finished (completed or abandoned)

function isFinished(): boolean

toJSON

View source

Serialize to JSON

function toJSON(): Record<string, unknown>

fromJSON

View source

Deserialize from JSON

function fromJSON(data: Record<string, unknown>): Mission

Parameters:

NameTypeDescription
dataRecord<string, unknown>


Interfaces

MissionConfig

View source

Properties:

NameTypeDescription
idstring
titlestring
descriptionstring(optional)
priority"low" | "medium" | "high"(optional)
tagsstring[](optional)
metadataRecord<string, unknown>(optional)

Types

MissionStatus

View source
type MissionStatus = | "active" // Mission is being worked on | "paused" // User paused the mission | "completed" // All tasks done, goal achieved | "abandoned"