Skip to content
nikcli
Docs
Documentation

Mobile · Automation

Loops, missions and routines as the mobile app drives them, including the tokenised routine trigger.

Playground

Send these requests to your own running server. Values stay in this browser.

Not connected
How this works

Start a server with nikcli serve --hostname 127.0.0.1 --port 4096. Requests go straight from this page to that address — the browser allows it because loopback counts as a secure origin, and the server allows it because nikcli-ai.dev is in its CORS allowlist.

To try things without touching your real sessions or config, start the server with NIKCLI_TEST_HOME pointed at a throwaway directory — see the guided tour.

Operations

36 endpoints, generated from the server's own OpenAPI document. Every path also accepts the directory and workspace query parameters that select which instance handles the request.

get /mobile/loops mobile.loop.list
post /mobile/loops mobile.loop.create
get /mobile/loops/templates mobile.loop.templates
post /mobile/loops/generate mobile.loop.generate
get /mobile/loops/runs/recent mobile.loop.runs.recent
get /mobile/loops/{id} mobile.loop.get
patch /mobile/loops/{id} mobile.loop.update
delete /mobile/loops/{id} mobile.loop.delete
get /mobile/loops/{id}/runs mobile.loop.runs
post /mobile/loops/{id}/run mobile.loop.run
post /mobile/loops/{id}/abort mobile.loop.abort
post /mobile/loops/{id}/toggle mobile.loop.toggle
post /mobile/loops/{id}/pause mobile.loop.pause
post /mobile/loops/{id}/resume mobile.loop.resume
get /mobile/routines mobile.routine.list
post /mobile/routines mobile.routine.create
get /mobile/routines/{id} mobile.routine.get
patch /mobile/routines/{id} mobile.routine.update
delete /mobile/routines/{id} mobile.routine.delete
post /mobile/routines/{id}/run mobile.routine.run
post /mobile/routines/{id}/pause mobile.routine.pause
post /mobile/routines/{id}/resume mobile.routine.resume
post /mobile/routines/trigger/{token} mobile.routine.trigger
get /mobile/missions mobile.mission.list
post /mobile/missions mobile.mission.create
get /mobile/missions/templates mobile.mission.templates
post /mobile/missions/generate mobile.mission.generate
get /mobile/missions/execs/recent mobile.mission.execs.recent
get /mobile/missions/{id} mobile.mission.get
patch /mobile/missions/{id} mobile.mission.update
delete /mobile/missions/{id} mobile.mission.delete
get /mobile/missions/{id}/execs mobile.mission.execs
post /mobile/missions/{id}/start mobile.mission.start
post /mobile/missions/{id}/pause mobile.mission.pause
post /mobile/missions/{id}/cancel mobile.mission.cancel
post /mobile/missions/{id}/feature/{featureID} mobile.mission.feature.mutate

Loops

