Skip to content
nikcli
Docs
Documentation

Sessions

The session lifecycle: create, fork, revert, share and delete sessions, read messages and parts, inspect todos, diffs, context and goals, and drive background delegations and monitors.

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

42 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 /session session.list
post /session session.create
get /session/status session.status
get /session/{sessionID} session.get
patch /session/{sessionID} session.update
delete /session/{sessionID} session.delete
post /session/{sessionID}/fork session.fork
post /session/{sessionID}/abort session.abort
post /session/{sessionID}/revert session.revert
post /session/{sessionID}/unrevert session.unrevert
post /session/{sessionID}/share session.share
delete /session/{sessionID}/share session.unshare
post /session/{sessionID}/summarize session.summarize
post /session/{sessionID}/generate session.generate
post /session/{sessionID}/command session.command
post /session/{sessionID}/shell session.shell
post /session/{sessionID}/permissions/{permissionID} permission.respond
get /session/{sessionID}/children session.children
get /session/{sessionID}/todo session.todo
get /session/{sessionID}/diff session.diff
get /session/{sessionID}/message session.messages
get /session/{sessionID}/pending session.pending
post /session/{sessionID}/pending/{pendingID}/steer session.pendingSteer
get /session/{sessionID}/message/{messageID} session.message
delete /session/{sessionID}/message/{messageID} session.messageRemove
patch /session/{sessionID}/message/{messageID}/part/{partID} part.update
delete /session/{sessionID}/message/{messageID}/part/{partID} part.delete
get /session/{sessionID}/v2/entries session.v2.entries
get /session/{sessionID}/v2/state session.v2.state
get /session/{sessionID}/v2/events session.v2.events
get /session/{sessionID}/instructions session.instructions
get /session/{sessionID}/context session.context
post /session/{sessionID}/context/toggle session.contextToggle
get /session/{sessionID}/goal session.goal
get /session/{sessionID}/background session.background
get /session/{sessionID}/background/{delegationID} session.background.inspect
get /session/{sessionID}/background/{delegationID}/read session.background.read
post /session/{sessionID}/background/{delegationID}/cancel session.background.cancel
post /session/{sessionID}/background/{delegationID}/resume session.background.resume
get /session/{sessionID}/monitor/{monitorID} session.monitor
get /session/{sessionID}/monitor/{monitorID}/log session.monitorLog
post /session/{sessionID}/monitor/{monitorID}/cancel session.monitorCancel

Session

get /session # session.list
Parameters
Name In Type Required
directory query string optional
roots query string optional
start query string optional
search query string optional
limit query string optional
workspace query string optional
Responses
200 SessionList application/json
Session_2[]
Example response captured
[]
SDK example
session.list
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.list({
  ...
})
Try it
post /session # session.create
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  parentID?: string
  title?: string
  permission?: unknown[]
  skills?: string[]
  github?: unknown
  workspaceID?: string
}
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
  }
}
Example response captured
{
  "id": "ses_f50250f8fffexTvasNDaQeiLXP",
  "slug": "swift-eagle",
  "projectID": "c6d9c4f98cc34c8bfb0a40b3a60eca6f624750e6",
  "directory": "/Users/me/demo",
  "title": "api tour",
  "version": "local",
  "time": {
    "created": 1789656756337,
    "updated": 1789656756337
  },
  "skills": []
}
SDK example
session.create
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

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

Status

get /session/status # session.status
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Responses
200 SessionStatusMap application/json
{
  [key: string]: SessionStatus_2
}
Example response from schema
{}

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

SDK example
session.status
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.status({
  ...
})
Try it

{SessionID}

get /session/{sessionID} # session.get
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
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 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response captured
{
  "id": "ses_f50250f8fffexTvasNDaQeiLXP",
  "slug": "swift-eagle",
  "projectID": "c6d9c4f98cc34c8bfb0a40b3a60eca6f624750e6",
  "directory": "/Users/me/demo",
  "title": "api tour",
  "version": "local",
  "time": {
    "created": 1789656756337,
    "updated": 1789656756337
  },
  "skills": []
}
SDK example
session.get
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.get({
  ...
})
Try it
patch /session/{sessionID} # session.update
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  title?: string
  time?: {
    archived?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
}
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 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
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
session.update
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.update({
  ...
})
Try it
delete /session/{sessionID} # session.delete
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Responses
200 BooleanResult application/json
boolean
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
false

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

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

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

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

post /session/{sessionID}/fork # session.fork
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  messageID?: string
  continuation?: SessionForkContinuation
}
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 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
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
session.fork
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.fork({
  ...
})
Try it
post /session/{sessionID}/abort # session.abort
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Responses
200 BooleanResult application/json
boolean
Example response from schema
false

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

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

const client = createNikcliClient()
await client.session.abort({
  ...
})
Try it
post /session/{sessionID}/revert # session.revert
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  messageID: string
  partID?: string
}
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 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
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
session.revert
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.revert({
  ...
})
Try it
post /session/{sessionID}/unrevert # session.unrevert
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
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 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
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
session.unrevert
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.unrevert({
  ...
})
Try it
post /session/{sessionID}/share # session.share
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
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 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
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
session.share
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.share({
  ...
})
Try it
delete /session/{sessionID}/share # session.unshare
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
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 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
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
session.unshare
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.unshare({
  ...
})
Try it

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

