Projects API
Projects API - project management
import { CodeBoltClient } from '@codebolt/clientsdk';
const client = new CodeBoltClient();
Quick Reference
| Method | Description |
|---|---|
assignThreadToGroup | Assigns a conversation thread to a task group. |
checkEnvironment | Checks the availability and configuration of an environment variable or dependency. |
checkProjectName | Checks whether a project name is available for use. |
create | Creates a new project in a specified workspace. |
createInDefault | Creates a new project in the default workspace. |
createTaskGroup | Creates a new task group for organizing conversation threads. |
deleteTaskGroup | Permanently deletes a task group. |
getAllWithUniqueId | Retrieves all projects with their unique identifiers. |
getByWorkspace | Retrieves all projects belonging to a specific workspace. |
getChatHistory | Retrieves the chat history for the current project. |
getConfigs | Retrieves the configuration settings for the current project. |
getDebugHistory | Retrieves the debug session history for the current project. |
getDebugIndex | Retrieves the debug index for the current project. |
getRoot | Retrieves the root project information for the current workspace. |
getTaskGroups | Retrieves all task groups defined for the current project. |
getThreadGroup | Retrieves the task group that a specific thread is assigned to. |
getThreadGroupMappings | Retrieves all thread-to-group assignment mappings. |
getThreads | Retrieves all conversation threads associated with the current project. |
getThreadsForGroup | Retrieves all thread identifiers assigned to a specific task group. |
getTreeBatch | Retrieves multiple tree items in a single batch request. |
getTreeChildren | Retrieves the child items of a specific node in the project file tree. |
getTreeItem | Retrieves a specific item from the project's file tree by its identifier. |
resetProject | Resets a project to its initial state. |
runCommand | Executes a shell command within the project's working directory. |
setActive | Sets a project as the currently active project in the workspace. |
updateCodeboltYaml | Updates the codebolt.yaml configuration file for the project. |
updateConfig | Updates the project configuration via an alternative endpoint. |
updateProjectConfigs | Updates the project configuration settings. |
updateTaskGroup | Updates an existing task group's properties. |
Methods
assignThreadToGroup
client.projects.assignThreadToGroup(data: AssignThreadToGroupRequest): Promise<void>
Assigns a conversation thread to a task group.
Links a thread to a task group for organizational purposes. A thread can belong to at most one group at a time.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | AssignThreadToGroupRequest | Yes | The assignment request |
Returns: Promise<void> — A promise that resolves when the assignment has been saved
checkEnvironment
client.projects.checkEnvironment(data: CheckEnvironmentRequest): Promise<unknown>
Checks the availability and configuration of an environment variable or dependency.
Validates that required environment variables, tools, or runtime dependencies are properly configured for the project.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | CheckEnvironmentRequest | Yes | The environment check request |
Returns: Promise<unknown> — A promise that resolves to the check result
checkProjectName
client.projects.checkProjectName(data: CheckProjectNameRequest): Promise<object>
Checks whether a project name is available for use.
Validates that the proposed project name does not conflict with existing projects in the workspace. Use this before creating a new project.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | CheckProjectNameRequest | Yes | The name check request |
Returns: Promise<object> — A promise that resolves to an object indicating availability
create
client.projects.create(data: Record<string, unknown>): Promise<Project>
Creates a new project in a specified workspace.
Initializes a new project with the given configuration. The project will be created in the specified workspace directory with its own configuration and history.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | Record<string, unknown> | Yes | The project creation payload including name and workspace details |
Returns: Promise<Project> — A promise that resolves to the newly created project
createInDefault
client.projects.createInDefault(data: Record<string, unknown>): Promise<Project>
Creates a new project in the default workspace.
Convenience method that creates a project without needing to specify a workspace. The project is placed in the system's default workspace directory.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | Record<string, unknown> | Yes | The project creation payload |
Returns: Promise<Project> — A promise that resolves to the newly created project