@nikcli-ai/sdk 1.39.0 → 1.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v2/gen/sdk.gen.d.ts +28 -1
- package/dist/v2/gen/sdk.gen.js +52 -0
- package/dist/v2/gen/types.gen.d.ts +124 -0
- package/package.json +1 -1
package/dist/v2/gen/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Client, type Options as Options2, type TDataShape } from "./client/index.js";
|
|
2
|
-
import type { AgentPartInput, AnalyticsDailyResponses, AnalyticsGlobalResponses, AnalyticsLeaderboardResponses, AnalyticsSessionErrors, AnalyticsSessionResponses, AnalyticsSessionsResponses, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillCreateErrors, AppSkillCreateResponses, AppSkillDeleteErrors, AppSkillDeleteResponses, AppSkillsResponses, Auth as Auth7, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListResponses, Config as Config2, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, ConnectorsAuthRemoveErrors, ConnectorsAuthRemoveResponses, ConnectorsAuthSetErrors, ConnectorsAuthSetResponses, ConnectorsInvalidateResponses, ConnectorsStatusResponses, DeleteConfigMcpNameResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiSessionSelect, EventTuiToastShow, ExperimentalResourceListResponses, ExperimentalWorkspaceAdaptorListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceRestoreErrors, ExperimentalWorkspaceRestoreResponses, ExperimentalWorkspaceSessionRestoreErrors, ExperimentalWorkspaceSessionRestoreResponses, ExperimentalWorkspaceSessionWarpErrors, ExperimentalWorkspaceSessionWarpResponses, ExperimentalWorkspaceWarpErrors, ExperimentalWorkspaceWarpResponses, FileListResponses, FilePartInput, FilePartSource, FileReadResponses, FileStatusResponses, FileWriteResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GetApiShareShareIdDataResponses, GetApiShareShareIdResponses, GetShareShareIdResponses, GetSShareIdResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, InstanceDisposeResponses, LspStatusResponses, ManagedWorktreeAncestorsErrors, ManagedWorktreeAncestorsResponses, ManagedWorktreeChildrenErrors, ManagedWorktreeChildrenResponses, ManagedWorktreeCreateErrors, ManagedWorktreeCreateInput, ManagedWorktreeCreateResponses, ManagedWorktreeLinkErrors, ManagedWorktreeLinkInput, ManagedWorktreeLinkResponses, ManagedWorktreeListErrors, ManagedWorktreeListResponses, ManagedWorktreeRemoveErrors, ManagedWorktreeRemoveInput, ManagedWorktreeRemoveResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, McpToggleErrors, McpToggleResponses, MobileAuthTokenCreateResponses, MobileAuthTokenListResponses, MobileAuthTokenRevokeResponses, MobileBootstrapResponses, MobileCommandListResponses, MobileGitBranchesResponses, MobileGitCheckoutErrors, MobileGitCheckoutResponses, MobileGitCommitErrors, MobileGitCommitResponses, MobileGitCommitsResponses, MobileGitDiffResponses, MobileGitDiscardResponses, MobileGithubAuthRemoveResponses, MobileGithubAuthSetErrors, MobileGithubAuthSetResponses, MobileGithubBranchesResponses, MobileGithubDeviceAuthPollInput, MobileGithubImportErrors, MobileGithubImportRequest, MobileGithubImportResponses, MobileGithubImportsResponses, MobileGithubOauthClientIdSetErrors, MobileGithubOauthClientIdSetResponses, MobileGithubOauthDevicePollErrors, MobileGithubOauthDevicePollResponses, MobileGithubOauthDeviceStartErrors, MobileGithubOauthDeviceStartResponses, MobileGithubPublishInput, MobileGithubReposResponses, MobileGithubSessionCleanupErrors, MobileGithubSessionCleanupResponses, MobileGithubSessionCreateErrors, MobileGithubSessionCreateInput, MobileGithubSessionCreateResponses, MobileGithubSessionPublishErrors, MobileGithubSessionPublishResponses, MobileGitPullErrors, MobileGitPullResponses, MobileGitPushErrors, MobileGitPushResponses, MobileGitStageResponses, MobileGitStatusResponses, MobileGitUnstageResponses, MobileMemoryHistoryResponses, MobileMemorySearchResponses, MobileMemoryStashCreateErrors, MobileMemoryStashCreateResponses, MobileMemoryStashDeleteErrors, MobileMemoryStashDeleteResponses, MobileMemoryStashListResponses, MobilePermissionRespondResponses, MobileProjectListResponses, MobilePromptStashCreateInput, MobileQuestionRejectResponses, MobileQuestionRespondResponses, MobileRoutineCreateErrors, MobileRoutineCreateInput, MobileRoutineCreateResponses, MobileRoutineDeleteErrors, MobileRoutineDeleteResponses, MobileRoutineGetErrors, MobileRoutineGetResponses, MobileRoutineListErrors, MobileRoutineListResponses, MobileRoutinePauseErrors, MobileRoutinePauseResponses, MobileRoutineResumeErrors, MobileRoutineResumeResponses, MobileRoutineRunErrors, MobileRoutineRunInput, MobileRoutineRunResponses, MobileRoutineTriggerErrors, MobileRoutineTriggerInput, MobileRoutineTriggerResponses, MobileRoutineUpdateErrors, MobileRoutineUpdateInput, MobileRoutineUpdateResponses, MobileSessionAbortResponses, MobileSessionCommandErrors, MobileSessionCommandInput, MobileSessionCommandListErrors, MobileSessionCommandListResponses, MobileSessionCommandResponses, MobileSessionCreateErrors, MobileSessionCreateInput, MobileSessionCreateResponses, MobileSessionDeleteErrors, MobileSessionDeleteResponses, MobileSessionDetailErrors, MobileSessionDetailResponses, MobileSessionDiffResponses, MobileSessionListResponses, MobileSessionMessageErrors, MobileSessionMessageResponses, MobileSessionRenameResponses, MobileSessionStreamResponses, MobileWorktreeCreateErrors, MobileWorktreeCreateResponses, MobileWorktreeRemoveResponses, MobileWorktreeResetResponses, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PatchConfigMcpNameResponses, PatchUserIdResponses, PathGetResponses, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, PostConfigMcpResponses, PostConfigProfilesActivateNameResponses, PostConfigProfilesResponses, PostUserLoginResponses, PostUserRegisterResponses, ProjectCurrentResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, ProviderApiSetErrors, ProviderApiSetResponses, ProviderAuthRemoveResponses, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, SessionAbortErrors, SessionAbortResponses, SessionBackgroundCancelErrors, SessionBackgroundCancelResponses, SessionBackgroundErrors, SessionBackgroundInspectErrors, SessionBackgroundInspectResponses, SessionBackgroundReadErrors, SessionBackgroundReadResponses, SessionBackgroundResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteResponses, SessionDiffResponses, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionGithub, SessionInitErrors, SessionInitResponses, SessionInstructionsErrors, SessionInstructionsResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionMonitorCancelErrors, SessionMonitorCancelResponses, SessionMonitorErrors, SessionMonitorLogErrors, SessionMonitorLogResponses, SessionMonitorResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SubtaskPartInput, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptResponses, TuiControlNextResponses, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpResponses, TuiOpenModelsResponses, TuiOpenSessionsResponses, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastResponses, TuiSubmitPromptResponses, VcsApplyErrors, VcsApplyInput, VcsApplyResponses, VcsDiffRawResponses, VcsGetResponses, VcsStatusResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeListResponses, WorktreeRemoveErrors, WorktreeRemoveInput, WorktreeRemoveResponses, WorktreeResetErrors, WorktreeResetInput, WorktreeResetResponses } from "./types.gen.js";
|
|
2
|
+
import type { AgentPartInput, AnalyticsDailyResponses, AnalyticsGlobalResponses, AnalyticsLeaderboardResponses, AnalyticsSessionErrors, AnalyticsSessionResponses, AnalyticsSessionsResponses, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillCreateErrors, AppSkillCreateResponses, AppSkillDeleteErrors, AppSkillDeleteResponses, AppSkillsResponses, Auth as Auth7, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListResponses, Config as Config2, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, ConnectorsAuthRemoveErrors, ConnectorsAuthRemoveResponses, ConnectorsAuthSetErrors, ConnectorsAuthSetResponses, ConnectorsInvalidateResponses, ConnectorsStatusResponses, DeleteConfigMcpNameResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiSessionSelect, EventTuiToastShow, ExperimentalResourceListResponses, ExperimentalWorkspaceAdaptorListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceRestoreErrors, ExperimentalWorkspaceRestoreResponses, ExperimentalWorkspaceSessionRestoreErrors, ExperimentalWorkspaceSessionRestoreResponses, ExperimentalWorkspaceSessionWarpErrors, ExperimentalWorkspaceSessionWarpResponses, ExperimentalWorkspaceWarpErrors, ExperimentalWorkspaceWarpResponses, FileListResponses, FilePartInput, FilePartSource, FileReadResponses, FileStatusResponses, FileWriteResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GetApiShareShareIdDataResponses, GetApiShareShareIdResponses, GetShareShareIdResponses, GetSShareIdResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, InstanceDisposeResponses, LspStatusResponses, ManagedWorktreeAncestorsErrors, ManagedWorktreeAncestorsResponses, ManagedWorktreeChildrenErrors, ManagedWorktreeChildrenResponses, ManagedWorktreeCreateErrors, ManagedWorktreeCreateInput, ManagedWorktreeCreateResponses, ManagedWorktreeLinkErrors, ManagedWorktreeLinkInput, ManagedWorktreeLinkResponses, ManagedWorktreeListErrors, ManagedWorktreeListResponses, ManagedWorktreeRemoveErrors, ManagedWorktreeRemoveInput, ManagedWorktreeRemoveResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, McpToggleErrors, McpToggleResponses, MobileAuthTokenCreateResponses, MobileAuthTokenListResponses, MobileAuthTokenRevokeResponses, MobileBootstrapResponses, MobileCommandListResponses, MobileGitBranchesResponses, MobileGitCheckoutErrors, MobileGitCheckoutResponses, MobileGitCommitErrors, MobileGitCommitResponses, MobileGitCommitsResponses, MobileGitDiffResponses, MobileGitDiscardResponses, MobileGithubAuthRemoveResponses, MobileGithubAuthSetErrors, MobileGithubAuthSetResponses, MobileGithubBranchesResponses, MobileGithubDeviceAuthPollInput, MobileGithubImportErrors, MobileGithubImportRequest, MobileGithubImportResponses, MobileGithubImportsResponses, MobileGithubOauthClientIdSetErrors, MobileGithubOauthClientIdSetResponses, MobileGithubOauthDevicePollErrors, MobileGithubOauthDevicePollResponses, MobileGithubOauthDeviceStartErrors, MobileGithubOauthDeviceStartResponses, MobileGithubPublishInput, MobileGithubReposResponses, MobileGithubSessionCleanupErrors, MobileGithubSessionCleanupResponses, MobileGithubSessionCreateErrors, MobileGithubSessionCreateInput, MobileGithubSessionCreateResponses, MobileGithubSessionPublishErrors, MobileGithubSessionPublishResponses, MobileGitPullErrors, MobileGitPullResponses, MobileGitPushErrors, MobileGitPushResponses, MobileGitStageResponses, MobileGitStatusResponses, MobileGitUnstageResponses, MobileMemoryHistoryResponses, MobileMemorySearchResponses, MobileMemoryStashCreateErrors, MobileMemoryStashCreateResponses, MobileMemoryStashDeleteErrors, MobileMemoryStashDeleteResponses, MobileMemoryStashListResponses, MobilePermissionRespondResponses, MobileProjectListResponses, MobilePromptStashCreateInput, MobileQuestionRejectResponses, MobileQuestionRespondResponses, MobileRoutineCreateErrors, MobileRoutineCreateInput, MobileRoutineCreateResponses, MobileRoutineDeleteErrors, MobileRoutineDeleteResponses, MobileRoutineGetErrors, MobileRoutineGetResponses, MobileRoutineListErrors, MobileRoutineListResponses, MobileRoutinePauseErrors, MobileRoutinePauseResponses, MobileRoutineResumeErrors, MobileRoutineResumeResponses, MobileRoutineRunErrors, MobileRoutineRunInput, MobileRoutineRunResponses, MobileRoutineTriggerErrors, MobileRoutineTriggerInput, MobileRoutineTriggerResponses, MobileRoutineUpdateErrors, MobileRoutineUpdateInput, MobileRoutineUpdateResponses, MobileSessionAbortResponses, MobileSessionCommandErrors, MobileSessionCommandInput, MobileSessionCommandListErrors, MobileSessionCommandListResponses, MobileSessionCommandResponses, MobileSessionCreateErrors, MobileSessionCreateInput, MobileSessionCreateResponses, MobileSessionDeleteErrors, MobileSessionDeleteResponses, MobileSessionDetailErrors, MobileSessionDetailResponses, MobileSessionDiffResponses, MobileSessionListResponses, MobileSessionMessageErrors, MobileSessionMessageResponses, MobileSessionRenameResponses, MobileSessionStreamResponses, MobileWorktreeCreateErrors, MobileWorktreeCreateResponses, MobileWorktreeRemoveResponses, MobileWorktreeResetResponses, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PatchConfigMcpNameResponses, PatchUserIdResponses, PathGetResponses, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, PostConfigMcpResponses, PostConfigProfilesActivateNameResponses, PostConfigProfilesResponses, PostUserLoginResponses, PostUserRegisterResponses, ProjectCurrentResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, ProviderApiSetErrors, ProviderApiSetResponses, ProviderAuthRemoveResponses, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, SessionAbortErrors, SessionAbortResponses, SessionBackgroundCancelErrors, SessionBackgroundCancelResponses, SessionBackgroundErrors, SessionBackgroundInspectErrors, SessionBackgroundInspectResponses, SessionBackgroundReadErrors, SessionBackgroundReadResponses, SessionBackgroundResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionContextErrors, SessionContextResponses, SessionContextToggleErrors, SessionContextToggleResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteResponses, SessionDiffResponses, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionGithub, SessionInitErrors, SessionInitResponses, SessionInstructionsErrors, SessionInstructionsResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionMonitorCancelErrors, SessionMonitorCancelResponses, SessionMonitorErrors, SessionMonitorLogErrors, SessionMonitorLogResponses, SessionMonitorResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SubtaskPartInput, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptResponses, TuiControlNextResponses, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpResponses, TuiOpenModelsResponses, TuiOpenSessionsResponses, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastResponses, TuiSubmitPromptResponses, VcsApplyErrors, VcsApplyInput, VcsApplyResponses, VcsDiffRawResponses, VcsGetResponses, VcsStatusResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeListResponses, WorktreeRemoveErrors, WorktreeRemoveInput, WorktreeRemoveResponses, WorktreeResetErrors, WorktreeResetInput, WorktreeResetResponses } from "./types.gen.js";
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -498,6 +498,10 @@ export declare class Session2 extends HeyApiClient {
|
|
|
498
498
|
title?: string;
|
|
499
499
|
permission?: PermissionRuleset;
|
|
500
500
|
skills?: Array<string>;
|
|
501
|
+
disabledInstructions?: Array<string>;
|
|
502
|
+
disabledTools?: {
|
|
503
|
+
[key: string]: boolean;
|
|
504
|
+
};
|
|
501
505
|
github?: SessionGithub;
|
|
502
506
|
workspaceID?: string;
|
|
503
507
|
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionCreateResponses, SessionCreateErrors, ThrowOnError, "fields">;
|
|
@@ -554,6 +558,29 @@ export declare class Session2 extends HeyApiClient {
|
|
|
554
558
|
directory?: string;
|
|
555
559
|
workspace?: string;
|
|
556
560
|
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionInstructionsResponses, SessionInstructionsErrors, ThrowOnError, "fields">;
|
|
561
|
+
/**
|
|
562
|
+
* Get context usage breakdown
|
|
563
|
+
*
|
|
564
|
+
* Compute a per-source breakdown of estimated context tokens (system prompt, environment, instruction files, skills, MCP servers, built-in tools, agents, and conversation) along with the tokens last reported by the provider. Sources tagged togglable can be enabled/disabled to manage context.
|
|
565
|
+
*/
|
|
566
|
+
context<ThrowOnError extends boolean = false>(parameters: {
|
|
567
|
+
sessionID: string;
|
|
568
|
+
directory?: string;
|
|
569
|
+
workspace?: string;
|
|
570
|
+
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionContextResponses, SessionContextErrors, ThrowOnError, "fields">;
|
|
571
|
+
/**
|
|
572
|
+
* Enable or disable a context source
|
|
573
|
+
*
|
|
574
|
+
* Enable or disable a single context source for this session. Supports MCP servers (kind=mcp), active skills (kind=skill), instruction files (kind=instruction), and tools (kind=tool). Returns the recomputed context breakdown.
|
|
575
|
+
*/
|
|
576
|
+
contextToggle<ThrowOnError extends boolean = false>(parameters: {
|
|
577
|
+
sessionID: string;
|
|
578
|
+
directory?: string;
|
|
579
|
+
workspace?: string;
|
|
580
|
+
kind?: "mcp" | "skill" | "instruction" | "tool";
|
|
581
|
+
key?: string;
|
|
582
|
+
enabled?: boolean;
|
|
583
|
+
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionContextToggleResponses, SessionContextToggleErrors, ThrowOnError, "fields">;
|
|
557
584
|
/**
|
|
558
585
|
* Get session children
|
|
559
586
|
*
|
package/dist/v2/gen/sdk.gen.js
CHANGED
|
@@ -969,6 +969,8 @@ export class Session2 extends HeyApiClient {
|
|
|
969
969
|
{ in: "body", key: "title" },
|
|
970
970
|
{ in: "body", key: "permission" },
|
|
971
971
|
{ in: "body", key: "skills" },
|
|
972
|
+
{ in: "body", key: "disabledInstructions" },
|
|
973
|
+
{ in: "body", key: "disabledTools" },
|
|
972
974
|
{ in: "body", key: "github" },
|
|
973
975
|
{ in: "body", key: "workspaceID" },
|
|
974
976
|
],
|
|
@@ -1096,6 +1098,56 @@ export class Session2 extends HeyApiClient {
|
|
|
1096
1098
|
...params,
|
|
1097
1099
|
});
|
|
1098
1100
|
}
|
|
1101
|
+
/**
|
|
1102
|
+
* Get context usage breakdown
|
|
1103
|
+
*
|
|
1104
|
+
* Compute a per-source breakdown of estimated context tokens (system prompt, environment, instruction files, skills, MCP servers, built-in tools, agents, and conversation) along with the tokens last reported by the provider. Sources tagged togglable can be enabled/disabled to manage context.
|
|
1105
|
+
*/
|
|
1106
|
+
context(parameters, options) {
|
|
1107
|
+
const params = buildClientParams([parameters], [
|
|
1108
|
+
{
|
|
1109
|
+
args: [
|
|
1110
|
+
{ in: "path", key: "sessionID" },
|
|
1111
|
+
{ in: "query", key: "directory" },
|
|
1112
|
+
{ in: "query", key: "workspace" },
|
|
1113
|
+
],
|
|
1114
|
+
},
|
|
1115
|
+
]);
|
|
1116
|
+
return (options?.client ?? this.client).get({
|
|
1117
|
+
url: "/session/{sessionID}/context",
|
|
1118
|
+
...options,
|
|
1119
|
+
...params,
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
/**
|
|
1123
|
+
* Enable or disable a context source
|
|
1124
|
+
*
|
|
1125
|
+
* Enable or disable a single context source for this session. Supports MCP servers (kind=mcp), active skills (kind=skill), instruction files (kind=instruction), and tools (kind=tool). Returns the recomputed context breakdown.
|
|
1126
|
+
*/
|
|
1127
|
+
contextToggle(parameters, options) {
|
|
1128
|
+
const params = buildClientParams([parameters], [
|
|
1129
|
+
{
|
|
1130
|
+
args: [
|
|
1131
|
+
{ in: "path", key: "sessionID" },
|
|
1132
|
+
{ in: "query", key: "directory" },
|
|
1133
|
+
{ in: "query", key: "workspace" },
|
|
1134
|
+
{ in: "body", key: "kind" },
|
|
1135
|
+
{ in: "body", key: "key" },
|
|
1136
|
+
{ in: "body", key: "enabled" },
|
|
1137
|
+
],
|
|
1138
|
+
},
|
|
1139
|
+
]);
|
|
1140
|
+
return (options?.client ?? this.client).post({
|
|
1141
|
+
url: "/session/{sessionID}/context/toggle",
|
|
1142
|
+
...options,
|
|
1143
|
+
...params,
|
|
1144
|
+
headers: {
|
|
1145
|
+
"Content-Type": "application/json",
|
|
1146
|
+
...options?.headers,
|
|
1147
|
+
...params.headers,
|
|
1148
|
+
},
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1099
1151
|
/**
|
|
1100
1152
|
* Get session children
|
|
1101
1153
|
*
|
|
@@ -866,6 +866,10 @@ export type Session = {
|
|
|
866
866
|
};
|
|
867
867
|
permission?: PermissionRuleset;
|
|
868
868
|
skills?: Array<string>;
|
|
869
|
+
disabledInstructions?: Array<string>;
|
|
870
|
+
disabledTools?: {
|
|
871
|
+
[key: string]: boolean;
|
|
872
|
+
};
|
|
869
873
|
revert?: {
|
|
870
874
|
messageID: string;
|
|
871
875
|
partID?: string;
|
|
@@ -4015,6 +4019,10 @@ export type SessionCreateData = {
|
|
|
4015
4019
|
title?: string;
|
|
4016
4020
|
permission?: PermissionRuleset;
|
|
4017
4021
|
skills?: Array<string>;
|
|
4022
|
+
disabledInstructions?: Array<string>;
|
|
4023
|
+
disabledTools?: {
|
|
4024
|
+
[key: string]: boolean;
|
|
4025
|
+
};
|
|
4018
4026
|
github?: SessionGithub;
|
|
4019
4027
|
workspaceID?: string;
|
|
4020
4028
|
};
|
|
@@ -4188,6 +4196,122 @@ export type SessionInstructionsResponses = {
|
|
|
4188
4196
|
}>;
|
|
4189
4197
|
};
|
|
4190
4198
|
export type SessionInstructionsResponse = SessionInstructionsResponses[keyof SessionInstructionsResponses];
|
|
4199
|
+
export type SessionContextData = {
|
|
4200
|
+
body?: never;
|
|
4201
|
+
path: {
|
|
4202
|
+
sessionID: string;
|
|
4203
|
+
};
|
|
4204
|
+
query?: {
|
|
4205
|
+
directory?: string;
|
|
4206
|
+
workspace?: string;
|
|
4207
|
+
};
|
|
4208
|
+
url: "/session/{sessionID}/context";
|
|
4209
|
+
};
|
|
4210
|
+
export type SessionContextErrors = {
|
|
4211
|
+
/**
|
|
4212
|
+
* Bad request
|
|
4213
|
+
*/
|
|
4214
|
+
400: BadRequestError;
|
|
4215
|
+
/**
|
|
4216
|
+
* Not found
|
|
4217
|
+
*/
|
|
4218
|
+
404: NotFoundError;
|
|
4219
|
+
};
|
|
4220
|
+
export type SessionContextError = SessionContextErrors[keyof SessionContextErrors];
|
|
4221
|
+
export type SessionContextResponses = {
|
|
4222
|
+
/**
|
|
4223
|
+
* Context usage breakdown
|
|
4224
|
+
*/
|
|
4225
|
+
200: {
|
|
4226
|
+
model?: {
|
|
4227
|
+
providerID: string;
|
|
4228
|
+
modelID: string;
|
|
4229
|
+
name: string;
|
|
4230
|
+
contextLimit: number;
|
|
4231
|
+
};
|
|
4232
|
+
reported: {
|
|
4233
|
+
input: number;
|
|
4234
|
+
output: number;
|
|
4235
|
+
reasoning: number;
|
|
4236
|
+
cacheRead: number;
|
|
4237
|
+
cacheWrite: number;
|
|
4238
|
+
total: number;
|
|
4239
|
+
};
|
|
4240
|
+
sources: Array<{
|
|
4241
|
+
id: string;
|
|
4242
|
+
category: "system" | "instructions" | "skills" | "mcp" | "tools" | "agents" | "messages";
|
|
4243
|
+
label: string;
|
|
4244
|
+
detail?: string;
|
|
4245
|
+
tokens: number;
|
|
4246
|
+
enabled: boolean;
|
|
4247
|
+
togglable: boolean;
|
|
4248
|
+
toggleKind?: "mcp" | "skill" | "instruction" | "tool";
|
|
4249
|
+
toggleKey?: string;
|
|
4250
|
+
}>;
|
|
4251
|
+
estimatedTotal: number;
|
|
4252
|
+
};
|
|
4253
|
+
};
|
|
4254
|
+
export type SessionContextResponse = SessionContextResponses[keyof SessionContextResponses];
|
|
4255
|
+
export type SessionContextToggleData = {
|
|
4256
|
+
body?: {
|
|
4257
|
+
kind: "mcp" | "skill" | "instruction" | "tool";
|
|
4258
|
+
key: string;
|
|
4259
|
+
enabled: boolean;
|
|
4260
|
+
};
|
|
4261
|
+
path: {
|
|
4262
|
+
sessionID: string;
|
|
4263
|
+
};
|
|
4264
|
+
query?: {
|
|
4265
|
+
directory?: string;
|
|
4266
|
+
workspace?: string;
|
|
4267
|
+
};
|
|
4268
|
+
url: "/session/{sessionID}/context/toggle";
|
|
4269
|
+
};
|
|
4270
|
+
export type SessionContextToggleErrors = {
|
|
4271
|
+
/**
|
|
4272
|
+
* Bad request
|
|
4273
|
+
*/
|
|
4274
|
+
400: BadRequestError;
|
|
4275
|
+
/**
|
|
4276
|
+
* Not found
|
|
4277
|
+
*/
|
|
4278
|
+
404: NotFoundError;
|
|
4279
|
+
};
|
|
4280
|
+
export type SessionContextToggleError = SessionContextToggleErrors[keyof SessionContextToggleErrors];
|
|
4281
|
+
export type SessionContextToggleResponses = {
|
|
4282
|
+
/**
|
|
4283
|
+
* Updated context usage breakdown
|
|
4284
|
+
*/
|
|
4285
|
+
200: {
|
|
4286
|
+
model?: {
|
|
4287
|
+
providerID: string;
|
|
4288
|
+
modelID: string;
|
|
4289
|
+
name: string;
|
|
4290
|
+
contextLimit: number;
|
|
4291
|
+
};
|
|
4292
|
+
reported: {
|
|
4293
|
+
input: number;
|
|
4294
|
+
output: number;
|
|
4295
|
+
reasoning: number;
|
|
4296
|
+
cacheRead: number;
|
|
4297
|
+
cacheWrite: number;
|
|
4298
|
+
total: number;
|
|
4299
|
+
};
|
|
4300
|
+
sources: Array<{
|
|
4301
|
+
id: string;
|
|
4302
|
+
category: "system" | "instructions" | "skills" | "mcp" | "tools" | "agents" | "messages";
|
|
4303
|
+
label: string;
|
|
4304
|
+
detail?: string;
|
|
4305
|
+
tokens: number;
|
|
4306
|
+
enabled: boolean;
|
|
4307
|
+
togglable: boolean;
|
|
4308
|
+
toggleKind?: "mcp" | "skill" | "instruction" | "tool";
|
|
4309
|
+
toggleKey?: string;
|
|
4310
|
+
}>;
|
|
4311
|
+
estimatedTotal: number;
|
|
4312
|
+
};
|
|
4313
|
+
};
|
|
4314
|
+
export type SessionContextToggleResponse = SessionContextToggleResponses[keyof SessionContextToggleResponses];
|
|
4191
4315
|
export type SessionChildrenData = {
|
|
4192
4316
|
body?: never;
|
|
4193
4317
|
path: {
|