post /session/{sessionID}/summarize # session.summarize
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  providerID: string
  modelID: string
  auto?: boolean
}
Responses
200 BooleanResult application/json
boolean
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
false

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

SDK example
session.summarize
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.summarize({
  ...
})
Try it
post /session/{sessionID}/generate # session.generate
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  prompt: string
}
Responses
200 SessionGenerateResult application/json
{
  text: string
  agent: string
  model: SessionModelRef
  finish: string
}
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
422 SessionGenerateError application/json
{
  name: "SessionGenerateError"
  data: {
    message: string
  }
}
Example response from schema
{
  "text": "",
  "agent": "",
  "model": {
    "providerID": "",
    "modelID": ""
  },
  "finish": ""
}

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

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

const client = createNikcliClient()
await client.session.generate({
  ...
})
Try it
post /session/{sessionID}/command # session.command
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  messageID?: string
  delivery?: "steer" | "queue"
  agent?: string
  model?: string
  arguments: string
  command: string
  variant?: string
  parts?: unknown[]
}
Responses
200 MessageWithParts application/json
{
  info: Message_1
  parts: Part_1[]
}
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
{
  "info": {
    "id": "",
    "sessionID": "",
    "role": "user",
    "time": {
      "created": 0
    },
    "format": {
      "type": "text"
    },
    "summary": {
      "title": "",
      "body": "",
      "diffs": []
    },
    "agent": "",
    "model": {
      "providerID": "",
      "modelID": ""
    },
    "system": "",
    "tools": {},
    "variant": ""
  },
  "parts": [
    {
      "id": "",
      "sessionID": "",
      "messageID": "",
      "type": "text",
      "text": "",
      "synthetic": false,
      "ignored": false,
      "time": {
        "start": null,
        "end": null
      },
      "metadata": {}
    }
  ]
}

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

SDK example
session.command
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.command({
  ...
})
Try it
post /session/{sessionID}/shell # session.shell
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  agent: string
  model?: {
    providerID: string
    modelID: string
  }
  command: string
}
Responses
200 MessageWithParts application/json
{
  info: Message_1
  parts: Part_1[]
}
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
{
  "info": {
    "id": "",
    "sessionID": "",
    "role": "user",
    "time": {
      "created": 0
    },
    "format": {
      "type": "text"
    },
    "summary": {
      "title": "",
      "body": "",
      "diffs": []
    },
    "agent": "",
    "model": {
      "providerID": "",
      "modelID": ""
    },
    "system": "",
    "tools": {},
    "variant": ""
  },
  "parts": [
    {
      "id": "",
      "sessionID": "",
      "messageID": "",
      "type": "text",
      "text": "",
      "synthetic": false,
      "ignored": false,
      "time": {
        "start": null,
        "end": null
      },
      "metadata": {}
    }
  ]
}

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

SDK example
session.shell
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.shell({
  ...
})
Try it
post /session/{sessionID}/permissions/{permissionID} # permission.respond
Parameters
Name In Type Required
sessionID path string required
permissionID path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  response: "once" | "always" | "reject"
}
Responses
200 BooleanResult application/json
boolean
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
false

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

