@opencode-ai/sdk 1.0.222 → 1.0.224
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 +14 -1
- package/dist/v2/gen/sdk.gen.js +29 -0
- package/dist/v2/gen/types.gen.d.ts +128 -97
- 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, AppAgentsResponses, AppLogErrors, AppLogResponses, Auth as Auth2, AuthSetErrors, AuthSetResponses, CommandListResponses, Config as Config2, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiToastShow, FileListResponses, FilePartInput, FileReadResponses, FileStatusResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, InstanceDisposeResponses, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetResponses, PermissionListResponses, PermissionRespondErrors, PermissionRespondResponses, ProjectCurrentResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyUpdateErrors, PtyUpdateResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteResponses, SessionDiffErrors, SessionDiffResponses, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, 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, TuiShowToastResponses, TuiSubmitPromptResponses, VcsGetResponses } from "./types.gen.js";
|
|
2
|
+
import type { AgentPartInput, AppAgentsResponses, AppLogErrors, AppLogResponses, Auth as Auth2, AuthSetErrors, AuthSetResponses, CommandListResponses, Config as Config2, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiToastShow, FileListResponses, FilePartInput, FileReadResponses, FileStatusResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, InstanceDisposeResponses, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetResponses, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, ProjectCurrentResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyUpdateErrors, PtyUpdateResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteResponses, SessionDiffErrors, SessionDiffResponses, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, 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, TuiShowToastResponses, TuiSubmitPromptResponses, VcsGetResponses } 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
|
|
@@ -238,6 +238,7 @@ export declare class Session extends HeyApiClient {
|
|
|
238
238
|
directory?: string;
|
|
239
239
|
parentID?: string;
|
|
240
240
|
title?: string;
|
|
241
|
+
permission?: PermissionRuleset;
|
|
241
242
|
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionCreateResponses, SessionCreateErrors, ThrowOnError, "fields">;
|
|
242
243
|
/**
|
|
243
244
|
* Get session status
|
|
@@ -508,6 +509,8 @@ export declare class Permission extends HeyApiClient {
|
|
|
508
509
|
* Respond to permission
|
|
509
510
|
*
|
|
510
511
|
* Approve or deny a permission request from the AI assistant.
|
|
512
|
+
*
|
|
513
|
+
* @deprecated
|
|
511
514
|
*/
|
|
512
515
|
respond<ThrowOnError extends boolean = false>(parameters: {
|
|
513
516
|
sessionID: string;
|
|
@@ -515,6 +518,16 @@ export declare class Permission extends HeyApiClient {
|
|
|
515
518
|
directory?: string;
|
|
516
519
|
response?: "once" | "always" | "reject";
|
|
517
520
|
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PermissionRespondResponses, PermissionRespondErrors, ThrowOnError, "fields">;
|
|
521
|
+
/**
|
|
522
|
+
* Respond to permission request
|
|
523
|
+
*
|
|
524
|
+
* Approve or deny a permission request from the AI assistant.
|
|
525
|
+
*/
|
|
526
|
+
reply<ThrowOnError extends boolean = false>(parameters: {
|
|
527
|
+
requestID: string;
|
|
528
|
+
directory?: string;
|
|
529
|
+
reply?: "once" | "always" | "reject";
|
|
530
|
+
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PermissionReplyResponses, PermissionReplyErrors, ThrowOnError, "fields">;
|
|
518
531
|
/**
|
|
519
532
|
* List pending permissions
|
|
520
533
|
*
|
package/dist/v2/gen/sdk.gen.js
CHANGED
|
@@ -402,6 +402,7 @@ export class Session extends HeyApiClient {
|
|
|
402
402
|
{ in: "query", key: "directory" },
|
|
403
403
|
{ in: "body", key: "parentID" },
|
|
404
404
|
{ in: "body", key: "title" },
|
|
405
|
+
{ in: "body", key: "permission" },
|
|
405
406
|
],
|
|
406
407
|
},
|
|
407
408
|
]);
|
|
@@ -967,6 +968,8 @@ export class Permission extends HeyApiClient {
|
|
|
967
968
|
* Respond to permission
|
|
968
969
|
*
|
|
969
970
|
* Approve or deny a permission request from the AI assistant.
|
|
971
|
+
*
|
|
972
|
+
* @deprecated
|
|
970
973
|
*/
|
|
971
974
|
respond(parameters, options) {
|
|
972
975
|
const params = buildClientParams([parameters], [
|
|
@@ -990,6 +993,32 @@ export class Permission extends HeyApiClient {
|
|
|
990
993
|
},
|
|
991
994
|
});
|
|
992
995
|
}
|
|
996
|
+
/**
|
|
997
|
+
* Respond to permission request
|
|
998
|
+
*
|
|
999
|
+
* Approve or deny a permission request from the AI assistant.
|
|
1000
|
+
*/
|
|
1001
|
+
reply(parameters, options) {
|
|
1002
|
+
const params = buildClientParams([parameters], [
|
|
1003
|
+
{
|
|
1004
|
+
args: [
|
|
1005
|
+
{ in: "path", key: "requestID" },
|
|
1006
|
+
{ in: "query", key: "directory" },
|
|
1007
|
+
{ in: "body", key: "reply" },
|
|
1008
|
+
],
|
|
1009
|
+
},
|
|
1010
|
+
]);
|
|
1011
|
+
return (options?.client ?? this.client).post({
|
|
1012
|
+
url: "/permission/{requestID}/reply",
|
|
1013
|
+
...options,
|
|
1014
|
+
...params,
|
|
1015
|
+
headers: {
|
|
1016
|
+
"Content-Type": "application/json",
|
|
1017
|
+
...options?.headers,
|
|
1018
|
+
...params.headers,
|
|
1019
|
+
},
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
993
1022
|
/**
|
|
994
1023
|
* List pending permissions
|
|
995
1024
|
*
|
|
@@ -394,31 +394,59 @@ export type EventMessagePartRemoved = {
|
|
|
394
394
|
partID: string;
|
|
395
395
|
};
|
|
396
396
|
};
|
|
397
|
-
export type
|
|
397
|
+
export type PermissionRequest = {
|
|
398
398
|
id: string;
|
|
399
|
-
type: string;
|
|
400
|
-
pattern?: string | Array<string>;
|
|
401
399
|
sessionID: string;
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
title: string;
|
|
400
|
+
permission: string;
|
|
401
|
+
patterns: Array<string>;
|
|
405
402
|
metadata: {
|
|
406
403
|
[key: string]: unknown;
|
|
407
404
|
};
|
|
408
|
-
|
|
409
|
-
|
|
405
|
+
always: Array<string>;
|
|
406
|
+
tool?: {
|
|
407
|
+
messageID: string;
|
|
408
|
+
callID: string;
|
|
410
409
|
};
|
|
411
410
|
};
|
|
412
|
-
export type
|
|
413
|
-
type: "permission.
|
|
414
|
-
properties:
|
|
411
|
+
export type EventPermissionAsked = {
|
|
412
|
+
type: "permission.asked";
|
|
413
|
+
properties: PermissionRequest;
|
|
415
414
|
};
|
|
416
415
|
export type EventPermissionReplied = {
|
|
417
416
|
type: "permission.replied";
|
|
418
417
|
properties: {
|
|
419
418
|
sessionID: string;
|
|
420
|
-
|
|
421
|
-
|
|
419
|
+
requestID: string;
|
|
420
|
+
reply: "once" | "always" | "reject";
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
export type SessionStatus = {
|
|
424
|
+
type: "idle";
|
|
425
|
+
} | {
|
|
426
|
+
type: "retry";
|
|
427
|
+
attempt: number;
|
|
428
|
+
message: string;
|
|
429
|
+
next: number;
|
|
430
|
+
} | {
|
|
431
|
+
type: "busy";
|
|
432
|
+
};
|
|
433
|
+
export type EventSessionStatus = {
|
|
434
|
+
type: "session.status";
|
|
435
|
+
properties: {
|
|
436
|
+
sessionID: string;
|
|
437
|
+
status: SessionStatus;
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
export type EventSessionIdle = {
|
|
441
|
+
type: "session.idle";
|
|
442
|
+
properties: {
|
|
443
|
+
sessionID: string;
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
export type EventSessionCompacted = {
|
|
447
|
+
type: "session.compacted";
|
|
448
|
+
properties: {
|
|
449
|
+
sessionID: string;
|
|
422
450
|
};
|
|
423
451
|
};
|
|
424
452
|
export type EventFileEdited = {
|
|
@@ -452,35 +480,6 @@ export type EventTodoUpdated = {
|
|
|
452
480
|
todos: Array<Todo>;
|
|
453
481
|
};
|
|
454
482
|
};
|
|
455
|
-
export type SessionStatus = {
|
|
456
|
-
type: "idle";
|
|
457
|
-
} | {
|
|
458
|
-
type: "retry";
|
|
459
|
-
attempt: number;
|
|
460
|
-
message: string;
|
|
461
|
-
next: number;
|
|
462
|
-
} | {
|
|
463
|
-
type: "busy";
|
|
464
|
-
};
|
|
465
|
-
export type EventSessionStatus = {
|
|
466
|
-
type: "session.status";
|
|
467
|
-
properties: {
|
|
468
|
-
sessionID: string;
|
|
469
|
-
status: SessionStatus;
|
|
470
|
-
};
|
|
471
|
-
};
|
|
472
|
-
export type EventSessionIdle = {
|
|
473
|
-
type: "session.idle";
|
|
474
|
-
properties: {
|
|
475
|
-
sessionID: string;
|
|
476
|
-
};
|
|
477
|
-
};
|
|
478
|
-
export type EventSessionCompacted = {
|
|
479
|
-
type: "session.compacted";
|
|
480
|
-
properties: {
|
|
481
|
-
sessionID: string;
|
|
482
|
-
};
|
|
483
|
-
};
|
|
484
483
|
export type EventTuiPromptAppend = {
|
|
485
484
|
type: "tui.prompt.append";
|
|
486
485
|
properties: {
|
|
@@ -520,6 +519,13 @@ export type EventCommandExecuted = {
|
|
|
520
519
|
messageID: string;
|
|
521
520
|
};
|
|
522
521
|
};
|
|
522
|
+
export type PermissionAction = "allow" | "deny" | "ask";
|
|
523
|
+
export type PermissionRule = {
|
|
524
|
+
permission: string;
|
|
525
|
+
pattern: string;
|
|
526
|
+
action: PermissionAction;
|
|
527
|
+
};
|
|
528
|
+
export type PermissionRuleset = Array<PermissionRule>;
|
|
523
529
|
export type Session = {
|
|
524
530
|
id: string;
|
|
525
531
|
projectID: string;
|
|
@@ -542,6 +548,7 @@ export type Session = {
|
|
|
542
548
|
compacting?: number;
|
|
543
549
|
archived?: number;
|
|
544
550
|
};
|
|
551
|
+
permission?: PermissionRuleset;
|
|
545
552
|
revert?: {
|
|
546
553
|
messageID: string;
|
|
547
554
|
partID?: string;
|
|
@@ -640,7 +647,7 @@ export type EventGlobalDisposed = {
|
|
|
640
647
|
[key: string]: unknown;
|
|
641
648
|
};
|
|
642
649
|
};
|
|
643
|
-
export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved |
|
|
650
|
+
export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileEdited | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventMcpToolsChanged | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected | EventGlobalDisposed;
|
|
644
651
|
export type GlobalEvent = {
|
|
645
652
|
directory: string;
|
|
646
653
|
payload: Event;
|
|
@@ -1036,11 +1043,37 @@ export type ServerConfig = {
|
|
|
1036
1043
|
*/
|
|
1037
1044
|
cors?: Array<string>;
|
|
1038
1045
|
};
|
|
1046
|
+
export type PermissionActionConfig = "ask" | "allow" | "deny";
|
|
1047
|
+
export type PermissionObjectConfig = {
|
|
1048
|
+
[key: string]: PermissionActionConfig;
|
|
1049
|
+
};
|
|
1050
|
+
export type PermissionRuleConfig = PermissionActionConfig | PermissionObjectConfig;
|
|
1051
|
+
export type PermissionConfig = {
|
|
1052
|
+
read?: PermissionRuleConfig;
|
|
1053
|
+
edit?: PermissionRuleConfig;
|
|
1054
|
+
glob?: PermissionRuleConfig;
|
|
1055
|
+
grep?: PermissionRuleConfig;
|
|
1056
|
+
list?: PermissionRuleConfig;
|
|
1057
|
+
bash?: PermissionRuleConfig;
|
|
1058
|
+
task?: PermissionRuleConfig;
|
|
1059
|
+
external_directory?: PermissionRuleConfig;
|
|
1060
|
+
todowrite?: PermissionActionConfig;
|
|
1061
|
+
todoread?: PermissionActionConfig;
|
|
1062
|
+
webfetch?: PermissionActionConfig;
|
|
1063
|
+
websearch?: PermissionActionConfig;
|
|
1064
|
+
codesearch?: PermissionActionConfig;
|
|
1065
|
+
lsp?: PermissionRuleConfig;
|
|
1066
|
+
doom_loop?: PermissionActionConfig;
|
|
1067
|
+
[key: string]: PermissionRuleConfig | PermissionActionConfig | undefined;
|
|
1068
|
+
} | PermissionActionConfig;
|
|
1039
1069
|
export type AgentConfig = {
|
|
1040
1070
|
model?: string;
|
|
1041
1071
|
temperature?: number;
|
|
1042
1072
|
top_p?: number;
|
|
1043
1073
|
prompt?: string;
|
|
1074
|
+
/**
|
|
1075
|
+
* @deprecated Use 'permission' field instead
|
|
1076
|
+
*/
|
|
1044
1077
|
tools?: {
|
|
1045
1078
|
[key: string]: boolean;
|
|
1046
1079
|
};
|
|
@@ -1050,6 +1083,9 @@ export type AgentConfig = {
|
|
|
1050
1083
|
*/
|
|
1051
1084
|
description?: string;
|
|
1052
1085
|
mode?: "subagent" | "primary" | "all";
|
|
1086
|
+
options?: {
|
|
1087
|
+
[key: string]: unknown;
|
|
1088
|
+
};
|
|
1053
1089
|
/**
|
|
1054
1090
|
* Hex color code for the agent (e.g., #FF5733)
|
|
1055
1091
|
*/
|
|
@@ -1057,33 +1093,17 @@ export type AgentConfig = {
|
|
|
1057
1093
|
/**
|
|
1058
1094
|
* Maximum number of agentic iterations before forcing text-only response
|
|
1059
1095
|
*/
|
|
1096
|
+
steps?: number;
|
|
1097
|
+
/**
|
|
1098
|
+
* @deprecated Use 'steps' field instead.
|
|
1099
|
+
*/
|
|
1060
1100
|
maxSteps?: number;
|
|
1061
|
-
permission?:
|
|
1062
|
-
edit?: "ask" | "allow" | "deny";
|
|
1063
|
-
bash?: "ask" | "allow" | "deny" | {
|
|
1064
|
-
[key: string]: "ask" | "allow" | "deny";
|
|
1065
|
-
};
|
|
1066
|
-
skill?: "ask" | "allow" | "deny" | {
|
|
1067
|
-
[key: string]: "ask" | "allow" | "deny";
|
|
1068
|
-
};
|
|
1069
|
-
webfetch?: "ask" | "allow" | "deny";
|
|
1070
|
-
doom_loop?: "ask" | "allow" | "deny";
|
|
1071
|
-
external_directory?: "ask" | "allow" | "deny";
|
|
1072
|
-
};
|
|
1101
|
+
permission?: PermissionConfig;
|
|
1073
1102
|
[key: string]: unknown | string | number | {
|
|
1074
1103
|
[key: string]: boolean;
|
|
1075
|
-
} | boolean | "subagent" | "primary" | "all" |
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
[key: string]: "ask" | "allow" | "deny";
|
|
1079
|
-
};
|
|
1080
|
-
skill?: "ask" | "allow" | "deny" | {
|
|
1081
|
-
[key: string]: "ask" | "allow" | "deny";
|
|
1082
|
-
};
|
|
1083
|
-
webfetch?: "ask" | "allow" | "deny";
|
|
1084
|
-
doom_loop?: "ask" | "allow" | "deny";
|
|
1085
|
-
external_directory?: "ask" | "allow" | "deny";
|
|
1086
|
-
} | undefined;
|
|
1104
|
+
} | boolean | "subagent" | "primary" | "all" | {
|
|
1105
|
+
[key: string]: unknown;
|
|
1106
|
+
} | string | number | PermissionConfig | undefined;
|
|
1087
1107
|
};
|
|
1088
1108
|
export type ProviderConfig = {
|
|
1089
1109
|
api?: string;
|
|
@@ -1389,18 +1409,7 @@ export type Config = {
|
|
|
1389
1409
|
*/
|
|
1390
1410
|
instructions?: Array<string>;
|
|
1391
1411
|
layout?: LayoutConfig;
|
|
1392
|
-
permission?:
|
|
1393
|
-
edit?: "ask" | "allow" | "deny";
|
|
1394
|
-
bash?: "ask" | "allow" | "deny" | {
|
|
1395
|
-
[key: string]: "ask" | "allow" | "deny";
|
|
1396
|
-
};
|
|
1397
|
-
skill?: "ask" | "allow" | "deny" | {
|
|
1398
|
-
[key: string]: "ask" | "allow" | "deny";
|
|
1399
|
-
};
|
|
1400
|
-
webfetch?: "ask" | "allow" | "deny";
|
|
1401
|
-
doom_loop?: "ask" | "allow" | "deny";
|
|
1402
|
-
external_directory?: "ask" | "allow" | "deny";
|
|
1403
|
-
};
|
|
1412
|
+
permission?: PermissionConfig;
|
|
1404
1413
|
tools?: {
|
|
1405
1414
|
[key: string]: boolean;
|
|
1406
1415
|
};
|
|
@@ -1668,34 +1677,19 @@ export type Agent = {
|
|
|
1668
1677
|
mode: "subagent" | "primary" | "all";
|
|
1669
1678
|
native?: boolean;
|
|
1670
1679
|
hidden?: boolean;
|
|
1671
|
-
default?: boolean;
|
|
1672
1680
|
topP?: number;
|
|
1673
1681
|
temperature?: number;
|
|
1674
1682
|
color?: string;
|
|
1675
|
-
permission:
|
|
1676
|
-
edit: "ask" | "allow" | "deny";
|
|
1677
|
-
bash: {
|
|
1678
|
-
[key: string]: "ask" | "allow" | "deny";
|
|
1679
|
-
};
|
|
1680
|
-
skill: {
|
|
1681
|
-
[key: string]: "ask" | "allow" | "deny";
|
|
1682
|
-
};
|
|
1683
|
-
webfetch?: "ask" | "allow" | "deny";
|
|
1684
|
-
doom_loop?: "ask" | "allow" | "deny";
|
|
1685
|
-
external_directory?: "ask" | "allow" | "deny";
|
|
1686
|
-
};
|
|
1683
|
+
permission: PermissionRuleset;
|
|
1687
1684
|
model?: {
|
|
1688
1685
|
modelID: string;
|
|
1689
1686
|
providerID: string;
|
|
1690
1687
|
};
|
|
1691
1688
|
prompt?: string;
|
|
1692
|
-
tools: {
|
|
1693
|
-
[key: string]: boolean;
|
|
1694
|
-
};
|
|
1695
1689
|
options: {
|
|
1696
1690
|
[key: string]: unknown;
|
|
1697
1691
|
};
|
|
1698
|
-
|
|
1692
|
+
steps?: number;
|
|
1699
1693
|
};
|
|
1700
1694
|
export type McpStatusConnected = {
|
|
1701
1695
|
status: "connected";
|
|
@@ -2143,6 +2137,7 @@ export type SessionCreateData = {
|
|
|
2143
2137
|
body?: {
|
|
2144
2138
|
parentID?: string;
|
|
2145
2139
|
title?: string;
|
|
2140
|
+
permission?: PermissionRuleset;
|
|
2146
2141
|
};
|
|
2147
2142
|
path?: never;
|
|
2148
2143
|
query?: {
|
|
@@ -2585,6 +2580,9 @@ export type SessionPromptData = {
|
|
|
2585
2580
|
};
|
|
2586
2581
|
agent?: string;
|
|
2587
2582
|
noReply?: boolean;
|
|
2583
|
+
/**
|
|
2584
|
+
* @deprecated tools and permissions have been merged, you can set permissions on the session itself now
|
|
2585
|
+
*/
|
|
2588
2586
|
tools?: {
|
|
2589
2587
|
[key: string]: boolean;
|
|
2590
2588
|
};
|
|
@@ -2749,6 +2747,9 @@ export type SessionPromptAsyncData = {
|
|
|
2749
2747
|
};
|
|
2750
2748
|
agent?: string;
|
|
2751
2749
|
noReply?: boolean;
|
|
2750
|
+
/**
|
|
2751
|
+
* @deprecated tools and permissions have been merged, you can set permissions on the session itself now
|
|
2752
|
+
*/
|
|
2752
2753
|
tools?: {
|
|
2753
2754
|
[key: string]: boolean;
|
|
2754
2755
|
};
|
|
@@ -2954,6 +2955,36 @@ export type PermissionRespondResponses = {
|
|
|
2954
2955
|
200: boolean;
|
|
2955
2956
|
};
|
|
2956
2957
|
export type PermissionRespondResponse = PermissionRespondResponses[keyof PermissionRespondResponses];
|
|
2958
|
+
export type PermissionReplyData = {
|
|
2959
|
+
body?: {
|
|
2960
|
+
reply: "once" | "always" | "reject";
|
|
2961
|
+
};
|
|
2962
|
+
path: {
|
|
2963
|
+
requestID: string;
|
|
2964
|
+
};
|
|
2965
|
+
query?: {
|
|
2966
|
+
directory?: string;
|
|
2967
|
+
};
|
|
2968
|
+
url: "/permission/{requestID}/reply";
|
|
2969
|
+
};
|
|
2970
|
+
export type PermissionReplyErrors = {
|
|
2971
|
+
/**
|
|
2972
|
+
* Bad request
|
|
2973
|
+
*/
|
|
2974
|
+
400: BadRequestError;
|
|
2975
|
+
/**
|
|
2976
|
+
* Not found
|
|
2977
|
+
*/
|
|
2978
|
+
404: NotFoundError;
|
|
2979
|
+
};
|
|
2980
|
+
export type PermissionReplyError = PermissionReplyErrors[keyof PermissionReplyErrors];
|
|
2981
|
+
export type PermissionReplyResponses = {
|
|
2982
|
+
/**
|
|
2983
|
+
* Permission processed successfully
|
|
2984
|
+
*/
|
|
2985
|
+
200: boolean;
|
|
2986
|
+
};
|
|
2987
|
+
export type PermissionReplyResponse = PermissionReplyResponses[keyof PermissionReplyResponses];
|
|
2957
2988
|
export type PermissionListData = {
|
|
2958
2989
|
body?: never;
|
|
2959
2990
|
path?: never;
|
|
@@ -2966,7 +2997,7 @@ export type PermissionListResponses = {
|
|
|
2966
2997
|
/**
|
|
2967
2998
|
* List of pending permissions
|
|
2968
2999
|
*/
|
|
2969
|
-
200: Array<
|
|
3000
|
+
200: Array<PermissionRequest>;
|
|
2970
3001
|
};
|
|
2971
3002
|
export type PermissionListResponse = PermissionListResponses[keyof PermissionListResponses];
|
|
2972
3003
|
export type CommandListData = {
|