get /mobile/loops # mobile.loop.list
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Responses
200 Success application/json
{
  loops: ({
    id: string
    name: string
    stages: LoopStage[]
    trigger: LoopTrigger
    maxRuns?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    timeoutMs?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    createPR?: boolean
    sandbox?: boolean
    worktree?: LoopWorktree
    paused?: boolean
    enabled: boolean
    createdAt: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  })[]
  runtimes: ({
    loopID: string
    status: 
      | "idle"
      | "running"
      | "paused"
      | "error"
      | "cancelling"
    runs: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    lastRunAt?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    lastError?: string | null
    sessionID?: string | null
  })[]
}
Example response from schema
{
  "loops": [
    {
      "id": "",
      "name": "",
      "stages": [],
      "trigger": {
        "kind": null
      },
      "maxRuns": 0,
      "timeoutMs": 0,
      "createPR": false,
      "sandbox": false,
      "worktree": {
        "name": null,
        "branch": null,
        "directory": null
      },
      "paused": false,
      "enabled": false,
      "createdAt": 0
    }
  ],
  "runtimes": [
    {
      "loopID": "",
      "status": "idle",
      "runs": 0,
      "lastRunAt": 0,
      "lastError": "",
      "sessionID": ""
    }
  ]
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.list
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.list({
  ...
})
Try it
post /mobile/loops # mobile.loop.create
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  name: string
  stages: ({
    name: string
    agent: string
    model?: string | null
    objective: string
    tokenBudget?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
  })[]
  trigger: 
    | {
    kind: "manual"
  }
    | {
    kind: "interval"
    everyMs: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  maxRuns?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  timeoutMs?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  createPR?: boolean | null
  sandbox?: boolean | null
  worktree?: 
    | {
    name: string
    branch?: string | null
    directory: string
  }
    | null
  paused?: boolean | null
  enabled: boolean
}
Responses
200 LoopDefinition application/json
{
  id: string
  name: string
  stages: LoopStage[]
  trigger: LoopTrigger
  maxRuns?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  timeoutMs?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  createPR?: boolean
  sandbox?: boolean
  worktree?: LoopWorktree
  paused?: boolean
  enabled: boolean
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
400 MobileBadRequest application/json
{
  name: "BadRequest"
  error: string
}
Example response from schema
{
  "id": "",
  "name": "",
  "stages": [
    {
      "name": "",
      "agent": "",
      "model": "",
      "objective": "",
      "tokenBudget": 0
    }
  ],
  "trigger": {
    "kind": "manual"
  },
  "maxRuns": 0,
  "timeoutMs": 0,
  "createPR": false,
  "sandbox": false,
  "worktree": {
    "name": "",
    "branch": "",
    "directory": ""
  },
  "paused": false,
  "enabled": false,
  "createdAt": 0
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.create
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.create({
  ...
})
Try it

Templates

get /mobile/loops/templates # mobile.loop.templates
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Responses
200 Success application/json
{
  templates: ({
    id: string
    title: string
    description: string
    draft: {
      name?: string | null
      stages: ({
        name?: string | null
        agent?: string | null
        model?: string | null
        objective: string
        tokenBudget?: 
          | 
          | number
          | "Infinity" | "-Infinity" | "NaN"
          | null
      })[]
      intervalMs?: 
        | 
        | number
        | "Infinity" | "-Infinity" | "NaN"
        | null
      maxRuns?: 
        | 
        | number
        | "Infinity" | "-Infinity" | "NaN"
        | null
    }
  })[]
}
Example response from schema
{
  "templates": [
    {
      "id": "",
      "title": "",
      "description": "",
      "draft": {
        "name": null,
        "stages": null,
        "intervalMs": null,
        "maxRuns": null
      }
    }
  ]
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.templates
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.templates({
  ...
})
Try it
get /mobile/missions/templates # mobile.mission.templates
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Responses
200 Success application/json
{
  templates: ({
    id: string
    title: string
    description: string
    brief: string
  })[]
}
Example response from schema
{
  "templates": [
    {
      "id": "",
      "title": "",
      "description": "",
      "brief": ""
    }
  ]
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.templates
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.templates({
  ...
})
Try it

Generate

post /mobile/loops/generate # mobile.loop.generate
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  description: string
  model?: string | null
  agent?: string | null
  sessionID?: string | null
}
Responses
200 LoopDefinition application/json
{
  id: string
  name: string
  stages: LoopStage[]
  trigger: LoopTrigger
  maxRuns?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  timeoutMs?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  createPR?: boolean
  sandbox?: boolean
  worktree?: LoopWorktree
  paused?: boolean
  enabled: boolean
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
Example response from schema
{
  "id": "",
  "name": "",
  "stages": [
    {
      "name": "",
      "agent": "",
      "model": "",
      "objective": "",
      "tokenBudget": 0
    }
  ],
  "trigger": {
    "kind": "manual"
  },
  "maxRuns": 0,
  "timeoutMs": 0,
  "createPR": false,
  "sandbox": false,
  "worktree": {
    "name": "",
    "branch": "",
    "directory": ""
  },
  "paused": false,
  "enabled": false,
  "createdAt": 0
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.generate
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.generate({
  ...
})
Try it
post /mobile/missions/generate # mobile.mission.generate
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  description: string
  model?: string | null
  agent?: string | null
  sessionID?: string | null
}
Responses
200 MobileMissionDefinition application/json
{
  id: string
  name: string
  brief: string
  milestones: ({
    id: string
    name: string
    features: ({
      id: string
      name: string
      objective: string
      agent: string
      model?: string | null
      tokenBudget?: 
        | 
        | number
        | "Infinity" | "-Infinity" | "NaN"
        | null
      dependsOn?: string[] | null
      status?: 
        | 
        | "pending"
        | "running"
        | "done"
        | "blocked"
        | "skipped"
        | "error"
        | null
      error?: string | null
    })[]
    validation?: 
      | "scrutiny" | "user-test" | "none"
      | null
    status?: 
      | 
      | "pending"
      | "running"
      | "validating"
      | "done"
      | "blocked"
      | null
  })[]
  models?: 
    | {
    worker?: string | null
    validation?: string | null
    orchestrator?: string | null
  }
    | null
  timeoutMs?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  sandbox?: boolean | null
  worktree?: 
    | {
    name: string
    branch?: string | null
    directory: string
  }
    | null
  status?: 
    | 
    | "planning"
    | "ready"
    | "running"
    | "paused"
    | "frozen"
    | "complete"
    | "error"
    | null
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
400 MobileBadRequest application/json
{
  name: "BadRequest"
  error: string
}
Example response from schema
{
  "id": "",
  "name": "",
  "brief": "",
  "milestones": [
    {
      "id": "",
      "name": "",
      "features": [],
      "validation": "scrutiny",
      "status": "pending"
    }
  ],
  "models": {
    "worker": "",
    "validation": "",
    "orchestrator": ""
  },
  "timeoutMs": 0,
  "sandbox": false,
  "worktree": {
    "name": "",
    "branch": "",
    "directory": ""
  },
  "status": "planning",
  "createdAt": 0
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.generate
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.generate({
  ...
})
Try it

Runs

get /mobile/loops/runs/recent # mobile.loop.runs.recent
Parameters
Name In Type Required
limit query string | null optional
directory query string optional
workspace query string optional
Responses
200 Success application/json
{
  runs: ({
    id: string
    loopID: string
    startedAt: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    endedAt?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    status: 
      | "running"
      | "complete"
      | "error"
      | "timeout"
      | "cancelled"
      | "orphaned"
    heartbeatAt?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    sessionID?: string | null
    error?: string | null
    ok: boolean
    pullRequest?: 
      | {
      number: 
        | number
        | "Infinity" | "-Infinity" | "NaN"
      url: string
      branch: string
      base: string
      title?: string | null
      action: "created" | "updated"
    }
      | null
  })[]
}
Example response from schema
{
  "runs": [
    {
      "id": "",
      "loopID": "",
      "startedAt": 0,
      "endedAt": 0,
      "status": "running",
      "heartbeatAt": 0,
      "sessionID": "",
      "error": "",
      "ok": false,
      "pullRequest": {
        "number": null,
        "url": null,
        "branch": null,
        "base": null,
        "title": null,
        "action": null
      }
    }
  ]
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.runs.recent
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.runs.recent({
  ...
})
Try it

{Id}

get /mobile/loops/{id} # mobile.loop.get
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 Success application/json
{
  loop: {
    id: string
    name: string
    stages: LoopStage[]
    trigger: LoopTrigger
    maxRuns?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    timeoutMs?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    createPR?: boolean
    sandbox?: boolean
    worktree?: LoopWorktree
    paused?: boolean
    enabled: boolean
    createdAt: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  runtime: {
    loopID: string
    status: 
      | "idle"
      | "running"
      | "paused"
      | "error"
      | "cancelling"
    runs: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    lastRunAt?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    lastError?: string | null
    sessionID?: string | null
  }
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "loop": {
    "id": "",
    "name": "",
    "stages": [
      {
        "name": null,
        "agent": null,
        "model": null,
        "objective": null,
        "tokenBudget": null
      }
    ],
    "trigger": {
      "kind": "manual"
    },
    "maxRuns": 0,
    "timeoutMs": 0,
    "createPR": false,
    "sandbox": false,
    "worktree": {
      "name": "",
      "branch": "",
      "directory": ""
    },
    "paused": false,
    "enabled": false,
    "createdAt": 0
  },
  "runtime": {
    "loopID": "",
    "status": "idle",
    "runs": 0,
    "lastRunAt": 0,
    "lastError": "",
    "sessionID": ""
  }
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.get
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.get({
  ...
})
Try it
patch /mobile/loops/{id} # mobile.loop.update
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  name: string
  stages: ({
    name: string
    agent: string
    model?: string | null
    objective: string
    tokenBudget?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
  })[]
  trigger: 
    | {
    kind: "manual"
  }
    | {
    kind: "interval"
    everyMs: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  maxRuns?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  timeoutMs?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  createPR?: boolean | null
  sandbox?: boolean | null
  worktree?: 
    | {
    name: string
    branch?: string | null
    directory: string
  }
    | null
  paused?: boolean | null
  enabled: boolean
}
Responses
200 LoopDefinition application/json
{
  id: string
  name: string
  stages: LoopStage[]
  trigger: LoopTrigger
  maxRuns?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  timeoutMs?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  createPR?: boolean
  sandbox?: boolean
  worktree?: LoopWorktree
  paused?: boolean
  enabled: boolean
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
400 MobileBadRequest application/json
{
  name: "BadRequest"
  error: string
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "id": "",
  "name": "",
  "stages": [
    {
      "name": "",
      "agent": "",
      "model": "",
      "objective": "",
      "tokenBudget": 0
    }
  ],
  "trigger": {
    "kind": "manual"
  },
  "maxRuns": 0,
  "timeoutMs": 0,
  "createPR": false,
  "sandbox": false,
  "worktree": {
    "name": "",
    "branch": "",
    "directory": ""
  },
  "paused": false,
  "enabled": false,
  "createdAt": 0
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.update
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.update({
  ...
})
Try it
delete /mobile/loops/{id} # mobile.loop.delete
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileSuccess application/json
{
  success: true
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.delete
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.delete({
  ...
})
Try it

This changes or removes server state, against whatever base URL is set above.

get /mobile/loops/{id}/runs # mobile.loop.runs
Parameters
Name In Type Required
id path string required
limit query string | null optional
directory query string optional
workspace query string optional
Responses
200 Success application/json
{
  runs: ({
    id: string
    loopID: string
    startedAt: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    endedAt?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    status: 
      | "running"
      | "complete"
      | "error"
      | "timeout"
      | "cancelled"
      | "orphaned"
    heartbeatAt?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    sessionID?: string | null
    error?: string | null
    ok: boolean
    pullRequest?: 
      | {
      number: 
        | number
        | "Infinity" | "-Infinity" | "NaN"
      url: string
      branch: string
      base: string
      title?: string | null
      action: "created" | "updated"
    }
      | null
  })[]
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "runs": [
    {
      "id": "",
      "loopID": "",
      "startedAt": 0,
      "endedAt": 0,
      "status": "running",
      "heartbeatAt": 0,
      "sessionID": "",
      "error": "",
      "ok": false,
      "pullRequest": {
        "number": null,
        "url": null,
        "branch": null,
        "base": null,
        "title": null,
        "action": null
      }
    }
  ]
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.runs
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.runs({
  ...
})
Try it
post /mobile/loops/{id}/run # mobile.loop.run
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileSuccess application/json
{
  success: true
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.run
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.run({
  ...
})
Try it
post /mobile/loops/{id}/abort # mobile.loop.abort
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileSuccess application/json
{
  success: true
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.abort
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.abort({
  ...
})
Try it
post /mobile/loops/{id}/toggle # mobile.loop.toggle
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  enabled: boolean
}
Responses
200 LoopDefinition application/json
{
  id: string
  name: string
  stages: LoopStage[]
  trigger: LoopTrigger
  maxRuns?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  timeoutMs?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  createPR?: boolean
  sandbox?: boolean
  worktree?: LoopWorktree
  paused?: boolean
  enabled: boolean
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "id": "",
  "name": "",
  "stages": [
    {
      "name": "",
      "agent": "",
      "model": "",
      "objective": "",
      "tokenBudget": 0
    }
  ],
  "trigger": {
    "kind": "manual"
  },
  "maxRuns": 0,
  "timeoutMs": 0,
  "createPR": false,
  "sandbox": false,
  "worktree": {
    "name": "",
    "branch": "",
    "directory": ""
  },
  "paused": false,
  "enabled": false,
  "createdAt": 0
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.toggle
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.toggle({
  ...
})
Try it
post /mobile/loops/{id}/pause # mobile.loop.pause
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileSuccess application/json
{
  success: true
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.pause
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.pause({
  ...
})
Try it
post /mobile/loops/{id}/resume # mobile.loop.resume
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileSuccess application/json
{
  success: true
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.loop.resume
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.loop.resume({
  ...
})
Try it
get /mobile/routines/{id} # mobile.routine.get
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileRoutine application/json
{
  id: string
  name: string
  prompt: string
  triggers: RoutineTrigger[]
  model?: 
    | {
    providerID: string
    modelID: string
  }
    | null
  paused: boolean
  projectID: string
  directory: string
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  updatedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  lastRunAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  lastSessionID?: string | null
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "id": "",
  "name": "",
  "prompt": "",
  "triggers": [
    {
      "type": "schedule",
      "cron": "",
      "enabled": false
    }
  ],
  "model": {
    "providerID": "",
    "modelID": ""
  },
  "paused": false,
  "projectID": "",
  "directory": "",
  "createdAt": 0,
  "updatedAt": 0,
  "lastRunAt": 0,
  "lastSessionID": ""
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.routine.get
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.routine.get({
  ...
})
Try it
patch /mobile/routines/{id} # mobile.routine.update
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  name?: string | null
  prompt?: string | null
  triggers?: RoutineTrigger_2[] | null
  model?: 
    | {
    providerID: string
    modelID: string
  }
    | null
  paused?: boolean | null
}
Responses
200 MobileRoutine application/json
{
  id: string
  name: string
  prompt: string
  triggers: RoutineTrigger[]
  model?: 
    | {
    providerID: string
    modelID: string
  }
    | null
  paused: boolean
  projectID: string
  directory: string
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  updatedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  lastRunAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  lastSessionID?: string | null
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "id": "",
  "name": "",
  "prompt": "",
  "triggers": [
    {
      "type": "schedule",
      "cron": "",
      "enabled": false
    }
  ],
  "model": {
    "providerID": "",
    "modelID": ""
  },
  "paused": false,
  "projectID": "",
  "directory": "",
  "createdAt": 0,
  "updatedAt": 0,
  "lastRunAt": 0,
  "lastSessionID": ""
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.routine.update
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.routine.update({
  ...
})
Try it
delete /mobile/routines/{id} # mobile.routine.delete
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileSuccess application/json
{
  success: true
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.routine.delete
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.routine.delete({
  ...
})
Try it

This changes or removes server state, against whatever base URL is set above.

post /mobile/routines/{id}/run # mobile.routine.run
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  text?: string | null
}
Responses
200 Session application/json
{
  id: string
  slug: string
  projectID: string
  directory: string
  parentID?: string
  workspaceID?: string
  summary?: {
    additions: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    deletions: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    files: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    diffs?: FileDiff_2[]
  }
  share?: {
    url: string
  }
  github?: SessionGithub_3
  worktree?: SessionWorktree_6
  mobile?: SessionMobile_2
  title: string
  activeCommand?: string
  version: string
  time: {
    created: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    updated: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    compacting?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    archived?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  permission?: PermissionRuleset_3
  skills?: string[]
  disabledInstructions?: string[]
  disabledTools?: {
    [key: string]: boolean
  }
  revert?: {
    messageID: string
    partID?: string
    snapshot?: string
    diff?: string
  }
  lastModel?: {
    providerID: string
    modelID: string
  }
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "id": "",
  "slug": "",
  "projectID": "",
  "directory": "",
  "parentID": "",
  "workspaceID": "",
  "summary": {
    "additions": 0,
    "deletions": 0,
    "files": 0,
    "diffs": [
      {
        "file": null,
        "patch": null,
        "additions": null,
        "deletions": null,
        "status": null,
        "before": null,
        "after": null
      }
    ]
  },
  "share": {
    "url": ""
  },
  "github": {
    "owner": "",
    "repo": "",
    "fullName": "",
    "baseBranch": "",
    "headBranch": "",
    "repositoryDirectory": "",
    "cloneUrl": "",
    "htmlUrl": "",
    "private": false,
    "worktree": {
      "name": "",
      "branch": "",
      "directory": "",
      "repositoryDirectory": "",
      "cleanedAt": 0
    },
    "pullRequest": {
      "number": 0,
      "url": "",
      "title": ""
    },
    "lastCommitSha": "",
    "publishedAt": 0,
    "publishError": ""
  },
  "worktree": {
    "name": "",
    "branch": "",
    "directory": "",
    "repositoryDirectory": "",
    "cleanedAt": 0
  },
  "mobile": {
    "platforms": [
      "ios"
    ],
    "primaryPlatform": "",
    "method": "",
    "detectedAt": 0,
    "buildStatus": "unknown",
    "lastBuildAt": 0,
    "artifacts": [
      {
        "platform": null,
        "path": null,
        "size": null,
        "createdAt": null
      }
    ]
  },
  "title": "",
  "activeCommand": "",
  "version": "",
  "time": {
    "created": 0,
    "updated": 0,
    "compacting": 0,
    "archived": 0
  },
  "permission": [
    {
      "permission": "",
      "pattern": "",
      "action": "allow"
    }
  ],
  "skills": [
    ""
  ],
  "disabledInstructions": [
    ""
  ],
  "disabledTools": {},
  "revert": {
    "messageID": "",
    "partID": "",
    "snapshot": "",
    "diff": ""
  },
  "lastModel": {
    "providerID": "",
    "modelID": ""
  }
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.routine.run
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.routine.run({
  ...
})
Try it
post /mobile/routines/{id}/pause # mobile.routine.pause
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileRoutine application/json
{
  id: string
  name: string
  prompt: string
  triggers: RoutineTrigger[]
  model?: 
    | {
    providerID: string
    modelID: string
  }
    | null
  paused: boolean
  projectID: string
  directory: string
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  updatedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  lastRunAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  lastSessionID?: string | null
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "id": "",
  "name": "",
  "prompt": "",
  "triggers": [
    {
      "type": "schedule",
      "cron": "",
      "enabled": false
    }
  ],
  "model": {
    "providerID": "",
    "modelID": ""
  },
  "paused": false,
  "projectID": "",
  "directory": "",
  "createdAt": 0,
  "updatedAt": 0,
  "lastRunAt": 0,
  "lastSessionID": ""
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.routine.pause
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.routine.pause({
  ...
})
Try it
post /mobile/routines/{id}/resume # mobile.routine.resume
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileRoutine application/json
{
  id: string
  name: string
  prompt: string
  triggers: RoutineTrigger[]
  model?: 
    | {
    providerID: string
    modelID: string
  }
    | null
  paused: boolean
  projectID: string
  directory: string
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  updatedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  lastRunAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  lastSessionID?: string | null
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "id": "",
  "name": "",
  "prompt": "",
  "triggers": [
    {
      "type": "schedule",
      "cron": "",
      "enabled": false
    }
  ],
  "model": {
    "providerID": "",
    "modelID": ""
  },
  "paused": false,
  "projectID": "",
  "directory": "",
  "createdAt": 0,
  "updatedAt": 0,
  "lastRunAt": 0,
  "lastSessionID": ""
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.routine.resume
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.routine.resume({
  ...
})
Try it
get /mobile/missions/{id} # mobile.mission.get
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 Success application/json
{
  mission: {
    id: string
    name: string
    brief: string
    milestones: ({
      id: string
      name: string
      features: ({
        id: string
        name: string
        objective: string
        agent: string
        model?: string | null
        tokenBudget?: 
          | 
          | number
          | "Infinity" | "-Infinity" | "NaN"
          | null
        dependsOn?: string[] | null
        status?: 
          | 
          | "pending"
          | "running"
          | "done"
          | "blocked"
          | "skipped"
          | "error"
          | null
        error?: string | null
      })[]
      validation?: 
        | "scrutiny" | "user-test" | "none"
        | null
      status?: 
        | 
        | "pending"
        | "running"
        | "validating"
        | "done"
        | "blocked"
        | null
    })[]
    models?: 
      | {
      worker?: string | null
      validation?: string | null
      orchestrator?: string | null
    }
      | null
    timeoutMs?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    sandbox?: boolean | null
    worktree?: 
      | {
      name: string
      branch?: string | null
      directory: string
    }
      | null
    status?: 
      | 
      | "planning"
      | "ready"
      | "running"
      | "paused"
      | "frozen"
      | "complete"
      | "error"
      | null
    createdAt: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  runtime: {
    missionID: string
    status: 
      | "idle"
      | "running"
      | "paused"
      | "error"
      | "cancelling"
    sessionID?: string | null
    currentMilestoneID?: string | null
    currentFeatureID?: string | null
    doneFeatures: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    totalFeatures: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    lastError?: string | null
    lastRunAt?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
  }
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "mission": {
    "id": "",
    "name": "",
    "brief": "",
    "milestones": [
      {
        "id": null,
        "name": null,
        "features": null,
        "validation": null,
        "status": null
      }
    ],
    "models": {
      "worker": "",
      "validation": "",
      "orchestrator": ""
    },
    "timeoutMs": 0,
    "sandbox": false,
    "worktree": {
      "name": "",
      "branch": "",
      "directory": ""
    },
    "status": "planning",
    "createdAt": 0
  },
  "runtime": {
    "missionID": "",
    "status": "idle",
    "sessionID": "",
    "currentMilestoneID": "",
    "currentFeatureID": "",
    "doneFeatures": 0,
    "totalFeatures": 0,
    "lastError": "",
    "lastRunAt": 0
  }
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.get
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.get({
  ...
})
Try it
patch /mobile/missions/{id} # mobile.mission.update
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  name: string
  brief: string
  milestones: ({
    id: string
    name: string
    features: ({
      id: string
      name: string
      objective: string
      agent: string
      model?: string | null
      tokenBudget?: 
        | 
        | number
        | "Infinity" | "-Infinity" | "NaN"
        | null
      dependsOn?: string[] | null
      status?: 
        | 
        | "pending"
        | "running"
        | "done"
        | "blocked"
        | "skipped"
        | "error"
        | null
      error?: string | null
    })[]
    validation?: 
      | "scrutiny" | "user-test" | "none"
      | null
    status?: 
      | 
      | "pending"
      | "running"
      | "validating"
      | "done"
      | "blocked"
      | null
  })[]
  models?: 
    | {
    worker?: string | null
    validation?: string | null
    orchestrator?: string | null
  }
    | null
  timeoutMs?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  sandbox?: boolean | null
  worktree?: 
    | {
    name: string
    branch?: string | null
    directory: string
  }
    | null
  status?: 
    | 
    | "planning"
    | "ready"
    | "running"
    | "paused"
    | "frozen"
    | "complete"
    | "error"
    | null
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
Responses
200 MobileMissionDefinition application/json
{
  id: string
  name: string
  brief: string
  milestones: ({
    id: string
    name: string
    features: ({
      id: string
      name: string
      objective: string
      agent: string
      model?: string | null
      tokenBudget?: 
        | 
        | number
        | "Infinity" | "-Infinity" | "NaN"
        | null
      dependsOn?: string[] | null
      status?: 
        | 
        | "pending"
        | "running"
        | "done"
        | "blocked"
        | "skipped"
        | "error"
        | null
      error?: string | null
    })[]
    validation?: 
      | "scrutiny" | "user-test" | "none"
      | null
    status?: 
      | 
      | "pending"
      | "running"
      | "validating"
      | "done"
      | "blocked"
      | null
  })[]
  models?: 
    | {
    worker?: string | null
    validation?: string | null
    orchestrator?: string | null
  }
    | null
  timeoutMs?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  sandbox?: boolean | null
  worktree?: 
    | {
    name: string
    branch?: string | null
    directory: string
  }
    | null
  status?: 
    | 
    | "planning"
    | "ready"
    | "running"
    | "paused"
    | "frozen"
    | "complete"
    | "error"
    | null
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
400 MobileBadRequest application/json
{
  name: "BadRequest"
  error: string
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "id": "",
  "name": "",
  "brief": "",
  "milestones": [
    {
      "id": "",
      "name": "",
      "features": [],
      "validation": "scrutiny",
      "status": "pending"
    }
  ],
  "models": {
    "worker": "",
    "validation": "",
    "orchestrator": ""
  },
  "timeoutMs": 0,
  "sandbox": false,
  "worktree": {
    "name": "",
    "branch": "",
    "directory": ""
  },
  "status": "planning",
  "createdAt": 0
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.update
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.update({
  ...
})
Try it
delete /mobile/missions/{id} # mobile.mission.delete
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileSuccess application/json
{
  success: true
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.delete
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.delete({
  ...
})
Try it

This changes or removes server state, against whatever base URL is set above.

get /mobile/missions/{id}/execs # mobile.mission.execs
Parameters
Name In Type Required
id path string required
limit query string | null optional
directory query string optional
workspace query string optional
Responses
200 Success application/json
{
  execs: ({
    id: string
    missionID: string
    kind: "feature" | "validation"
    targetID: string
    targetName: string
    startedAt: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    endedAt?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    status: 
      | "running"
      | "complete"
      | "error"
      | "timeout"
      | "cancelled"
      | "orphaned"
    heartbeatAt?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    sessionID?: string | null
    error?: string | null
    ok: boolean
  })[]
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "execs": [
    {
      "id": "",
      "missionID": "",
      "kind": "feature",
      "targetID": "",
      "targetName": "",
      "startedAt": 0,
      "endedAt": 0,
      "status": "running",
      "heartbeatAt": 0,
      "sessionID": "",
      "error": "",
      "ok": false
    }
  ]
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.execs
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.execs({
  ...
})
Try it
post /mobile/missions/{id}/start # mobile.mission.start
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileSuccess application/json
{
  success: true
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.start
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.start({
  ...
})
Try it
post /mobile/missions/{id}/pause # mobile.mission.pause
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileSuccess application/json
{
  success: true
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.pause
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.pause({
  ...
})
Try it
post /mobile/missions/{id}/cancel # mobile.mission.cancel
Parameters
Name In Type Required
id path string required
directory query string optional
workspace query string optional
Responses
200 MobileSuccess application/json
{
  success: true
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.cancel
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.cancel({
  ...
})
Try it
post /mobile/missions/{id}/feature/{featureID} # mobile.mission.feature.mutate
Parameters
Name In Type Required
id path string required
featureID path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  status?: 
    | 
    | "pending"
    | "running"
    | "done"
    | "blocked"
    | "skipped"
    | "error"
    | null
  error?: string | null
  appendDependsOn?: string[] | null
}
Responses
200 MobileMissionDefinition application/json
{
  id: string
  name: string
  brief: string
  milestones: ({
    id: string
    name: string
    features: ({
      id: string
      name: string
      objective: string
      agent: string
      model?: string | null
      tokenBudget?: 
        | 
        | number
        | "Infinity" | "-Infinity" | "NaN"
        | null
      dependsOn?: string[] | null
      status?: 
        | 
        | "pending"
        | "running"
        | "done"
        | "blocked"
        | "skipped"
        | "error"
        | null
      error?: string | null
    })[]
    validation?: 
      | "scrutiny" | "user-test" | "none"
      | null
    status?: 
      | 
      | "pending"
      | "running"
      | "validating"
      | "done"
      | "blocked"
      | null
  })[]
  models?: 
    | {
    worker?: string | null
    validation?: string | null
    orchestrator?: string | null
  }
    | null
  timeoutMs?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  sandbox?: boolean | null
  worktree?: 
    | {
    name: string
    branch?: string | null
    directory: string
  }
    | null
  status?: 
    | 
    | "planning"
    | "ready"
    | "running"
    | "paused"
    | "frozen"
    | "complete"
    | "error"
    | null
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
400 MobileBadRequest application/json
{
  name: "BadRequest"
  error: string
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "id": "",
  "name": "",
  "brief": "",
  "milestones": [
    {
      "id": "",
      "name": "",
      "features": [],
      "validation": "scrutiny",
      "status": "pending"
    }
  ],
  "models": {
    "worker": "",
    "validation": "",
    "orchestrator": ""
  },
  "timeoutMs": 0,
  "sandbox": false,
  "worktree": {
    "name": "",
    "branch": "",
    "directory": ""
  },
  "status": "planning",
  "createdAt": 0
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.feature.mutate
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.feature.mutate({
  ...
})
Try it

Routines

get /mobile/routines # mobile.routine.list
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Responses
200 Success application/json
({
  id: string
  name: string
  prompt: string
  triggers: RoutineTrigger[]
  model?: 
    | {
    providerID: string
    modelID: string
  }
    | null
  paused: boolean
  projectID: string
  directory: string
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  updatedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  lastRunAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  lastSessionID?: string | null
})[]
Example response from schema
[
  {
    "id": "",
    "name": "",
    "prompt": "",
    "triggers": [
      {
        "type": null,
        "cron": null,
        "enabled": null
      }
    ],
    "model": {
      "providerID": "",
      "modelID": ""
    },
    "paused": false,
    "projectID": "",
    "directory": "",
    "createdAt": 0,
    "updatedAt": 0,
    "lastRunAt": 0,
    "lastSessionID": ""
  }
]

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.routine.list
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.routine.list({
  ...
})
Try it
post /mobile/routines # mobile.routine.create
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  name: string
  prompt: string
  triggers?: RoutineTrigger_1[] | null
  model?: 
    | {
    providerID: string
    modelID: string
  }
    | null
}
Responses
200 MobileRoutine application/json
{
  id: string
  name: string
  prompt: string
  triggers: RoutineTrigger[]
  model?: 
    | {
    providerID: string
    modelID: string
  }
    | null
  paused: boolean
  projectID: string
  directory: string
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  updatedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  lastRunAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  lastSessionID?: string | null
}
Example response from schema
{
  "id": "",
  "name": "",
  "prompt": "",
  "triggers": [
    {
      "type": "schedule",
      "cron": "",
      "enabled": false
    }
  ],
  "model": {
    "providerID": "",
    "modelID": ""
  },
  "paused": false,
  "projectID": "",
  "directory": "",
  "createdAt": 0,
  "updatedAt": 0,
  "lastRunAt": 0,
  "lastSessionID": ""
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.routine.create
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.routine.create({
  ...
})
Try it

Trigger

post /mobile/routines/trigger/{token} # mobile.routine.trigger
Parameters
Name In Type Required
token path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  text?: string | null
}
Responses
200 Session application/json
{
  id: string
  slug: string
  projectID: string
  directory: string
  parentID?: string
  workspaceID?: string
  summary?: {
    additions: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    deletions: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    files: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    diffs?: FileDiff_2[]
  }
  share?: {
    url: string
  }
  github?: SessionGithub_3
  worktree?: SessionWorktree_6
  mobile?: SessionMobile_2
  title: string
  activeCommand?: string
  version: string
  time: {
    created: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    updated: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    compacting?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    archived?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  permission?: PermissionRuleset_3
  skills?: string[]
  disabledInstructions?: string[]
  disabledTools?: {
    [key: string]: boolean
  }
  revert?: {
    messageID: string
    partID?: string
    snapshot?: string
    diff?: string
  }
  lastModel?: {
    providerID: string
    modelID: string
  }
}
404 MobileNotFound application/json
{
  name: "NotFoundError"
  error: string
}
Example response from schema
{
  "id": "",
  "slug": "",
  "projectID": "",
  "directory": "",
  "parentID": "",
  "workspaceID": "",
  "summary": {
    "additions": 0,
    "deletions": 0,
    "files": 0,
    "diffs": [
      {
        "file": null,
        "patch": null,
        "additions": null,
        "deletions": null,
        "status": null,
        "before": null,
        "after": null
      }
    ]
  },
  "share": {
    "url": ""
  },
  "github": {
    "owner": "",
    "repo": "",
    "fullName": "",
    "baseBranch": "",
    "headBranch": "",
    "repositoryDirectory": "",
    "cloneUrl": "",
    "htmlUrl": "",
    "private": false,
    "worktree": {
      "name": "",
      "branch": "",
      "directory": "",
      "repositoryDirectory": "",
      "cleanedAt": 0
    },
    "pullRequest": {
      "number": 0,
      "url": "",
      "title": ""
    },
    "lastCommitSha": "",
    "publishedAt": 0,
    "publishError": ""
  },
  "worktree": {
    "name": "",
    "branch": "",
    "directory": "",
    "repositoryDirectory": "",
    "cleanedAt": 0
  },
  "mobile": {
    "platforms": [
      "ios"
    ],
    "primaryPlatform": "",
    "method": "",
    "detectedAt": 0,
    "buildStatus": "unknown",
    "lastBuildAt": 0,
    "artifacts": [
      {
        "platform": null,
        "path": null,
        "size": null,
        "createdAt": null
      }
    ]
  },
  "title": "",
  "activeCommand": "",
  "version": "",
  "time": {
    "created": 0,
    "updated": 0,
    "compacting": 0,
    "archived": 0
  },
  "permission": [
    {
      "permission": "",
      "pattern": "",
      "action": "allow"
    }
  ],
  "skills": [
    ""
  ],
  "disabledInstructions": [
    ""
  ],
  "disabledTools": {},
  "revert": {
    "messageID": "",
    "partID": "",
    "snapshot": "",
    "diff": ""
  },
  "lastModel": {
    "providerID": "",
    "modelID": ""
  }
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.routine.trigger
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.routine.trigger({
  ...
})
Try it

Missions

get /mobile/missions # mobile.mission.list
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Responses
200 Success application/json
{
  missions: ({
    id: string
    name: string
    brief: string
    milestones: ({
      id: string
      name: string
      features: ({
        id: string
        name: string
        objective: string
        agent: string
        model?: string | null
        tokenBudget?: 
          | 
          | number
          | "Infinity" | "-Infinity" | "NaN"
          | null
        dependsOn?: string[] | null
        status?: 
          | 
          | "pending"
          | "running"
          | "done"
          | "blocked"
          | "skipped"
          | "error"
          | null
        error?: string | null
      })[]
      validation?: 
        | "scrutiny" | "user-test" | "none"
        | null
      status?: 
        | 
        | "pending"
        | "running"
        | "validating"
        | "done"
        | "blocked"
        | null
    })[]
    models?: 
      | {
      worker?: string | null
      validation?: string | null
      orchestrator?: string | null
    }
      | null
    timeoutMs?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    sandbox?: boolean | null
    worktree?: 
      | {
      name: string
      branch?: string | null
      directory: string
    }
      | null
    status?: 
      | 
      | "planning"
      | "ready"
      | "running"
      | "paused"
      | "frozen"
      | "complete"
      | "error"
      | null
    createdAt: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  })[]
  runtimes: ({
    missionID: string
    status: 
      | "idle"
      | "running"
      | "paused"
      | "error"
      | "cancelling"
    sessionID?: string | null
    currentMilestoneID?: string | null
    currentFeatureID?: string | null
    doneFeatures: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    totalFeatures: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    lastError?: string | null
    lastRunAt?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
  })[]
}
Example response from schema
{
  "missions": [
    {
      "id": "",
      "name": "",
      "brief": "",
      "milestones": [],
      "models": {
        "worker": null,
        "validation": null,
        "orchestrator": null
      },
      "timeoutMs": 0,
      "sandbox": false,
      "worktree": {
        "name": null,
        "branch": null,
        "directory": null
      },
      "status": "planning",
      "createdAt": 0
    }
  ],
  "runtimes": [
    {
      "missionID": "",
      "status": "idle",
      "sessionID": "",
      "currentMilestoneID": "",
      "currentFeatureID": "",
      "doneFeatures": 0,
      "totalFeatures": 0,
      "lastError": "",
      "lastRunAt": 0
    }
  ]
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.list
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.list({
  ...
})
Try it
post /mobile/missions # mobile.mission.create
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  name: string
  brief: string
  milestones: ({
    id: string
    name: string
    features: ({
      id: string
      name: string
      objective: string
      agent: string
      model?: string | null
      tokenBudget?: 
        | 
        | number
        | "Infinity" | "-Infinity" | "NaN"
        | null
      dependsOn?: string[] | null
      status?: 
        | 
        | "pending"
        | "running"
        | "done"
        | "blocked"
        | "skipped"
        | "error"
        | null
      error?: string | null
    })[]
    validation?: 
      | "scrutiny" | "user-test" | "none"
      | null
    status?: 
      | 
      | "pending"
      | "running"
      | "validating"
      | "done"
      | "blocked"
      | null
  })[]
  models?: 
    | {
    worker?: string | null
    validation?: string | null
    orchestrator?: string | null
  }
    | null
  timeoutMs?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  sandbox?: boolean | null
  worktree?: 
    | {
    name: string
    branch?: string | null
    directory: string
  }
    | null
}
Responses
200 MobileMissionDefinition application/json
{
  id: string
  name: string
  brief: string
  milestones: ({
    id: string
    name: string
    features: ({
      id: string
      name: string
      objective: string
      agent: string
      model?: string | null
      tokenBudget?: 
        | 
        | number
        | "Infinity" | "-Infinity" | "NaN"
        | null
      dependsOn?: string[] | null
      status?: 
        | 
        | "pending"
        | "running"
        | "done"
        | "blocked"
        | "skipped"
        | "error"
        | null
      error?: string | null
    })[]
    validation?: 
      | "scrutiny" | "user-test" | "none"
      | null
    status?: 
      | 
      | "pending"
      | "running"
      | "validating"
      | "done"
      | "blocked"
      | null
  })[]
  models?: 
    | {
    worker?: string | null
    validation?: string | null
    orchestrator?: string | null
  }
    | null
  timeoutMs?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  sandbox?: boolean | null
  worktree?: 
    | {
    name: string
    branch?: string | null
    directory: string
  }
    | null
  status?: 
    | 
    | "planning"
    | "ready"
    | "running"
    | "paused"
    | "frozen"
    | "complete"
    | "error"
    | null
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
400 MobileBadRequest application/json
{
  name: "BadRequest"
  error: string
}
Example response from schema
{
  "id": "",
  "name": "",
  "brief": "",
  "milestones": [
    {
      "id": "",
      "name": "",
      "features": [],
      "validation": "scrutiny",
      "status": "pending"
    }
  ],
  "models": {
    "worker": "",
    "validation": "",
    "orchestrator": ""
  },
  "timeoutMs": 0,
  "sandbox": false,
  "worktree": {
    "name": "",
    "branch": "",
    "directory": ""
  },
  "status": "planning",
  "createdAt": 0
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.create
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.create({
  ...
})
Try it

Execs

get /mobile/missions/execs/recent # mobile.mission.execs.recent
Parameters
Name In Type Required
limit query string | null optional
directory query string optional
workspace query string optional
Responses
200 Success application/json
{
  execs: ({
    id: string
    missionID: string
    kind: "feature" | "validation"
    targetID: string
    targetName: string
    startedAt: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    endedAt?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    status: 
      | "running"
      | "complete"
      | "error"
      | "timeout"
      | "cancelled"
      | "orphaned"
    heartbeatAt?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    sessionID?: string | null
    error?: string | null
    ok: boolean
  })[]
}
Example response from schema
{
  "execs": [
    {
      "id": "",
      "missionID": "",
      "kind": "feature",
      "targetID": "",
      "targetName": "",
      "startedAt": 0,
      "endedAt": 0,
      "status": "running",
      "heartbeatAt": 0,
      "sessionID": "",
      "error": "",
      "ok": false
    }
  ]
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
mobile.mission.execs.recent
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.mission.execs.recent({
  ...
})
Try it

Schemas

The 43 schemas reachable from these endpoints. Each is shown one level deep; nested types link to their own entry below. Names ending in _2, _3 and so on are the OpenAPI emitter disambiguating same-named schemas declared by different HttpApi groups — they are distinct shapes, not duplicates.

FileDiff_2
{
  file: string
  patch: string
  additions: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  deletions: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  status?: 
    | "added" | "deleted" | "modified"
    | null
  before: string
  after: string
}
LoopDefinition
{
  id: string
  name: string
  stages: LoopStage[]
  trigger: LoopTrigger
  maxRuns?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  timeoutMs?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  createPR?: boolean
  sandbox?: boolean
  worktree?: LoopWorktree
  paused?: boolean
  enabled: boolean
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
LoopStage
{
  name: string
  agent: string
  model?: string
  objective: string
  tokenBudget?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
LoopTrigger
  | {
  kind: "manual"
}
  | {
  kind: "interval"
  everyMs: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
LoopWorktree
{
  name: string
  branch?: string
  directory: string
}
MobileBadRequest
{
  name: "BadRequest"
  error: string
}
MobileLoopGenerateInput
{
  description: string
  model?: string | null
  agent?: string | null
  sessionID?: string | null
}
MobileLoopRun
{
  id: string
  loopID: string
  startedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  endedAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  status: 
    | "running"
    | "complete"
    | "error"
    | "timeout"
    | "cancelled"
    | "orphaned"
  heartbeatAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  sessionID?: string | null
  error?: string | null
  ok: boolean
  pullRequest?: 
    | {
    number: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    url: string
    branch: string
    base: string
    title?: string | null
    action: "created" | "updated"
  }
    | null
}
MobileLoopRuntime
{
  loopID: string
  status: 
    | "idle"
    | "running"
    | "paused"
    | "error"
    | "cancelling"
  runs: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  lastRunAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  lastError?: string | null
  sessionID?: string | null
}
MobileLoopTemplate
{
  id: string
  title: string
  description: string
  draft: {
    name?: string | null
    stages: ({
      name?: string | null
      agent?: string | null
      model?: string | null
      objective: string
      tokenBudget?: 
        | 
        | number
        | "Infinity" | "-Infinity" | "NaN"
        | null
    })[]
    intervalMs?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
    maxRuns?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
  }
}
MobileLoopWriteInput
{
  name: string
  stages: ({
    name: string
    agent: string
    model?: string | null
    objective: string
    tokenBudget?: 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
  })[]
  trigger: 
    | {
    kind: "manual"
  }
    | {
    kind: "interval"
    everyMs: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  maxRuns?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  timeoutMs?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  createPR?: boolean | null
  sandbox?: boolean | null
  worktree?: 
    | {
    name: string
    branch?: string | null
    directory: string
  }
    | null
  paused?: boolean | null
  enabled: boolean
}
MobileMissionDefinition
{
  id: string
  name: string
  brief: string
  milestones: ({
    id: string
    name: string
    features: ({
      id: string
      name: string
      objective: string
      agent: string
      model?: string | null
      tokenBudget?: 
        | 
        | number
        | "Infinity" | "-Infinity" | "NaN"
        | null
      dependsOn?: string[] | null
      status?: 
        | 
        | "pending"
        | "running"
        | "done"
        | "blocked"
        | "skipped"
        | "error"
        | null
      error?: string | null
    })[]
    validation?: 
      | "scrutiny" | "user-test" | "none"
      | null
    status?: 
      | 
      | "pending"
      | "running"
      | "validating"
      | "done"
      | "blocked"
      | null
  })[]
  models?: 
    | {
    worker?: string | null
    validation?: string | null
    orchestrator?: string | null
  }
    | null
  timeoutMs?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  sandbox?: boolean | null
  worktree?: 
    | {
    name: string
    branch?: string | null
    directory: string
  }
    | null
  status?: 
    | 
    | "planning"
    | "ready"
    | "running"
    | "paused"
    | "frozen"
    | "complete"
    | "error"
    | null
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
MobileMissionExec
{
  id: string
  missionID: string
  kind: "feature" | "validation"
  targetID: string
  targetName: string
  startedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  endedAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  status: 
    | "running"
    | "complete"
    | "error"
    | "timeout"
    | "cancelled"
    | "orphaned"
  heartbeatAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  sessionID?: string | null
  error?: string | null
  ok: boolean
}
MobileMissionFeatureMutateInput
{
  status?: 
    | 
    | "pending"
    | "running"
    | "done"
    | "blocked"
    | "skipped"
    | "error"
    | null
  error?: string | null
  appendDependsOn?: string[] | null
}
MobileMissionGenerateInput
{
  description: string
  model?: string | null
  agent?: string | null
  sessionID?: string | null
}
MobileMissionRuntime
{
  missionID: string
  status: 
    | "idle"
    | "running"
    | "paused"
    | "error"
    | "cancelling"
  sessionID?: string | null
  currentMilestoneID?: string | null
  currentFeatureID?: string | null
  doneFeatures: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  totalFeatures: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  lastError?: string | null
  lastRunAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
}
MobileMissionTemplate
{
  id: string
  title: string
  description: string
  brief: string
}
MobileMissionUpdateInput
{
  name: string
  brief: string
  milestones: ({
    id: string
    name: string
    features: ({
      id: string
      name: string
      objective: string
      agent: string
      model?: string | null
      tokenBudget?: 
        | 
        | number
        | "Infinity" | "-Infinity" | "NaN"
        | null
      dependsOn?: string[] | null
      status?: 
        | 
        | "pending"
        | "running"
        | "done"
        | "blocked"
        | "skipped"
        | "error"
        | null
      error?: string | null
    })[]
    validation?: 
      | "scrutiny" | "user-test" | "none"
      | null
    status?: 
      | 
      | "pending"
      | "running"
      | "validating"
      | "done"
      | "blocked"
      | null
  })[]
  models?: 
    | {
    worker?: string | null
    validation?: string | null
    orchestrator?: string | null
  }
    | null
  timeoutMs?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  sandbox?: boolean | null
  worktree?: 
    | {
    name: string
    branch?: string | null
    directory: string
  }
    | null
  status?: 
    | 
    | "planning"
    | "ready"
    | "running"
    | "paused"
    | "frozen"
    | "complete"
    | "error"
    | null
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
MobileMissionWriteInput
{
  name: string
  brief: string
  milestones: ({
    id: string
    name: string
    features: ({
      id: string
      name: string
      objective: string
      agent: string
      model?: string | null
      tokenBudget?: 
        | 
        | number
        | "Infinity" | "-Infinity" | "NaN"
        | null
      dependsOn?: string[] | null
      status?: 
        | 
        | "pending"
        | "running"
        | "done"
        | "blocked"
        | "skipped"
        | "error"
        | null
      error?: string | null
    })[]
    validation?: 
      | "scrutiny" | "user-test" | "none"
      | null
    status?: 
      | 
      | "pending"
      | "running"
      | "validating"
      | "done"
      | "blocked"
      | null
  })[]
  models?: 
    | {
    worker?: string | null
    validation?: string | null
    orchestrator?: string | null
  }
    | null
  timeoutMs?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  sandbox?: boolean | null
  worktree?: 
    | {
    name: string
    branch?: string | null
    directory: string
  }
    | null
}
MobileNotFound
{
  name: "NotFoundError"
  error: string
}
MobileRoutine
{
  id: string
  name: string
  prompt: string
  triggers: RoutineTrigger[]
  model?: 
    | {
    providerID: string
    modelID: string
  }
    | null
  paused: boolean
  projectID: string
  directory: string
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  updatedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  lastRunAt?: 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
  lastSessionID?: string | null
}
MobileRoutineCreateInput
{
  name: string
  prompt: string
  triggers?: RoutineTrigger_1[] | null
  model?: 
    | {
    providerID: string
    modelID: string
  }
    | null
}
MobileRoutineRunInput
{
  text?: string | null
}
MobileRoutineTriggerInput
{
  text?: string | null
}
MobileRoutineUpdateInput
{
  name?: string | null
  prompt?: string | null
  triggers?: RoutineTrigger_2[] | null
  model?: 
    | {
    providerID: string
    modelID: string
  }
    | null
  paused?: boolean | null
}
MobileSuccess
{
  success: true
}
PermissionAction_3
"allow" | "deny" | "ask"
PermissionRule_3
{
  permission: string
  pattern: string
  action: PermissionAction_3
}
PermissionRuleset_3
PermissionRule_3[]
RoutineTrigger
RoutineTriggerSchedule | RoutineTriggerApi
RoutineTrigger_1
RoutineTriggerSchedule_1 | RoutineTriggerApi_1
RoutineTrigger_2
RoutineTriggerSchedule_2 | RoutineTriggerApi_2
RoutineTriggerApi
{
  type: "api"
  token: string
  enabled: boolean
}
RoutineTriggerApi_1
{
  type: "api"
  token: string
  enabled: boolean
}
RoutineTriggerApi_2
{
  type: "api"
  token: string
  enabled: boolean
}
RoutineTriggerSchedule
{
  type: "schedule"
  cron: string
  enabled: boolean
}
RoutineTriggerSchedule_1
{
  type: "schedule"
  cron: string
  enabled: boolean
}
RoutineTriggerSchedule_2
{
  type: "schedule"
  cron: string
  enabled: boolean
}
Session_2
{
  id: string
  slug: string
  projectID: string
  directory: string
  parentID?: string
  workspaceID?: string
  summary?: {
    additions: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    deletions: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    files: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    diffs?: FileDiff_2[]
  }
  share?: {
    url: string
  }
  github?: SessionGithub_3
  worktree?: SessionWorktree_6
  mobile?: SessionMobile_2
  title: string
  activeCommand?: string
  version: string
  time: {
    created: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    updated: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    compacting?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    archived?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  permission?: PermissionRuleset_3
  skills?: string[]
  disabledInstructions?: string[]
  disabledTools?: {
    [key: string]: boolean
  }
  revert?: {
    messageID: string
    partID?: string
    snapshot?: string
    diff?: string
  }
  lastModel?: {
    providerID: string
    modelID: string
  }
}
SessionGithub_3
{
  owner: string
  repo: string
  fullName: string
  baseBranch: string
  headBranch: string
  repositoryDirectory?: string
  cloneUrl?: string
  htmlUrl?: string
  private?: boolean
  worktree: SessionWorktree_5
  pullRequest?: {
    number: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    url: string
    title: string
  }
  lastCommitSha?: string
  publishedAt?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  publishError?: string
}
SessionMobile_2
{
  platforms: (
    | "ios"
    | "android"
    | "expo"
    | "flutter"
    | "react-native")[]
  primaryPlatform: string
  method: string
  detectedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  buildStatus?: 
    | "unknown"
    | "building"
    | "succeeded"
    | "failed"
  lastBuildAt?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  artifacts?: ({
    platform: string
    path: string
    size?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    createdAt?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  })[]
}
SessionWorktree_5
{
  name: string
  branch: string
  directory: string
  repositoryDirectory?: string
  cleanedAt?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
SessionWorktree_6
{
  name: string
  branch: string
  directory: string
  repositoryDirectory?: string
  cleanedAt?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}