SDK example
permission.respond
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.permission.respond({
  ...
})
Try it
get /session/{sessionID}/children # session.children
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Responses
200 SessionList application/json
Session_2[]
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
[
  {
    "id": "",
    "slug": "",
    "projectID": "",
    "directory": "",
    "parentID": "",
    "workspaceID": "",
    "summary": {
      "additions": 0,
      "deletions": 0,
      "files": 0,
      "diffs": []
    },
    "share": {
      "url": ""
    },
    "github": {
      "owner": "",
      "repo": "",
      "fullName": "",
      "baseBranch": "",
      "headBranch": "",
      "repositoryDirectory": "",
      "cloneUrl": "",
      "htmlUrl": "",
      "private": false,
      "worktree": {
        "name": null,
        "branch": null,
        "directory": null,
        "repositoryDirectory": null,
        "cleanedAt": null
      },
      "pullRequest": {
        "number": null,
        "url": null,
        "title": null
      },
      "lastCommitSha": "",
      "publishedAt": 0,
      "publishError": ""
    },
    "worktree": {
      "name": "",
      "branch": "",
      "directory": "",
      "repositoryDirectory": "",
      "cleanedAt": 0
    },
    "mobile": {
      "platforms": [],
      "primaryPlatform": "",
      "method": "",
      "detectedAt": 0,
      "buildStatus": "unknown",
      "lastBuildAt": 0,
      "artifacts": []
    },
    "title": "",
    "activeCommand": "",
    "version": "",
    "time": {
      "created": 0,
      "updated": 0,
      "compacting": 0,
      "archived": 0
    },
    "permission": [
      {
        "permission": null,
        "pattern": null,
        "action": null
      }
    ],
    "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
session.children
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.children({
  ...
})
Try it
get /session/{sessionID}/todo # session.todo
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Responses
200 TodoList application/json
Todo[]
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response captured
[]
SDK example
session.todo
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.todo({
  ...
})
Try it
get /session/{sessionID}/diff # session.diff
Parameters
Name In Type Required
sessionID path string required
messageID query string optional
directory query string optional
workspace query string optional
Responses
200 FileDiffList application/json
FileDiff_2[]
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response captured
[]
SDK example
session.diff
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.diff({
  ...
})
Try it
get /session/{sessionID}/message # session.messages
Parameters
Name In Type Required
sessionID path string required
limit query string optional
directory query string optional
workspace query string optional
Responses
200 MessageList application/json
({
  info: Message_1
  parts: Part_1[]
})[]
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response captured
[]
SDK example
session.messages
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.messages({
  ...
})
Try it
get /session/{sessionID}/pending # session.pending
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Responses
200 SessionPendingInputList application/json
SessionPendingInput[]
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
[
  {
    "id": "",
    "sessionID": "",
    "delivery": "steer",
    "messageID": "",
    "data": {
      "sessionID": "",
      "messageID": "",
      "delivery": "steer",
      "model": {
        "providerID": null,
        "modelID": null
      },
      "agent": "",
      "noReply": false,
      "tools": {},
      "format": {
        "type": null
      },
      "system": "",
      "variant": "",
      "parts": []
    },
    "createdAt": 0
  }
]

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

SDK example
session.pending
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.pending({
  ...
})
Try it
post /session/{sessionID}/pending/{pendingID}/steer # session.pendingSteer
Parameters
Name In Type Required
sessionID path string required
pendingID path string required
directory query string optional
workspace query string optional
Responses
200 SessionPendingInput application/json
{
  id: string
  sessionID: string
  delivery: "steer" | "queue"
  messageID: string
  data: SessionPendingPromptInput
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
{
  "id": "",
  "sessionID": "",
  "delivery": "steer",
  "messageID": "",
  "data": {
    "sessionID": "",
    "messageID": "",
    "delivery": "steer",
    "model": {
      "providerID": "",
      "modelID": ""
    },
    "agent": "",
    "noReply": false,
    "tools": {},
    "format": {
      "type": "text"
    },
    "system": "",
    "variant": "",
    "parts": [
      {
        "type": null,
        "text": null,
        "synthetic": null,
        "ignored": null,
        "time": null,
        "metadata": null,
        "id": null
      }
    ]
  },
  "createdAt": 0
}

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

SDK example
session.pendingSteer
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.pendingSteer({
  ...
})
Try it
get /session/{sessionID}/message/{messageID} # session.message
Parameters
Name In Type Required
sessionID path string required
messageID path string required
directory query string optional
workspace query string optional
Responses
200 MessageWithParts application/json
{
  info: Message_1
  parts: Part_1[]
}
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
{
  "info": {
    "id": "",
    "sessionID": "",
    "role": "user",
    "time": {
      "created": 0
    },
    "format": {
      "type": "text"
    },
    "summary": {
      "title": "",
      "body": "",
      "diffs": []
    },
    "agent": "",
    "model": {
      "providerID": "",
      "modelID": ""
    },
    "system": "",
    "tools": {},
    "variant": ""
  },
  "parts": [
    {
      "id": "",
      "sessionID": "",
      "messageID": "",
      "type": "text",
      "text": "",
      "synthetic": false,
      "ignored": false,
      "time": {
        "start": null,
        "end": null
      },
      "metadata": {}
    }
  ]
}

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

SDK example
session.message
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.message({
  ...
})
Try it
delete /session/{sessionID}/message/{messageID} # session.messageRemove
Parameters
Name In Type Required
sessionID path string required
messageID path string required
directory query string optional
workspace query string optional
Responses
200 BooleanResult application/json
boolean
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
false

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

SDK example
session.messageRemove
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.messageRemove({
  ...
})
Try it

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

patch /session/{sessionID}/message/{messageID}/part/{partID} # part.update
Parameters
Name In Type Required
sessionID path string required
messageID path string required
partID path string required
directory query string optional
workspace query string optional
Responses
400 SessionPartMismatchError application/json
{
  name: "PartMismatchError"
  data: { [key: string]: unknown }
}
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
{
  "id": "",
  "sessionID": "",
  "messageID": "",
  "type": "text",
  "text": "",
  "synthetic": false,
  "ignored": false,
  "time": {
    "start": 0,
    "end": 0
  },
  "metadata": {}
}

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

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

const client = createNikcliClient()
await client.part.update({
  ...
})
Try it
delete /session/{sessionID}/message/{messageID}/part/{partID} # part.delete
Parameters
Name In Type Required
sessionID path string required
messageID path string required
partID path string required
directory query string optional
workspace query string optional
Responses
200 BooleanResult application/json
boolean
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
false

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

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

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

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

get /session/{sessionID}/v2/entries # session.v2.entries
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Responses
200 SessionV2EntryList application/json
unknown[]
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
[]

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

SDK example
session.v2.entries
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.v2.entries({
  ...
})
Try it
get /session/{sessionID}/v2/state # session.v2.state
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Responses
200 SessionV2State application/json
unknown
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
null

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

SDK example
session.v2.state
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.v2.state({
  ...
})
Try it
get /session/{sessionID}/v2/events # session.v2.events
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Responses
200 SessionV2EventList application/json
unknown[]
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
[]

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

SDK example
session.v2.events
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.v2.events({
  ...
})
Try it
get /session/{sessionID}/instructions # session.instructions
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Responses
200 SessionInstructionList application/json
({
  path: string
  name: string
})[]
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
[
  {
    "path": "",
    "name": ""
  }
]

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

SDK example
session.instructions
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.instructions({
  ...
})
Try it
get /session/{sessionID}/context # session.context
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Responses
200 SessionContextBreakdown application/json
{
  model?: {
    providerID: string
    modelID: string
    name: string
    contextLimit: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  reported: {
    input: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    output: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    reasoning: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    cacheRead: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    cacheWrite: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    total: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  sources: SessionContextSource[]
  estimatedTotal: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
{
  "model": {
    "providerID": "",
    "modelID": "",
    "name": "",
    "contextLimit": 0
  },
  "reported": {
    "input": 0,
    "output": 0,
    "reasoning": 0,
    "cacheRead": 0,
    "cacheWrite": 0,
    "total": 0
  },
  "sources": [
    {
      "id": "",
      "category": "system",
      "label": "",
      "detail": "",
      "tokens": 0,
      "enabled": false,
      "deferred": false,
      "togglable": false,
      "toggleKind": "mcp",
      "toggleKey": ""
    }
  ],
  "estimatedTotal": 0
}

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

SDK example
session.context
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.context({
  ...
})
Try it
post /session/{sessionID}/context/toggle # session.contextToggle
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  kind: 
    | "mcp"
    | "skill"
    | "instruction"
    | "tool"
  key: string
  enabled: boolean
}
Responses
200 SessionContextBreakdown application/json
{
  model?: {
    providerID: string
    modelID: string
    name: string
    contextLimit: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  reported: {
    input: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    output: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    reasoning: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    cacheRead: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    cacheWrite: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    total: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  sources: SessionContextSource[]
  estimatedTotal: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
{
  "model": {
    "providerID": "",
    "modelID": "",
    "name": "",
    "contextLimit": 0
  },
  "reported": {
    "input": 0,
    "output": 0,
    "reasoning": 0,
    "cacheRead": 0,
    "cacheWrite": 0,
    "total": 0
  },
  "sources": [
    {
      "id": "",
      "category": "system",
      "label": "",
      "detail": "",
      "tokens": 0,
      "enabled": false,
      "deferred": false,
      "togglable": false,
      "toggleKind": "mcp",
      "toggleKey": ""
    }
  ],
  "estimatedTotal": 0
}

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

SDK example
session.contextToggle
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.contextToggle({
  ...
})
Try it
get /session/{sessionID}/goal # session.goal
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Responses
200 SessionGoalOutput application/json
SessionGoalState | null
Example response from schema
{
  "sessionID": "",
  "goalID": "",
  "objective": "",
  "status": "active",
  "tokenBudget": 0,
  "tokensUsed": 0,
  "timeUsedSeconds": 0,
  "iterationCount": 0,
  "timeCreated": 0,
  "timeUpdated": 0
}

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

SDK example
session.goal
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.goal({
  ...
})
Try it
get /session/{sessionID}/background # session.background
Parameters
Name In Type Required
sessionID path string required
directory query string optional
workspace query string optional
Responses
200 SessionBackgroundOutput application/json
DelegationJob[]
404 SessionBackgroundNotFound application/json
{
  error: "Session not found"
}
Example response from schema
[
  {
    "jobID": "",
    "rootDelegationID": "",
    "parentSessionID": "",
    "title": "",
    "agent": "",
    "parentAgent": "",
    "status": "running",
    "source": "task",
    "workerSessionID": "",
    "delegatorID": "",
    "delegatorSessionID": "",
    "createdAt": 0,
    "updatedAt": 0,
    "completedAt": 0,
    "lastActivityAt": 0,
    "progressSummary": "",
    "resultSummary": "",
    "error": ""
  }
]

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

SDK example
session.background
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.background({
  ...
})
Try it
get /session/{sessionID}/background/{delegationID} # session.background.inspect
Parameters
Name In Type Required
sessionID path string required
delegationID path string required
directory query string optional
workspace query string optional
Responses
200 SessionBackgroundInspectOutput application/json
DelegationJob | null
Example response from schema
{
  "jobID": "",
  "rootDelegationID": "",
  "parentSessionID": "",
  "title": "",
  "agent": "",
  "parentAgent": "",
  "status": "running",
  "source": "task",
  "workerSessionID": "",
  "delegatorID": "",
  "delegatorSessionID": "",
  "createdAt": 0,
  "updatedAt": 0,
  "completedAt": 0,
  "lastActivityAt": 0,
  "progressSummary": "",
  "resultSummary": "",
  "error": ""
}

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

SDK example
session.background.inspect
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.background.inspect({
  ...
})
Try it
get /session/{sessionID}/background/{delegationID}/read # session.background.read
Parameters
Name In Type Required
sessionID path string required
delegationID path string required
directory query string optional
workspace query string optional
Responses
200 Success application/json
string
Example response from schema
""

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

SDK example
session.background.read
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.background.read({
  ...
})
Try it
post /session/{sessionID}/background/{delegationID}/cancel # session.background.cancel
Parameters
Name In Type Required
sessionID path string required
delegationID path string required
directory query string optional
workspace query string optional
Responses
200 Success application/json
boolean
Example response from schema
false

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

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

const client = createNikcliClient()
await client.session.background.cancel({
  ...
})
Try it
post /session/{sessionID}/background/{delegationID}/resume # session.background.resume
Parameters
Name In Type Required
sessionID path string required
delegationID path string required
directory query string optional
workspace query string optional
Responses
200 Success application/json
boolean
Example response from schema
false

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

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

const client = createNikcliClient()
await client.session.background.resume({
  ...
})
Try it
get /session/{sessionID}/monitor/{monitorID} # session.monitor
Parameters
Name In Type Required
sessionID path string required
monitorID path string required
directory query string optional
workspace query string optional
Responses
200 SessionMonitorOutput application/json
  | {
  id: string
  sessionID: string
  messageID: string
  callID: string
  partID?: string
  title: string
  command: string
  cwd: string
  agent: string
  wake: boolean
  timeoutMs?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  status: 
    | "running"
    | "complete"
    | "error"
    | "timeout"
    | "cancelled"
  pid?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  exitCode?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  signal?: string
  logPath: string
  commandPath: string
  pidPath: string
  exitCodePath: string
  preview?: string | null | null
  bytes?: 
    | 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
    | null
  time: {
    created: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    updated: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    completed?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
}
  | null
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
{
  "id": "",
  "sessionID": "",
  "messageID": "",
  "callID": "",
  "partID": "",
  "title": "",
  "command": "",
  "cwd": "",
  "agent": "",
  "wake": false,
  "timeoutMs": 0,
  "status": "running",
  "pid": 0,
  "exitCode": 0,
  "signal": "",
  "logPath": "",
  "commandPath": "",
  "pidPath": "",
  "exitCodePath": "",
  "preview": "",
  "bytes": 0,
  "time": {
    "created": 0,
    "updated": 0,
    "completed": 0
  }
}

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

SDK example
session.monitor
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.monitor({
  ...
})
Try it
get /session/{sessionID}/monitor/{monitorID}/log # session.monitorLog
Parameters
Name In Type Required
sessionID path string required
monitorID path string required
lines query string optional
directory query string optional
workspace query string optional
Responses
200 SessionMonitorLogOutput application/json
  | {
  record: {
    id: string
    sessionID: string
    messageID: string
    callID: string
    partID?: string
    title: string
    command: string
    cwd: string
    agent: string
    wake: boolean
    timeoutMs?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    status: 
      | "running"
      | "complete"
      | "error"
      | "timeout"
      | "cancelled"
    pid?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    exitCode?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    signal?: string
    logPath: string
    commandPath: string
    pidPath: string
    exitCodePath: string
    preview?: string | null | null
    bytes?: 
      | 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
      | null
    time: {
      created: 
        | number
        | "Infinity" | "-Infinity" | "NaN"
      updated: 
        | number
        | "Infinity" | "-Infinity" | "NaN"
      completed?: 
        | number
        | "Infinity" | "-Infinity" | "NaN"
    }
  }
  output: string
  truncated: boolean
}
  | null
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
{
  "record": {
    "id": "",
    "sessionID": "",
    "messageID": "",
    "callID": "",
    "partID": "",
    "title": "",
    "command": "",
    "cwd": "",
    "agent": "",
    "wake": false,
    "timeoutMs": 0,
    "status": "running",
    "pid": 0,
    "exitCode": 0,
    "signal": "",
    "logPath": "",
    "commandPath": "",
    "pidPath": "",
    "exitCodePath": "",
    "preview": "",
    "bytes": 0,
    "time": {
      "created": 0,
      "updated": 0,
      "completed": 0
    }
  },
  "output": "",
  "truncated": false
}

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

SDK example
session.monitorLog
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.monitorLog({
  ...
})
Try it
post /session/{sessionID}/monitor/{monitorID}/cancel # session.monitorCancel
Parameters
Name In Type Required
sessionID path string required
monitorID path string required
directory query string optional
workspace query string optional
Responses
200 SessionMonitorOutput application/json
  | {
  id: string
  sessionID: string
  messageID: string
  callID: string
  partID?: string
  title: string
  command: string
  cwd: string
  agent: string
  wake: boolean
  timeoutMs?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  status: 
    | "running"
    | "complete"
    | "error"
    | "timeout"
    | "cancelled"
  pid?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  exitCode?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  signal?: string
  logPath: string
  commandPath: string
  pidPath: string
  exitCodePath: string
  preview?: string | null | null
  bytes?: 
    | 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
    | null
  time: {
    created: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    updated: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    completed?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
}
  | null
404 SessionNotFoundError application/json
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
409 SessionBusyErrorBody application/json
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
Example response from schema
{
  "id": "",
  "sessionID": "",
  "messageID": "",
  "callID": "",
  "partID": "",
  "title": "",
  "command": "",
  "cwd": "",
  "agent": "",
  "wake": false,
  "timeoutMs": 0,
  "status": "running",
  "pid": 0,
  "exitCode": 0,
  "signal": "",
  "logPath": "",
  "commandPath": "",
  "pidPath": "",
  "exitCodePath": "",
  "preview": "",
  "bytes": 0,
  "time": {
    "created": 0,
    "updated": 0,
    "completed": 0
  }
}

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

SDK example
session.monitorCancel
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.session.monitorCancel({
  ...
})
Try it

Schemas

The 95 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.

AgentPart_1
{
  id: string
  sessionID: string
  messageID: string
  type: "agent"
  name: string
  source?: {
    value: string
    start: number
    end: number
  }
}
AgentPartInput_1
{
  type: "agent"
  name: string
  source?: {
    value: string
    start: number
    end: number
  }
  id?: string | null
}
APIError_2
{
  name: "APIError"
  data: {
    message: string
    statusCode?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    isRetryable: boolean
    responseHeaders?: {
      [key: string]: string
    }
    responseBody?: string
    metadata?: {
      [key: string]: string
    }
    classification?: "payload-too-large"
  }
}
AssistantMessage_1
{
  id: string
  sessionID: string
  role: "assistant"
  time: {
    created: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    completed?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  error?: 
    | ProviderAuthError_1
    | UnknownError_1
    | MessageOutputLengthError_1
    | MessageContextOverflowError_1
    | MessageAbortedError_1
    | StructuredOutputError_1
    | APIError_2
  parentID: string
  modelID: string
  providerID: string
  mode: string
  agent: string
  path: {
    cwd: string
    root: string
  }
  summary?: boolean
  cost: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  tokens: {
    total?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    input: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    output: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    reasoning: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    cache: {
      read: 
        | number
        | "Infinity" | "-Infinity" | "NaN"
      write: 
        | number
        | "Infinity" | "-Infinity" | "NaN"
    }
  }
  structured?: unknown
  finish?: string
}
BooleanResult
boolean
CompactionPart_1
{
  id: string
  sessionID: string
  messageID: string
  type: "compaction"
  auto: boolean
}
DelegationJob
{
  jobID: string
  rootDelegationID: string
  parentSessionID: string
  title: string
  agent: string
  parentAgent?: string
  status: 
    | "running"
    | "complete"
    | "error"
    | "timeout"
    | "cancelled"
    | "orphaned"
    | "synthesizing"
  source?: 
    | "task"
    | "model-subtask"
    | "advisor"
    | "research"
    | "ultrareview"
    | "delegator"
    | "delegator-followup"
    | "loop"
    | "other"
  workerSessionID?: string
  delegatorID?: string
  delegatorSessionID?: string
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  updatedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  completedAt?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  lastActivityAt?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  progressSummary?: string
  resultSummary?: string
  error?: string
}
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
}
FileDiffList
FileDiff_2[]
FilePart_2
{
  id: string
  sessionID: string
  messageID: string
  type: "file"
  mime: string
  filename?: string
  url: string
  source?: FilePartSource_2
}
FilePartInput_1
{
  type: "file"
  mime: string
  filename?: string
  url: string
  source?: FilePartSource_2
  id?: string | null
}
FilePartSource_2
FileSource_2 | SymbolSource_2 | ResourceSource_2
FilePartSourceText_6
{
  value: string
  start: number
  end: number
}
FileSource_2
{
  text: FilePartSourceText_6
  type: "file"
  path: string
}
JSONSchema_1
{ [key: string]: unknown }
Message_1
UserMessage_1 | AssistantMessage_1
MessageAbortedError_1
{
  name: "MessageAbortedError"
  data: {
    message: string
  }
}
MessageContextOverflowError_1
{
  name: "MessageContextOverflowError"
  data: {
    message: string
    statusCode?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    responseBody?: string
  }
}
MessageList
({
  info: Message_1
  parts: Part_1[]
})[]
MessageOutputLengthError_1
{
  name: "MessageOutputLengthError"
  data: { [key: string]: unknown } | unknown[]
}
MessageWithParts
{
  info: Message_1
  parts: Part_1[]
}
OutputFormat_1
OutputFormatText_1 | OutputFormatJsonSchema_1
OutputFormatJsonSchema_1
{
  type: "json_schema"
  schema: JSONSchema_1
  retryCount: number
}
OutputFormatText_1
{
  type: "text"
}
Part_1
  | TextPart_1
  | SubtaskPart_1
  | ReasoningPart_1
  | FilePart_2
  | ToolPart_1
  | StepStartPart_1
  | StepFinishPart_1
  | SnapshotPart_1
  | PatchPart_1
  | AgentPart_1
  | RetryPart_1
  | CompactionPart_1
PatchPart_1
{
  id: string
  sessionID: string
  messageID: string
  type: "patch"
  hash: string
  files: string[]
}
PermissionAction_3
"allow" | "deny" | "ask"
PermissionRule_3
{
  permission: string
  pattern: string
  action: PermissionAction_3
}
PermissionRuleset_3
PermissionRule_3[]
PromptPartInput
  | TextPartInput_1
  | FilePartInput_1
  | AgentPartInput_1
  | SubtaskPartInput_1
ProviderAuthError_1
{
  name: "ProviderAuthError"
  data: {
    providerID: string
    message: string
  }
}
Range_2
{
  start: {
    line: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    character: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  end: {
    line: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    character: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
}
ReasoningPart_1
{
  id: string
  sessionID: string
  messageID: string
  type: "reasoning"
  text: string
  metadata?: { [key: string]: unknown }
  time: {
    start: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    end?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
}
ResourceSource_2
{
  text: FilePartSourceText_6
  type: "resource"
  clientName: string
  uri: string
}
RetryPart_1
{
  id: string
  sessionID: string
  messageID: string
  type: "retry"
  attempt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  error: APIError_2
  time: {
    created: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
}
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
  }
}
SessionBackgroundInspectOutput
DelegationJob | null
SessionBackgroundNotFound
{
  error: "Session not found"
}
SessionBackgroundOutput
DelegationJob[]
SessionBusyErrorBody
{
  name: "SessionBusyError"
  data: { [key: string]: unknown }
}
SessionCommandInput
{
  messageID?: string
  delivery?: "steer" | "queue"
  agent?: string
  model?: string
  arguments: string
  command: string
  variant?: string
  parts?: unknown[]
}
SessionContextBreakdown
{
  model?: {
    providerID: string
    modelID: string
    name: string
    contextLimit: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  reported: {
    input: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    output: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    reasoning: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    cacheRead: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    cacheWrite: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    total: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  sources: SessionContextSource[]
  estimatedTotal: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
SessionContextSource
{
  id: string
  category: 
    | "system"
    | "instructions"
    | "skills"
    | "mcp"
    | "tools"
    | "agents"
    | "messages"
  label: string
  detail?: string
  tokens: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  enabled: boolean
  deferred?: boolean
  togglable: boolean
  toggleKind?: 
    | "mcp"
    | "skill"
    | "instruction"
    | "tool"
  toggleKey?: string
}
SessionContextToggleInput
{
  kind: 
    | "mcp"
    | "skill"
    | "instruction"
    | "tool"
  key: string
  enabled: boolean
}
SessionCreateInput
{
  parentID?: string
  title?: string
  permission?: unknown[]
  skills?: string[]
  github?: unknown
  workspaceID?: string
}
SessionForkContinuation
{
  prompt: string
  response: string
  agent: string
  model: SessionModelRef
  finish?: string
}
SessionForkInput
{
  messageID?: string
  continuation?: SessionForkContinuation
}
SessionGenerateError
{
  name: "SessionGenerateError"
  data: {
    message: string
  }
}
SessionGenerateInput
{
  prompt: string
}
SessionGenerateResult
{
  text: string
  agent: string
  model: SessionModelRef
  finish: 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
}
SessionGoalOutput
SessionGoalState | null
SessionGoalState
{
  sessionID: string
  goalID: string
  objective: string
  status: 
    | "active"
    | "paused"
    | "blocked"
    | "usage_limited"
    | "budget_limited"
    | "complete"
  tokenBudget?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  tokensUsed: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  timeUsedSeconds: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  iterationCount: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  timeCreated: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  timeUpdated: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
SessionInstructionList
({
  path: string
  name: string
})[]
SessionList
Session_2[]
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"
  })[]
}
SessionModelRef
{
  providerID: string
  modelID: string
}
SessionMonitorLogOutput
  | {
  record: {
    id: string
    sessionID: string
    messageID: string
    callID: string
    partID?: string
    title: string
    command: string
    cwd: string
    agent: string
    wake: boolean
    timeoutMs?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    status: 
      | "running"
      | "complete"
      | "error"
      | "timeout"
      | "cancelled"
    pid?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    exitCode?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    signal?: string
    logPath: string
    commandPath: string
    pidPath: string
    exitCodePath: string
    preview?: string | null | null
    bytes?: 
      | 
      | 
      | number
      | "Infinity" | "-Infinity" | "NaN"
      | null
      | null
    time: {
      created: 
        | number
        | "Infinity" | "-Infinity" | "NaN"
      updated: 
        | number
        | "Infinity" | "-Infinity" | "NaN"
      completed?: 
        | number
        | "Infinity" | "-Infinity" | "NaN"
    }
  }
  output: string
  truncated: boolean
}
  | null
SessionMonitorOutput
  | {
  id: string
  sessionID: string
  messageID: string
  callID: string
  partID?: string
  title: string
  command: string
  cwd: string
  agent: string
  wake: boolean
  timeoutMs?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  status: 
    | "running"
    | "complete"
    | "error"
    | "timeout"
    | "cancelled"
  pid?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  exitCode?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  signal?: string
  logPath: string
  commandPath: string
  pidPath: string
  exitCodePath: string
  preview?: string | null | null
  bytes?: 
    | 
    | 
    | number
    | "Infinity" | "-Infinity" | "NaN"
    | null
    | null
  time: {
    created: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    updated: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    completed?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
}
  | null
SessionNotFoundError
{
  name: "NotFoundError"
  data: { [key: string]: unknown }
}
SessionPartMismatchError
{
  name: "PartMismatchError"
  data: { [key: string]: unknown }
}
SessionPendingInput
{
  id: string
  sessionID: string
  delivery: "steer" | "queue"
  messageID: string
  data: SessionPendingPromptInput
  createdAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
SessionPendingInputList
SessionPendingInput[]
SessionPendingPromptInput
{
  sessionID: string
  messageID?: string
  delivery?: "steer" | "queue"
  model?: {
    providerID: string
    modelID: string
  }
  agent?: string
  noReply?: boolean
  tools?: {
    [key: string]: boolean
  }
  format?: OutputFormat_1
  system?: string
  variant?: string
  parts: PromptPartInput[]
}
SessionPermissionRespondInput
{
  response: "once" | "always" | "reject"
}
SessionRevertInput
{
  messageID: string
  partID?: string
}
SessionShellInput
{
  agent: string
  model?: {
    providerID: string
    modelID: string
  }
  command: string
}
SessionStatus_2
  | {
  type: "idle"
}
  | {
  type: "retry"
  attempt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  message: string
  next: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
  | {
  type: "busy"
  since: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
  | {
  type: "busy"
}
SessionStatusMap
{
  [key: string]: SessionStatus_2
}
SessionSummarizeInput
{
  providerID: string
  modelID: string
  auto?: boolean
}
SessionUpdateInput
{
  title?: string
  time?: {
    archived?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
}
SessionV2EntryList
unknown[]
SessionV2EventList
unknown[]
SessionV2StateEncoded
unknown
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"
}
SnapshotPart_1
{
  id: string
  sessionID: string
  messageID: string
  type: "snapshot"
  snapshot: string
}
StepFinishPart_1
{
  id: string
  sessionID: string
  messageID: string
  type: "step-finish"
  reason: string
  snapshot?: string
  cost: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  tokens: {
    total?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    input: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    output: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    reasoning: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    cache: {
      read: 
        | number
        | "Infinity" | "-Infinity" | "NaN"
      write: 
        | number
        | "Infinity" | "-Infinity" | "NaN"
    }
  }
}
StepStartPart_1
{
  id: string
  sessionID: string
  messageID: string
  type: "step-start"
  snapshot?: string
}
StructuredOutputError_1
{
  name: "StructuredOutputError"
  data: {
    message: string
    retries: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
}
SubtaskPart_1
{
  id: string
  sessionID: string
  messageID: string
  type: "subtask"
  prompt: string
  description: string
  agent: string
  model?: {
    providerID: string
    modelID: string
  }
  command?: string
  background?: boolean
}
SubtaskPartInput_1
{
  type: "subtask"
  prompt: string
  description: string
  agent: string
  model?: {
    providerID: string
    modelID: string
  }
  command?: string
  background?: boolean
  id?: string | null
}
SymbolSource_2
{
  text: FilePartSourceText_6
  type: "symbol"
  path: string
  range: Range_2
  name: string
  kind: number
}
TextPart_1
{
  id: string
  sessionID: string
  messageID: string
  type: "text"
  text: string
  synthetic?: boolean
  ignored?: boolean
  time?: {
    start: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    end?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  metadata?: { [key: string]: unknown }
}
TextPartInput_1
{
  type: "text"
  text: string
  synthetic?: boolean
  ignored?: boolean
  time?: {
    start: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    end?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  metadata?: { [key: string]: unknown }
  id?: string | null
}
Todo
{
  // Brief description of the task
  content: string
  // Current status of the task: pending, in_progress, completed, cancelled
  status: string
  // Priority level of the task: high, medium, low
  priority: string
  // Unique identifier for the todo item
  id: string
}
TodoList
Todo[]
ToolPart_1
{
  id: string
  sessionID: string
  messageID: string
  type: "tool"
  callID: string
  tool: string
  state: ToolState_1
  metadata?: { [key: string]: unknown }
}
ToolState_1
  | ToolStatePending_1
  | ToolStateRunning_1
  | ToolStateCompleted_1
  | ToolStateError_1
ToolStateCompleted_1
{
  status: "completed"
  input: { [key: string]: unknown }
  output: string
  title: string
  metadata: { [key: string]: unknown }
  time: {
    start: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    end: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    compacted?: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  attachments?: FilePart_2[]
}
ToolStateError_1
{
  status: "error"
  input: { [key: string]: unknown }
  error: string
  metadata?: { [key: string]: unknown }
  time: {
    start: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
    end: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
}
ToolStatePending_1
{
  status: "pending"
  input: { [key: string]: unknown }
  raw: string
}
ToolStateRunning_1
{
  status: "running"
  input: { [key: string]: unknown }
  title?: string
  metadata?: { [key: string]: unknown }
  structured?: { [key: string]: unknown }
  content?: (
    | {
    type: "text"
    text: string
  }
    | {
    type: "file"
    data: string
    mime: string
    name?: string
  })[]
  time: {
    start: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
}
UnknownError_1
{
  name: "UnknownError"
  data: {
    message: string
  }
}
UserMessage_1
{
  id: string
  sessionID: string
  role: "user"
  time: {
    created: 
      | number
      | "Infinity" | "-Infinity" | "NaN"
  }
  format?: OutputFormat_1
  summary?: {
    title?: string
    body?: string
    diffs: FileDiff_2[]
  }
  agent: string
  model: {
    providerID: string
    modelID: string
  }
  system?: string
  tools?: {
    [key: string]: boolean
  }
  variant?: string
}