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.
Send these requests to your own running server. Values stay in this browser.
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.
Session
session.list | 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 |
Session_2[]
Example response captured
[] SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.list({
...
}) Try it
session.create | Name | In | Type | Required |
|---|---|---|---|
| directory | query | string | optional |
| workspace | query | string | optional |
{ parentID?: string title?: string permission?: unknown[] skills?: string[] github?: unknown workspaceID?: string }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.create({
...
}) Try it
Status
session.status | Name | In | Type | Required |
|---|---|---|---|
| directory | query | string | optional |
| workspace | query | string | optional |
{ [key: string]: SessionStatus_2 }
Example response from schema
{} Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.status({
...
}) Try it
{SessionID}
session.get | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ 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 } }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.get({
...
}) Try it
session.update | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ title?: string time?: { archived?: | number | "Infinity" | "-Infinity" | "NaN" } }
{ 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 } }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.update({
...
}) Try it
session.delete | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
boolean { name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
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.
session.fork | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ messageID?: string continuation?: SessionForkContinuation }
{ 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 } }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.fork({
...
}) Try it
session.abort | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
boolean Example response from schema
false
Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.abort({
...
}) Try it
session.revert | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ messageID: string partID?: string }
{ 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 } }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.revert({
...
}) Try it
session.unrevert | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ 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 } }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.unrevert({
...
}) Try it
session.share | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ 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 } }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.share({
...
}) Try it
session.unshare | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ 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 } }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
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.
session.summarize | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ providerID: string modelID: string auto?: boolean }
boolean { name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.summarize({
...
}) Try it
session.generate | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ prompt: string }
{ text: string agent: string model: SessionModelRef finish: string }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.generate({
...
}) Try it
session.command | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ messageID?: string delivery?: "steer" | "queue" agent?: string model?: string arguments: string command: string variant?: string parts?: unknown[] }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.command({
...
}) Try it
session.shell | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ agent: string model?: { providerID: string modelID: string } command: string }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.shell({
...
}) Try it
permission.respond | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| permissionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ response: "once" | "always" | "reject" }
boolean { name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.permission.respond({
...
}) Try it
session.children | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
Session_2[]
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.children({
...
}) Try it
session.todo | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
Todo[]
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ name: "SessionBusyError" data: { [key: string]: unknown } }
Example response captured
[] SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.todo({
...
}) Try it
session.diff | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| messageID | query | string | optional |
| directory | query | string | optional |
| workspace | query | string | optional |
FileDiff_2[]
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ name: "SessionBusyError" data: { [key: string]: unknown } }
Example response captured
[] SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.diff({
...
}) Try it
session.messages | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| limit | query | string | optional |
| directory | query | string | optional |
| workspace | query | string | optional |
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ name: "SessionBusyError" data: { [key: string]: unknown } }
Example response captured
[] SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.messages({
...
}) Try it
session.pending | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
SessionPendingInput[]
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.pending({
...
}) Try it
session.pendingSteer | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| pendingID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ id: string sessionID: string delivery: "steer" | "queue" messageID: string data: SessionPendingPromptInput createdAt: | number | "Infinity" | "-Infinity" | "NaN" }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.pendingSteer({
...
}) Try it
session.message | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| messageID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.message({
...
}) Try it
session.messageRemove | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| messageID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
boolean { name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
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.
part.update | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| messageID | path | string | required |
| partID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
| TextPart_1 | SubtaskPart_1 | ReasoningPart_1 | FilePart_2 | ToolPart_1 | StepStartPart_1 | StepFinishPart_1 | SnapshotPart_1 | PatchPart_1 | AgentPart_1 | RetryPart_1 | CompactionPart_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
{ name: "PartMismatchError" data: { [key: string]: unknown } }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.part.update({
...
}) Try it
part.delete | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| messageID | path | string | required |
| partID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
boolean { name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
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.
session.v2.entries | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
unknown[]
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.v2.entries({
...
}) Try it
session.v2.state | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
unknown { name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.v2.state({
...
}) Try it
session.v2.events | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
unknown[]
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.v2.events({
...
}) Try it
session.instructions | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
({ path: string name: string })[]
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.instructions({
...
}) Try it
session.context | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ 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" }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.context({
...
}) Try it
session.contextToggle | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
{ kind: | "mcp" | "skill" | "instruction" | "tool" key: string enabled: boolean }
{ 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" }
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.contextToggle({
...
}) Try it
session.goal | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.goal({
...
}) Try it
session.background | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
DelegationJob[]
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.background({
...
}) Try it
session.background.inspect | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| delegationID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.background.inspect({
...
}) Try it
session.background.read | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| delegationID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
string Example response from schema
""
Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.background.read({
...
}) Try it
session.background.cancel | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| delegationID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
boolean Example response from schema
false
Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.background.cancel({
...
}) Try it
session.background.resume | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| delegationID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
boolean Example response from schema
false
Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.background.resume({
...
}) Try it
session.monitor | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| monitorID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
| { 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
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.monitor({
...
}) Try it
session.monitorLog | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| monitorID | path | string | required |
| lines | query | string | optional |
| directory | query | string | optional |
| workspace | query | string | optional |
| { 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
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.session.monitorLog({
...
}) Try it
session.monitorCancel | Name | In | Type | Required |
|---|---|---|---|
| sessionID | path | string | required |
| monitorID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
| { 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
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ 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
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.
{ id: string sessionID: string messageID: string type: "agent" name: string source?: { value: string start: number end: number } }
{ type: "agent" name: string source?: { value: string start: number end: number } id?: string | null }
{ 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" } }
{ 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 }
boolean { id: string sessionID: string messageID: string type: "compaction" auto: boolean }
{ 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 }
{ file: string patch: string additions: | number | "Infinity" | "-Infinity" | "NaN" deletions: | number | "Infinity" | "-Infinity" | "NaN" status?: | "added" | "deleted" | "modified" | null before: string after: string }
FileDiff_2[]
{ id: string sessionID: string messageID: string type: "file" mime: string filename?: string url: string source?: FilePartSource_2 }
{ type: "file" mime: string filename?: string url: string source?: FilePartSource_2 id?: string | null }
FileSource_2 | SymbolSource_2 | ResourceSource_2
{ value: string start: number end: number }
{ text: FilePartSourceText_6 type: "file" path: string }
{ [key: string]: unknown }
UserMessage_1 | AssistantMessage_1
{ name: "MessageAbortedError" data: { message: string } }
{ name: "MessageContextOverflowError" data: { message: string statusCode?: | number | "Infinity" | "-Infinity" | "NaN" responseBody?: string } }
{ name: "MessageOutputLengthError" data: { [key: string]: unknown } | unknown[] }
OutputFormatText_1 | OutputFormatJsonSchema_1
{ type: "json_schema" schema: JSONSchema_1 retryCount: number }
{ type: "text" }
| TextPart_1 | SubtaskPart_1 | ReasoningPart_1 | FilePart_2 | ToolPart_1 | StepStartPart_1 | StepFinishPart_1 | SnapshotPart_1 | PatchPart_1 | AgentPart_1 | RetryPart_1 | CompactionPart_1
{ id: string sessionID: string messageID: string type: "patch" hash: string files: string[] }
"allow" | "deny" | "ask"
{ permission: string pattern: string action: PermissionAction_3 }
PermissionRule_3[]
| TextPartInput_1 | FilePartInput_1 | AgentPartInput_1 | SubtaskPartInput_1
{ name: "ProviderAuthError" data: { providerID: string message: string } }
{ start: { line: | number | "Infinity" | "-Infinity" | "NaN" character: | number | "Infinity" | "-Infinity" | "NaN" } end: { line: | number | "Infinity" | "-Infinity" | "NaN" character: | number | "Infinity" | "-Infinity" | "NaN" } }
{ 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" } }
{ text: FilePartSourceText_6 type: "resource" clientName: string uri: string }
{ id: string sessionID: string messageID: string type: "retry" attempt: | number | "Infinity" | "-Infinity" | "NaN" error: APIError_2 time: { created: | number | "Infinity" | "-Infinity" | "NaN" } }
{ 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 } }
DelegationJob | null
{ error: "Session not found" }
DelegationJob[]
{ name: "SessionBusyError" data: { [key: string]: unknown } }
{ messageID?: string delivery?: "steer" | "queue" agent?: string model?: string arguments: string command: string variant?: string parts?: unknown[] }
{ 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" }
{ 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 }
{ kind: | "mcp" | "skill" | "instruction" | "tool" key: string enabled: boolean }
{ parentID?: string title?: string permission?: unknown[] skills?: string[] github?: unknown workspaceID?: string }
{ prompt: string response: string agent: string model: SessionModelRef finish?: string }
{ messageID?: string continuation?: SessionForkContinuation }
{ name: "SessionGenerateError" data: { message: string } }
{ prompt: string }
{ text: string agent: string model: SessionModelRef finish: string }
{ 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 }
SessionGoalState | null
{ 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" }
({ path: string name: string })[]
Session_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" })[] }
{ providerID: string modelID: string }
| { 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
| { 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
{ name: "NotFoundError" data: { [key: string]: unknown } }
{ name: "PartMismatchError" data: { [key: string]: unknown } }
{ id: string sessionID: string delivery: "steer" | "queue" messageID: string data: SessionPendingPromptInput createdAt: | number | "Infinity" | "-Infinity" | "NaN" }
SessionPendingInput[]
{ 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[] }
{ response: "once" | "always" | "reject" }
{ messageID: string partID?: string }
{ agent: string model?: { providerID: string modelID: string } command: string }
| { 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" }
{ [key: string]: SessionStatus_2 }
{ providerID: string modelID: string auto?: boolean }
{ title?: string time?: { archived?: | number | "Infinity" | "-Infinity" | "NaN" } }
unknown[]
unknown[]
unknown { name: string branch: string directory: string repositoryDirectory?: string cleanedAt?: | number | "Infinity" | "-Infinity" | "NaN" }
{ name: string branch: string directory: string repositoryDirectory?: string cleanedAt?: | number | "Infinity" | "-Infinity" | "NaN" }
{ id: string sessionID: string messageID: string type: "snapshot" snapshot: string }
{ 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" } } }
{ id: string sessionID: string messageID: string type: "step-start" snapshot?: string }
{ name: "StructuredOutputError" data: { message: string retries: | number | "Infinity" | "-Infinity" | "NaN" } }
{ id: string sessionID: string messageID: string type: "subtask" prompt: string description: string agent: string model?: { providerID: string modelID: string } command?: string background?: boolean }
{ type: "subtask" prompt: string description: string agent: string model?: { providerID: string modelID: string } command?: string background?: boolean id?: string | null }
{ text: FilePartSourceText_6 type: "symbol" path: string range: Range_2 name: string kind: number }
{ 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 } }
{ 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 }
{ // 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 }
Todo[]
{ id: string sessionID: string messageID: string type: "tool" callID: string tool: string state: ToolState_1 metadata?: { [key: string]: unknown } }
| ToolStatePending_1 | ToolStateRunning_1 | ToolStateCompleted_1 | ToolStateError_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[] }
{ status: "error" input: { [key: string]: unknown } error: string metadata?: { [key: string]: unknown } time: { start: | number | "Infinity" | "-Infinity" | "NaN" end: | number | "Infinity" | "-Infinity" | "NaN" } }
{ status: "pending" input: { [key: string]: unknown } raw: string }
{ 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" } }
{ name: "UnknownError" data: { message: string } }
{ 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 }