Class SessionWorkspacesApi
workspaces namespace.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionAdds a compaction summary checkpoint to the local session workspace.Checks whether the local session workspace has an autopilot objective state file.Creates a directory in the session workspace files directory.Creates or overwrites a file in the session workspace files directory.Deletes the autopilot objective state file from the local session workspace.diff(SessionWorkspacesDiffParams params) Computes a diff for the session workspace.diff(SessionWorkspacesDiffRequest request) Computes a diff for the session workspace.ensure(SessionWorkspacesEnsureParams params) Ensures a local session workspace exists and returns it.Gets current workspace metadata for the session.Lists workspace checkpoints in chronological order.Lists files stored in the session workspace files directory.Reads the autopilot objective state file from the local session workspace.Reads the content of a workspace checkpoint by number.Reads a file from the session workspace files directory.Removes a file or directory from the session workspace files directory.Renames a file or directory within the session workspace files directory.Saves pasted content as a UTF-8 file in the session workspace.Returns metadata for a file or directory in the session workspace files directory.Truncates local workspace compaction summaries after a rollback.Updates workspace metadata for a local session and returns the refreshed workspace.Writes the autopilot objective state file in the local session workspace.
-
Method Details
-
getWorkspace
Gets current workspace metadata for the session.- Since:
- 1.0.0
-
updateMetadata
@CopilotExperimental public CompletableFuture<SessionWorkspacesUpdateMetadataResult> updateMetadata(SessionWorkspacesUpdateMetadataParams params) Updates workspace metadata for a local session and returns the refreshed workspace.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
ensure
@CopilotExperimental public CompletableFuture<SessionWorkspacesEnsureResult> ensure(SessionWorkspacesEnsureParams params) Ensures a local session workspace exists and returns it.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
listFiles
Lists files stored in the session workspace files directory.- Since:
- 1.0.0
-
readFile
@CopilotExperimental public CompletableFuture<SessionWorkspacesReadFileResult> readFile(SessionWorkspacesReadFileParams params) Reads a file from the session workspace files directory.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
createFile
@CopilotExperimental public CompletableFuture<Void> createFile(SessionWorkspacesCreateFileParams params) Creates or overwrites a file in the session workspace files directory.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
statFile
@CopilotExperimental public CompletableFuture<SessionWorkspacesStatFileResult> statFile(SessionWorkspacesStatFileParams params) Returns metadata for a file or directory in the session workspace files directory.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
createDirectory
@CopilotExperimental public CompletableFuture<Void> createDirectory(SessionWorkspacesCreateDirectoryParams params) Creates a directory in the session workspace files directory.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
removePath
@CopilotExperimental public CompletableFuture<Void> removePath(SessionWorkspacesRemovePathParams params) Removes a file or directory from the session workspace files directory.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
renamePath
@CopilotExperimental public CompletableFuture<Void> renamePath(SessionWorkspacesRenamePathParams params) Renames a file or directory within the session workspace files directory.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
listCheckpoints
@CopilotExperimental public CompletableFuture<SessionWorkspacesListCheckpointsResult> listCheckpoints()Lists workspace checkpoints in chronological order.- Since:
- 1.0.0
-
readCheckpoint
@CopilotExperimental public CompletableFuture<SessionWorkspacesReadCheckpointResult> readCheckpoint(SessionWorkspacesReadCheckpointParams params) Reads the content of a workspace checkpoint by number.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
addSummary
@CopilotExperimental public CompletableFuture<SessionWorkspacesAddSummaryResult> addSummary(SessionWorkspacesAddSummaryParams params) Adds a compaction summary checkpoint to the local session workspace.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
truncateSummaries
@CopilotExperimental public CompletableFuture<SessionWorkspacesTruncateSummariesResult> truncateSummaries(SessionWorkspacesTruncateSummariesParams params) Truncates local workspace compaction summaries after a rollback.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
readAutopilotObjective
@CopilotExperimental public CompletableFuture<SessionWorkspacesReadAutopilotObjectiveResult> readAutopilotObjective()Reads the autopilot objective state file from the local session workspace.- Since:
- 1.0.0
-
writeAutopilotObjective
@CopilotExperimental public CompletableFuture<SessionWorkspacesWriteAutopilotObjectiveResult> writeAutopilotObjective(SessionWorkspacesWriteAutopilotObjectiveParams params) Writes the autopilot objective state file in the local session workspace.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
deleteAutopilotObjective
@CopilotExperimental public CompletableFuture<SessionWorkspacesDeleteAutopilotObjectiveResult> deleteAutopilotObjective()Deletes the autopilot objective state file from the local session workspace.- Since:
- 1.0.0
-
autopilotObjectiveExists
@CopilotExperimental public CompletableFuture<SessionWorkspacesAutopilotObjectiveExistsResult> autopilotObjectiveExists()Checks whether the local session workspace has an autopilot objective state file.- Since:
- 1.0.0
-
saveLargePaste
@CopilotExperimental public CompletableFuture<SessionWorkspacesSaveLargePasteResult> saveLargePaste(SessionWorkspacesSaveLargePasteParams params) Saves pasted content as a UTF-8 file in the session workspace.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
diff
@CopilotExperimental public CompletableFuture<SessionWorkspacesDiffResult> diff(SessionWorkspacesDiffParams params) Computes a diff for the session workspace. Never rejects for a busy session: a `session`-mode diff that cannot read the session's file-change captures falls back to an unstaged git diff with `isFallback: true` and reports why in `unavailableReason`.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
diff
@CopilotExperimental public CompletableFuture<SessionWorkspacesDiffResult> diff(SessionWorkspacesDiffRequest request) Computes a diff for the session workspace. Never rejects for a busy session: a `session`-mode diff that cannot read the session's file-change captures falls back to an unstaged git diff with `isFallback: true` and reports why in `unavailableReason`.Accepts the extensible request, including inputs added after the params record.
- Since:
- 1.0.0
-