@serviceme/devtools-protocol 0.2.0 → 0.3.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/index.d.mts +24 -4
- package/dist/index.d.ts +24 -4
- package/dist/index.js +19 -18
- package/dist/index.mjs +18 -18
- package/package.json +2 -1
- package/dist/bridge.d.ts +0 -159
- package/dist/bridge.js +0 -139
- package/dist/bridge.js.map +0 -1
- package/dist/cli.d.ts +0 -16
- package/dist/cli.js +0 -31
- package/dist/cli.js.map +0 -1
- package/dist/env.d.ts +0 -12
- package/dist/env.js +0 -32
- package/dist/env.js.map +0 -1
- package/dist/errors.d.ts +0 -25
- package/dist/errors.js +0 -98
- package/dist/errors.js.map +0 -1
- package/dist/image.d.ts +0 -31
- package/dist/image.js +0 -43
- package/dist/image.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/json.d.ts +0 -20
- package/dist/json.js +0 -33
- package/dist/json.js.map +0 -1
- package/dist/metadata.d.ts +0 -10
- package/dist/metadata.js +0 -11
- package/dist/metadata.js.map +0 -1
- package/dist/opencode.d.ts +0 -46
- package/dist/opencode.js +0 -58
- package/dist/opencode.js.map +0 -1
- package/dist/project.d.ts +0 -32
- package/dist/project.js +0 -37
- package/dist/project.js.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -490,6 +490,7 @@ interface BridgeRepoEntry {
|
|
|
490
490
|
url: string;
|
|
491
491
|
branch: string;
|
|
492
492
|
enabled: boolean;
|
|
493
|
+
useProxy?: boolean;
|
|
493
494
|
writeEnabled: boolean;
|
|
494
495
|
source: "default" | "user";
|
|
495
496
|
description?: string;
|
|
@@ -521,6 +522,8 @@ interface RepoAddParams {
|
|
|
521
522
|
branch?: string;
|
|
522
523
|
/** Optional display name. */
|
|
523
524
|
name?: string;
|
|
525
|
+
/** Route git traffic via the server proxy (default true). */
|
|
526
|
+
useProxy?: boolean;
|
|
524
527
|
}
|
|
525
528
|
interface RepoAddResult {
|
|
526
529
|
repo: BridgeRepoEntry;
|
|
@@ -548,6 +551,18 @@ interface RepoDisableParams {
|
|
|
548
551
|
interface RepoDisableResult {
|
|
549
552
|
repo: BridgeRepoEntry;
|
|
550
553
|
}
|
|
554
|
+
/** `repo.update` — update editable fields of an existing repo. */
|
|
555
|
+
interface RepoUpdateParams {
|
|
556
|
+
repoId: string;
|
|
557
|
+
url?: string;
|
|
558
|
+
branch?: string;
|
|
559
|
+
name?: string;
|
|
560
|
+
enabled?: boolean;
|
|
561
|
+
useProxy?: boolean;
|
|
562
|
+
}
|
|
563
|
+
interface RepoUpdateResult {
|
|
564
|
+
repo: BridgeRepoEntry;
|
|
565
|
+
}
|
|
551
566
|
/** `repo.sync` — pull a single repo. */
|
|
552
567
|
interface RepoSyncParams {
|
|
553
568
|
repoId: string;
|
|
@@ -556,7 +571,7 @@ interface RepoSyncResult {
|
|
|
556
571
|
pulls: [BridgeRepoSyncPull];
|
|
557
572
|
}
|
|
558
573
|
/** `repo.syncAll` — pull every enabled repo. */
|
|
559
|
-
type RepoSyncAllParams =
|
|
574
|
+
type RepoSyncAllParams = Record<string, never>;
|
|
560
575
|
interface RepoSyncAllResult {
|
|
561
576
|
pulls: BridgeRepoSyncPull[];
|
|
562
577
|
}
|
|
@@ -575,6 +590,7 @@ declare function isRepoAddResult(value: unknown): value is RepoAddResult;
|
|
|
575
590
|
declare function isRepoRemoveResult(value: unknown): value is RepoRemoveResult;
|
|
576
591
|
declare function isRepoEnableResult(value: unknown): value is RepoEnableResult;
|
|
577
592
|
declare function isRepoDisableResult(value: unknown): value is RepoDisableResult;
|
|
593
|
+
declare function isRepoUpdateResult(value: unknown): value is RepoUpdateResult;
|
|
578
594
|
declare function isRepoSyncResult(value: unknown): value is RepoSyncResult;
|
|
579
595
|
declare function isRepoSyncAllResult(value: unknown): value is RepoSyncAllResult;
|
|
580
596
|
declare function isSkillRepoListParams(value: unknown): value is SkillRepoListParams;
|
|
@@ -1235,6 +1251,10 @@ interface BridgeMethodMap {
|
|
|
1235
1251
|
params: RepoDisableParams;
|
|
1236
1252
|
result: RepoDisableResult;
|
|
1237
1253
|
};
|
|
1254
|
+
"repo.update": {
|
|
1255
|
+
params: RepoUpdateParams;
|
|
1256
|
+
result: RepoUpdateResult;
|
|
1257
|
+
};
|
|
1238
1258
|
"repo.sync": {
|
|
1239
1259
|
params: RepoSyncParams;
|
|
1240
1260
|
result: RepoSyncResult;
|
|
@@ -1292,7 +1312,7 @@ interface BridgeMethodMap {
|
|
|
1292
1312
|
result: ToolboxUpdateResult;
|
|
1293
1313
|
};
|
|
1294
1314
|
}
|
|
1295
|
-
declare const BRIDGE_METHODS: readonly ["system.hello", "system.ping", "system.shutdown", "task.execute", "task.cancel", "task.list-running", "skillRepo.list", "skillRepo.get", "skillRepo.install", "skillRepo.convertToSymlink", "skillRepo.uninstall", "skillRepo.listLinked", "skillRepo.draft.create", "skillRepo.draft.commit", "skillRepo.draft.list", "skillRepo.draft.delete", "repo.list", "repo.add", "repo.remove", "repo.enable", "repo.disable", "repo.sync", "repo.syncAll", "auth.status", "auth.login", "auth.logout", "auth.whoami", "auth.switch", "device.status", "device.enroll", "device.rotate-secret", "toolbox.list", "toolbox.add", "toolbox.remove", "toolbox.update"];
|
|
1315
|
+
declare const BRIDGE_METHODS: readonly ["system.hello", "system.ping", "system.shutdown", "task.execute", "task.cancel", "task.list-running", "skillRepo.list", "skillRepo.get", "skillRepo.install", "skillRepo.convertToSymlink", "skillRepo.uninstall", "skillRepo.listLinked", "skillRepo.draft.create", "skillRepo.draft.commit", "skillRepo.draft.list", "skillRepo.draft.delete", "repo.list", "repo.add", "repo.remove", "repo.enable", "repo.disable", "repo.update", "repo.sync", "repo.syncAll", "auth.status", "auth.login", "auth.logout", "auth.whoami", "auth.switch", "device.status", "device.enroll", "device.rotate-secret", "toolbox.list", "toolbox.add", "toolbox.remove", "toolbox.update"];
|
|
1296
1316
|
type BridgeMethod = keyof BridgeMethodMap;
|
|
1297
1317
|
type BridgeParams<M extends BridgeMethod> = BridgeMethodMap[M]["params"];
|
|
1298
1318
|
type BridgeResult<M extends BridgeMethod> = BridgeMethodMap[M]["result"];
|
|
@@ -1551,7 +1571,7 @@ interface LocalPublishableAgent {
|
|
|
1551
1571
|
}
|
|
1552
1572
|
|
|
1553
1573
|
declare const SERVICEME_CLI_NAME = "serviceme";
|
|
1554
|
-
declare const SERVICEME_CLI_VERSION = "0.
|
|
1574
|
+
declare const SERVICEME_CLI_VERSION = "0.3.0";
|
|
1555
1575
|
declare const SERVICEME_CLI_CAPABILITIES: {
|
|
1556
1576
|
readonly bridge: true;
|
|
1557
1577
|
readonly tasks: 1;
|
|
@@ -1684,4 +1704,4 @@ declare function isSkillMutationResult(value: unknown): value is SkillMutationRe
|
|
|
1684
1704
|
declare function isSkillReconcileResult(value: unknown): value is SkillReconcileResult;
|
|
1685
1705
|
declare function isSkillPublishableResult(value: unknown): value is SkillPublishableResult;
|
|
1686
1706
|
|
|
1687
|
-
export { AUTH_PROVIDERS, type AgentDownloadFile, type AgentMarketplaceEntry, type AgentMarketplaceState, type AgentMutationAction, type AgentMutationRequest, type AgentMutationResult, type AgentOwnerKind, type AgentPermissionSummary, type AgentPermissionsResult, type AgentScope, type AgentScopeState, type AgentScopeStatus, type AgentSessionStatus, type AgentToolPermission, type AgentToolRiskLevel, type AuthAccountMeta, type AuthLoginParams, type AuthLoginResult, type AuthLogoutParams, type AuthLogoutResult, type AuthProvider, type AuthSessionHandle, type AuthStatus, type AuthStatusParams, type AuthSwitchParams, type AuthSwitchResult, type AuthTokenEnvelope, type AuthWhoamiResult, BRIDGE_EVENTS, BRIDGE_METHODS, type BridgeCapabilities, type BridgeErrorResponse, type BridgeEvent, type BridgeEventMap, type BridgeEventName, type BridgeEventParams, type BridgeLinkMode, type BridgeLinkedSkill, type BridgeMessage, type BridgeMethod, type BridgeMethodMap, type BridgeParams, type BridgeRepoEntry, type BridgeRepoSyncPull, type BridgeRequest, type BridgeResponse, type BridgeResult, type BridgeSkillKind, type BridgeSkillRepoDetail, type BridgeSkillRepoEntry, type BridgeSkillRepoFile, type BridgeSuccessResponse, COPILOT_ERROR_CODES, type CliEnvelope, type CliFailure, type CliSuccess, type CommandPayload, type ConcurrencyPolicy, type CopilotDoctorResult, type CopilotPromptOptions, type CopilotPromptResult, DEFAULT_JSON_SORT_OPTIONS, DEVICE_BINDING_STATES, type DeviceBindingState, type DeviceEnrollParams, type DeviceEnrollResult, type DeviceIdentityState, type DeviceMetadata, type DeviceRotateSecretParams, type DeviceRotateSecretResult, type DeviceSecret, type DeviceStatus, type DeviceStatusParams, type EnvironmentCheckResult, type ExternalTool, type ExternalToolPatch, type GithubCopilotCliPayload, type HttpRequestPayload, JSON_SORT_ALGORITHMS, JSON_SORT_ORDERS, type JsonSortAlgorithm, type JsonSortOptions, type JsonSortOrder, type JsonValidationResult, KNOWN_ENVIRONMENT_TOOLS, type KnownEnvironmentTool, type LocalPublishableAgent, type LocalPublishableSkill, type MarketplaceAgentItem, type MarketplaceAgentsCatalog, type MarketplaceCatalog, type MarketplaceSkillItem, type MigratedTask, type PublishableSkillEntry, type RepoAddParams, type RepoAddResult, type RepoDisableParams, type RepoDisableResult, type RepoEnableParams, type RepoEnableResult, type RepoListParams, type RepoListResult, type RepoRemoveParams, type RepoRemoveResult, type RepoSyncAllParams, type RepoSyncAllResult, type RepoSyncParams, type RepoSyncResult, type RunningTaskInfo, SERVICEME_CLI_CAPABILITIES, SERVICEME_CLI_NAME, SERVICEME_CLI_SCHEMA_VERSION, SERVICEME_CLI_VERSION, SERVICEME_ERROR_CODES, SERVICEME_IMAGE_FORMATS, SERVICEME_PROTOCOL_VERSION, type ScheduleCreateDryRunResult, type ScheduleCreateResult, type ScheduleDeleteDryRunResult, type ScheduleDeleteResult, type ScheduleEditDryRunResult, type ScheduleEditResult, type ScheduleGetResult, type ScheduleListResult, type ScheduleLogsResult, type ScheduleToggleResult, type ScheduleTriggerResult, type ScheduledTask, type ScheduledTaskType, type ScheduledTaskV1, type ScheduledTasksConfig, type ScheduledTasksConfigV1, type ScheduledTasksLogFile, type SchedulerStartResult, type SchedulerStatus, type SchedulerStopResult, type SecretToken, type ServiceMeImageCompressOptions, type ServiceMeImageCompressResult, type ServiceMeImageFormat, type ServiceMeImageInfo, type ServiceMeImageValidationResult, type ServiceMeProjectExtractTemplateInput, type ServiceMeProjectExtractTemplateResult, type ServiceMeProjectGitInitResult, type ServiceMeProjectInstallDepsResult, type ServiceMeProjectMakeScriptsExecutableResult, type ServiceMeProjectScaffoldPruneResult, type ServicemeErrorCode, type ServicemeErrorDetails, ServicemeProtocolError, type ShellPayload, type SkillDownloadFile, type SkillMarketplaceEntry, type SkillMarketplaceState, type SkillMutationAction, type SkillMutationRequest, type SkillMutationResult, type SkillOwnerKind, type SkillPublishableResult, type SkillReconcileResult, type SkillRepoConvertToSymlinkParams, type SkillRepoConvertToSymlinkResult, type SkillRepoDraftCommitParams, type SkillRepoDraftCommitResult, type SkillRepoDraftCreateParams, type SkillRepoDraftCreateResult, type SkillRepoDraftDeleteParams, type SkillRepoDraftDeleteResult, type SkillRepoDraftListParams, type SkillRepoDraftListResult, type SkillRepoGetParams, type SkillRepoGetResult, type SkillRepoInstallParams, type SkillRepoInstallResult, type SkillRepoListLinkedParams, type SkillRepoListLinkedResult, type SkillRepoListParams, type SkillRepoListResult, type SkillRepoUninstallParams, type SkillRepoUninstallResult, type SkillScope, type SkillScopeState, type SkillScopeStatus, type SubmitToOfficialPayload, type SubmitToOfficialResult, type SupportedBridgeProtocolVersion, TOOLBOX_SCOPES, type TaskCancelResult, type TaskCancelledEventParams, type TaskCompletedEventParams, type TaskExecuteResult, type TaskExecutionLog, type TaskExecutionSnapshot, type TaskExecutionStatus, type TaskFailedEventParams, type TaskListRunningResult, type TaskOutputEventParams, type TaskPayload, type TaskRunStatus, type TaskStartedEventParams, type TaskTriggerType, type TaskWorkspaceRef, type ToolCheckResult, type ToolboxAddParams, type ToolboxAddResult, type ToolboxList, type ToolboxListParams, type ToolboxListResult, type ToolboxRemoveParams, type ToolboxRemoveResult, type ToolboxScope, type ToolboxUpdateParams, type ToolboxUpdateResult, type UploadAgentPayload, type UploadFile, type UploadSkillPayload, createCliFailure, createCliSuccess, createServicemeError, getBridgeEventParamsValidator, getBridgeResultValidator, isAgentMarketplaceState, isAgentMutationRequest, isAgentMutationResult, isAgentPermissionSummary, isAgentPermissionsResult, isAgentSessionStatus, isAuthAccountMeta, isAuthLoginParams, isAuthLoginResult, isAuthLogoutParams, isAuthLogoutResult, isAuthProvider, isAuthSessionHandle, isAuthStatus, isAuthSwitchParams, isAuthSwitchResult, isAuthWhoamiResult, isBridgeCapabilities, isBridgeEvent, isBridgeEventName, isBridgeMethod, isBridgeRequest, isBridgeResponse, isCliEnvelope, isDeviceBindingState, isDeviceEnrollParams, isDeviceEnrollResult, isDeviceIdentityState, isDeviceMetadata, isDeviceRotateSecretParams, isDeviceRotateSecretResult, isDeviceStatus, isEnvironmentCheckResult, isExternalTool, isExternalToolPatch, isJsonOutputResult, isJsonSortAlgorithm, isJsonSortOptions, isJsonSortOrder, isJsonValidationResult, isKnownEnvironmentTool, isRepoAddParams, isRepoAddResult, isRepoDisableParams, isRepoDisableResult, isRepoEnableParams, isRepoEnableResult, isRepoListParams, isRepoListResult, isRepoRemoveParams, isRepoRemoveResult, isRepoSyncAllParams, isRepoSyncAllResult, isRepoSyncParams, isRepoSyncResult, isRetryableErrorCode, isScheduledTask, isScheduledTaskType, isScheduledTaskV1, isScheduledTasksConfig, isScheduledTasksConfigV1, isSchedulerStatus, isServiceMeImageCompressOptions, isServiceMeImageCompressResult, isServiceMeImageFormat, isServiceMeImageInfo, isServiceMeImageValidationResult, isServiceMeProjectExtractTemplateInput, isServiceMeProjectExtractTemplateResult, isServiceMeProjectGitInitResult, isServiceMeProjectInstallDepsResult, isServiceMeProjectMakeScriptsExecutableResult, isServiceMeProjectScaffoldPruneResult, isServicemeErrorCode, isServicemeErrorDetails, isSkillMarketplaceState, isSkillMutationRequest, isSkillMutationResult, isSkillPublishableResult, isSkillReconcileResult, isSkillRepoConvertToSymlinkParams, isSkillRepoConvertToSymlinkResult, isSkillRepoDraftCommitResult, isSkillRepoDraftCreateResult, isSkillRepoDraftDeleteResult, isSkillRepoDraftListResult, isSkillRepoGetParams, isSkillRepoGetResult, isSkillRepoInstallParams, isSkillRepoInstallResult, isSkillRepoListLinkedParams, isSkillRepoListLinkedResult, isSkillRepoListParams, isSkillRepoListResult, isSkillRepoUninstallParams, isSkillRepoUninstallResult, isSystemHelloResult, isSystemPingResult, isSystemShutdownResult, isTaskCancelResult, isTaskCancelledEventParams, isTaskCompletedEventParams, isTaskExecuteResult, isTaskExecutionLog, isTaskFailedEventParams, isTaskListRunningResult, isTaskOutputEventParams, isTaskStartedEventParams, isTaskWorkspaceRef, isToolCheckResult, isToolboxAddParams, isToolboxAddResult, isToolboxList, isToolboxListParams, isToolboxRemoveParams, isToolboxRemoveResult, isToolboxScope, isToolboxUpdateParams, isToolboxUpdateResult, migrateTaskV1ToV2, migrateV1ToV2, normalizeServicemeError };
|
|
1707
|
+
export { AUTH_PROVIDERS, type AgentDownloadFile, type AgentMarketplaceEntry, type AgentMarketplaceState, type AgentMutationAction, type AgentMutationRequest, type AgentMutationResult, type AgentOwnerKind, type AgentPermissionSummary, type AgentPermissionsResult, type AgentScope, type AgentScopeState, type AgentScopeStatus, type AgentSessionStatus, type AgentToolPermission, type AgentToolRiskLevel, type AuthAccountMeta, type AuthLoginParams, type AuthLoginResult, type AuthLogoutParams, type AuthLogoutResult, type AuthProvider, type AuthSessionHandle, type AuthStatus, type AuthStatusParams, type AuthSwitchParams, type AuthSwitchResult, type AuthTokenEnvelope, type AuthWhoamiResult, BRIDGE_EVENTS, BRIDGE_METHODS, type BridgeCapabilities, type BridgeErrorResponse, type BridgeEvent, type BridgeEventMap, type BridgeEventName, type BridgeEventParams, type BridgeLinkMode, type BridgeLinkedSkill, type BridgeMessage, type BridgeMethod, type BridgeMethodMap, type BridgeParams, type BridgeRepoEntry, type BridgeRepoSyncPull, type BridgeRequest, type BridgeResponse, type BridgeResult, type BridgeSkillKind, type BridgeSkillRepoDetail, type BridgeSkillRepoEntry, type BridgeSkillRepoFile, type BridgeSuccessResponse, COPILOT_ERROR_CODES, type CliEnvelope, type CliFailure, type CliSuccess, type CommandPayload, type ConcurrencyPolicy, type CopilotDoctorResult, type CopilotPromptOptions, type CopilotPromptResult, DEFAULT_JSON_SORT_OPTIONS, DEVICE_BINDING_STATES, type DeviceBindingState, type DeviceEnrollParams, type DeviceEnrollResult, type DeviceIdentityState, type DeviceMetadata, type DeviceRotateSecretParams, type DeviceRotateSecretResult, type DeviceSecret, type DeviceStatus, type DeviceStatusParams, type EnvironmentCheckResult, type ExternalTool, type ExternalToolPatch, type GithubCopilotCliPayload, type HttpRequestPayload, JSON_SORT_ALGORITHMS, JSON_SORT_ORDERS, type JsonSortAlgorithm, type JsonSortOptions, type JsonSortOrder, type JsonValidationResult, KNOWN_ENVIRONMENT_TOOLS, type KnownEnvironmentTool, type LocalPublishableAgent, type LocalPublishableSkill, type MarketplaceAgentItem, type MarketplaceAgentsCatalog, type MarketplaceCatalog, type MarketplaceSkillItem, type MigratedTask, type PublishableSkillEntry, type RepoAddParams, type RepoAddResult, type RepoDisableParams, type RepoDisableResult, type RepoEnableParams, type RepoEnableResult, type RepoListParams, type RepoListResult, type RepoRemoveParams, type RepoRemoveResult, type RepoSyncAllParams, type RepoSyncAllResult, type RepoSyncParams, type RepoSyncResult, type RepoUpdateParams, type RepoUpdateResult, type RunningTaskInfo, SERVICEME_CLI_CAPABILITIES, SERVICEME_CLI_NAME, SERVICEME_CLI_SCHEMA_VERSION, SERVICEME_CLI_VERSION, SERVICEME_ERROR_CODES, SERVICEME_IMAGE_FORMATS, SERVICEME_PROTOCOL_VERSION, type ScheduleCreateDryRunResult, type ScheduleCreateResult, type ScheduleDeleteDryRunResult, type ScheduleDeleteResult, type ScheduleEditDryRunResult, type ScheduleEditResult, type ScheduleGetResult, type ScheduleListResult, type ScheduleLogsResult, type ScheduleToggleResult, type ScheduleTriggerResult, type ScheduledTask, type ScheduledTaskType, type ScheduledTaskV1, type ScheduledTasksConfig, type ScheduledTasksConfigV1, type ScheduledTasksLogFile, type SchedulerStartResult, type SchedulerStatus, type SchedulerStopResult, type SecretToken, type ServiceMeImageCompressOptions, type ServiceMeImageCompressResult, type ServiceMeImageFormat, type ServiceMeImageInfo, type ServiceMeImageValidationResult, type ServiceMeProjectExtractTemplateInput, type ServiceMeProjectExtractTemplateResult, type ServiceMeProjectGitInitResult, type ServiceMeProjectInstallDepsResult, type ServiceMeProjectMakeScriptsExecutableResult, type ServiceMeProjectScaffoldPruneResult, type ServicemeErrorCode, type ServicemeErrorDetails, ServicemeProtocolError, type ShellPayload, type SkillDownloadFile, type SkillMarketplaceEntry, type SkillMarketplaceState, type SkillMutationAction, type SkillMutationRequest, type SkillMutationResult, type SkillOwnerKind, type SkillPublishableResult, type SkillReconcileResult, type SkillRepoConvertToSymlinkParams, type SkillRepoConvertToSymlinkResult, type SkillRepoDraftCommitParams, type SkillRepoDraftCommitResult, type SkillRepoDraftCreateParams, type SkillRepoDraftCreateResult, type SkillRepoDraftDeleteParams, type SkillRepoDraftDeleteResult, type SkillRepoDraftListParams, type SkillRepoDraftListResult, type SkillRepoGetParams, type SkillRepoGetResult, type SkillRepoInstallParams, type SkillRepoInstallResult, type SkillRepoListLinkedParams, type SkillRepoListLinkedResult, type SkillRepoListParams, type SkillRepoListResult, type SkillRepoUninstallParams, type SkillRepoUninstallResult, type SkillScope, type SkillScopeState, type SkillScopeStatus, type SubmitToOfficialPayload, type SubmitToOfficialResult, type SupportedBridgeProtocolVersion, TOOLBOX_SCOPES, type TaskCancelResult, type TaskCancelledEventParams, type TaskCompletedEventParams, type TaskExecuteResult, type TaskExecutionLog, type TaskExecutionSnapshot, type TaskExecutionStatus, type TaskFailedEventParams, type TaskListRunningResult, type TaskOutputEventParams, type TaskPayload, type TaskRunStatus, type TaskStartedEventParams, type TaskTriggerType, type TaskWorkspaceRef, type ToolCheckResult, type ToolboxAddParams, type ToolboxAddResult, type ToolboxList, type ToolboxListParams, type ToolboxListResult, type ToolboxRemoveParams, type ToolboxRemoveResult, type ToolboxScope, type ToolboxUpdateParams, type ToolboxUpdateResult, type UploadAgentPayload, type UploadFile, type UploadSkillPayload, createCliFailure, createCliSuccess, createServicemeError, getBridgeEventParamsValidator, getBridgeResultValidator, isAgentMarketplaceState, isAgentMutationRequest, isAgentMutationResult, isAgentPermissionSummary, isAgentPermissionsResult, isAgentSessionStatus, isAuthAccountMeta, isAuthLoginParams, isAuthLoginResult, isAuthLogoutParams, isAuthLogoutResult, isAuthProvider, isAuthSessionHandle, isAuthStatus, isAuthSwitchParams, isAuthSwitchResult, isAuthWhoamiResult, isBridgeCapabilities, isBridgeEvent, isBridgeEventName, isBridgeMethod, isBridgeRequest, isBridgeResponse, isCliEnvelope, isDeviceBindingState, isDeviceEnrollParams, isDeviceEnrollResult, isDeviceIdentityState, isDeviceMetadata, isDeviceRotateSecretParams, isDeviceRotateSecretResult, isDeviceStatus, isEnvironmentCheckResult, isExternalTool, isExternalToolPatch, isJsonOutputResult, isJsonSortAlgorithm, isJsonSortOptions, isJsonSortOrder, isJsonValidationResult, isKnownEnvironmentTool, isRepoAddParams, isRepoAddResult, isRepoDisableParams, isRepoDisableResult, isRepoEnableParams, isRepoEnableResult, isRepoListParams, isRepoListResult, isRepoRemoveParams, isRepoRemoveResult, isRepoSyncAllParams, isRepoSyncAllResult, isRepoSyncParams, isRepoSyncResult, isRepoUpdateResult, isRetryableErrorCode, isScheduledTask, isScheduledTaskType, isScheduledTaskV1, isScheduledTasksConfig, isScheduledTasksConfigV1, isSchedulerStatus, isServiceMeImageCompressOptions, isServiceMeImageCompressResult, isServiceMeImageFormat, isServiceMeImageInfo, isServiceMeImageValidationResult, isServiceMeProjectExtractTemplateInput, isServiceMeProjectExtractTemplateResult, isServiceMeProjectGitInitResult, isServiceMeProjectInstallDepsResult, isServiceMeProjectMakeScriptsExecutableResult, isServiceMeProjectScaffoldPruneResult, isServicemeErrorCode, isServicemeErrorDetails, isSkillMarketplaceState, isSkillMutationRequest, isSkillMutationResult, isSkillPublishableResult, isSkillReconcileResult, isSkillRepoConvertToSymlinkParams, isSkillRepoConvertToSymlinkResult, isSkillRepoDraftCommitResult, isSkillRepoDraftCreateResult, isSkillRepoDraftDeleteResult, isSkillRepoDraftListResult, isSkillRepoGetParams, isSkillRepoGetResult, isSkillRepoInstallParams, isSkillRepoInstallResult, isSkillRepoListLinkedParams, isSkillRepoListLinkedResult, isSkillRepoListParams, isSkillRepoListResult, isSkillRepoUninstallParams, isSkillRepoUninstallResult, isSystemHelloResult, isSystemPingResult, isSystemShutdownResult, isTaskCancelResult, isTaskCancelledEventParams, isTaskCompletedEventParams, isTaskExecuteResult, isTaskExecutionLog, isTaskFailedEventParams, isTaskListRunningResult, isTaskOutputEventParams, isTaskStartedEventParams, isTaskWorkspaceRef, isToolCheckResult, isToolboxAddParams, isToolboxAddResult, isToolboxList, isToolboxListParams, isToolboxRemoveParams, isToolboxRemoveResult, isToolboxScope, isToolboxUpdateParams, isToolboxUpdateResult, migrateTaskV1ToV2, migrateV1ToV2, normalizeServicemeError };
|
package/dist/index.d.ts
CHANGED
|
@@ -490,6 +490,7 @@ interface BridgeRepoEntry {
|
|
|
490
490
|
url: string;
|
|
491
491
|
branch: string;
|
|
492
492
|
enabled: boolean;
|
|
493
|
+
useProxy?: boolean;
|
|
493
494
|
writeEnabled: boolean;
|
|
494
495
|
source: "default" | "user";
|
|
495
496
|
description?: string;
|
|
@@ -521,6 +522,8 @@ interface RepoAddParams {
|
|
|
521
522
|
branch?: string;
|
|
522
523
|
/** Optional display name. */
|
|
523
524
|
name?: string;
|
|
525
|
+
/** Route git traffic via the server proxy (default true). */
|
|
526
|
+
useProxy?: boolean;
|
|
524
527
|
}
|
|
525
528
|
interface RepoAddResult {
|
|
526
529
|
repo: BridgeRepoEntry;
|
|
@@ -548,6 +551,18 @@ interface RepoDisableParams {
|
|
|
548
551
|
interface RepoDisableResult {
|
|
549
552
|
repo: BridgeRepoEntry;
|
|
550
553
|
}
|
|
554
|
+
/** `repo.update` — update editable fields of an existing repo. */
|
|
555
|
+
interface RepoUpdateParams {
|
|
556
|
+
repoId: string;
|
|
557
|
+
url?: string;
|
|
558
|
+
branch?: string;
|
|
559
|
+
name?: string;
|
|
560
|
+
enabled?: boolean;
|
|
561
|
+
useProxy?: boolean;
|
|
562
|
+
}
|
|
563
|
+
interface RepoUpdateResult {
|
|
564
|
+
repo: BridgeRepoEntry;
|
|
565
|
+
}
|
|
551
566
|
/** `repo.sync` — pull a single repo. */
|
|
552
567
|
interface RepoSyncParams {
|
|
553
568
|
repoId: string;
|
|
@@ -556,7 +571,7 @@ interface RepoSyncResult {
|
|
|
556
571
|
pulls: [BridgeRepoSyncPull];
|
|
557
572
|
}
|
|
558
573
|
/** `repo.syncAll` — pull every enabled repo. */
|
|
559
|
-
type RepoSyncAllParams =
|
|
574
|
+
type RepoSyncAllParams = Record<string, never>;
|
|
560
575
|
interface RepoSyncAllResult {
|
|
561
576
|
pulls: BridgeRepoSyncPull[];
|
|
562
577
|
}
|
|
@@ -575,6 +590,7 @@ declare function isRepoAddResult(value: unknown): value is RepoAddResult;
|
|
|
575
590
|
declare function isRepoRemoveResult(value: unknown): value is RepoRemoveResult;
|
|
576
591
|
declare function isRepoEnableResult(value: unknown): value is RepoEnableResult;
|
|
577
592
|
declare function isRepoDisableResult(value: unknown): value is RepoDisableResult;
|
|
593
|
+
declare function isRepoUpdateResult(value: unknown): value is RepoUpdateResult;
|
|
578
594
|
declare function isRepoSyncResult(value: unknown): value is RepoSyncResult;
|
|
579
595
|
declare function isRepoSyncAllResult(value: unknown): value is RepoSyncAllResult;
|
|
580
596
|
declare function isSkillRepoListParams(value: unknown): value is SkillRepoListParams;
|
|
@@ -1235,6 +1251,10 @@ interface BridgeMethodMap {
|
|
|
1235
1251
|
params: RepoDisableParams;
|
|
1236
1252
|
result: RepoDisableResult;
|
|
1237
1253
|
};
|
|
1254
|
+
"repo.update": {
|
|
1255
|
+
params: RepoUpdateParams;
|
|
1256
|
+
result: RepoUpdateResult;
|
|
1257
|
+
};
|
|
1238
1258
|
"repo.sync": {
|
|
1239
1259
|
params: RepoSyncParams;
|
|
1240
1260
|
result: RepoSyncResult;
|
|
@@ -1292,7 +1312,7 @@ interface BridgeMethodMap {
|
|
|
1292
1312
|
result: ToolboxUpdateResult;
|
|
1293
1313
|
};
|
|
1294
1314
|
}
|
|
1295
|
-
declare const BRIDGE_METHODS: readonly ["system.hello", "system.ping", "system.shutdown", "task.execute", "task.cancel", "task.list-running", "skillRepo.list", "skillRepo.get", "skillRepo.install", "skillRepo.convertToSymlink", "skillRepo.uninstall", "skillRepo.listLinked", "skillRepo.draft.create", "skillRepo.draft.commit", "skillRepo.draft.list", "skillRepo.draft.delete", "repo.list", "repo.add", "repo.remove", "repo.enable", "repo.disable", "repo.sync", "repo.syncAll", "auth.status", "auth.login", "auth.logout", "auth.whoami", "auth.switch", "device.status", "device.enroll", "device.rotate-secret", "toolbox.list", "toolbox.add", "toolbox.remove", "toolbox.update"];
|
|
1315
|
+
declare const BRIDGE_METHODS: readonly ["system.hello", "system.ping", "system.shutdown", "task.execute", "task.cancel", "task.list-running", "skillRepo.list", "skillRepo.get", "skillRepo.install", "skillRepo.convertToSymlink", "skillRepo.uninstall", "skillRepo.listLinked", "skillRepo.draft.create", "skillRepo.draft.commit", "skillRepo.draft.list", "skillRepo.draft.delete", "repo.list", "repo.add", "repo.remove", "repo.enable", "repo.disable", "repo.update", "repo.sync", "repo.syncAll", "auth.status", "auth.login", "auth.logout", "auth.whoami", "auth.switch", "device.status", "device.enroll", "device.rotate-secret", "toolbox.list", "toolbox.add", "toolbox.remove", "toolbox.update"];
|
|
1296
1316
|
type BridgeMethod = keyof BridgeMethodMap;
|
|
1297
1317
|
type BridgeParams<M extends BridgeMethod> = BridgeMethodMap[M]["params"];
|
|
1298
1318
|
type BridgeResult<M extends BridgeMethod> = BridgeMethodMap[M]["result"];
|
|
@@ -1551,7 +1571,7 @@ interface LocalPublishableAgent {
|
|
|
1551
1571
|
}
|
|
1552
1572
|
|
|
1553
1573
|
declare const SERVICEME_CLI_NAME = "serviceme";
|
|
1554
|
-
declare const SERVICEME_CLI_VERSION = "0.
|
|
1574
|
+
declare const SERVICEME_CLI_VERSION = "0.3.0";
|
|
1555
1575
|
declare const SERVICEME_CLI_CAPABILITIES: {
|
|
1556
1576
|
readonly bridge: true;
|
|
1557
1577
|
readonly tasks: 1;
|
|
@@ -1684,4 +1704,4 @@ declare function isSkillMutationResult(value: unknown): value is SkillMutationRe
|
|
|
1684
1704
|
declare function isSkillReconcileResult(value: unknown): value is SkillReconcileResult;
|
|
1685
1705
|
declare function isSkillPublishableResult(value: unknown): value is SkillPublishableResult;
|
|
1686
1706
|
|
|
1687
|
-
export { AUTH_PROVIDERS, type AgentDownloadFile, type AgentMarketplaceEntry, type AgentMarketplaceState, type AgentMutationAction, type AgentMutationRequest, type AgentMutationResult, type AgentOwnerKind, type AgentPermissionSummary, type AgentPermissionsResult, type AgentScope, type AgentScopeState, type AgentScopeStatus, type AgentSessionStatus, type AgentToolPermission, type AgentToolRiskLevel, type AuthAccountMeta, type AuthLoginParams, type AuthLoginResult, type AuthLogoutParams, type AuthLogoutResult, type AuthProvider, type AuthSessionHandle, type AuthStatus, type AuthStatusParams, type AuthSwitchParams, type AuthSwitchResult, type AuthTokenEnvelope, type AuthWhoamiResult, BRIDGE_EVENTS, BRIDGE_METHODS, type BridgeCapabilities, type BridgeErrorResponse, type BridgeEvent, type BridgeEventMap, type BridgeEventName, type BridgeEventParams, type BridgeLinkMode, type BridgeLinkedSkill, type BridgeMessage, type BridgeMethod, type BridgeMethodMap, type BridgeParams, type BridgeRepoEntry, type BridgeRepoSyncPull, type BridgeRequest, type BridgeResponse, type BridgeResult, type BridgeSkillKind, type BridgeSkillRepoDetail, type BridgeSkillRepoEntry, type BridgeSkillRepoFile, type BridgeSuccessResponse, COPILOT_ERROR_CODES, type CliEnvelope, type CliFailure, type CliSuccess, type CommandPayload, type ConcurrencyPolicy, type CopilotDoctorResult, type CopilotPromptOptions, type CopilotPromptResult, DEFAULT_JSON_SORT_OPTIONS, DEVICE_BINDING_STATES, type DeviceBindingState, type DeviceEnrollParams, type DeviceEnrollResult, type DeviceIdentityState, type DeviceMetadata, type DeviceRotateSecretParams, type DeviceRotateSecretResult, type DeviceSecret, type DeviceStatus, type DeviceStatusParams, type EnvironmentCheckResult, type ExternalTool, type ExternalToolPatch, type GithubCopilotCliPayload, type HttpRequestPayload, JSON_SORT_ALGORITHMS, JSON_SORT_ORDERS, type JsonSortAlgorithm, type JsonSortOptions, type JsonSortOrder, type JsonValidationResult, KNOWN_ENVIRONMENT_TOOLS, type KnownEnvironmentTool, type LocalPublishableAgent, type LocalPublishableSkill, type MarketplaceAgentItem, type MarketplaceAgentsCatalog, type MarketplaceCatalog, type MarketplaceSkillItem, type MigratedTask, type PublishableSkillEntry, type RepoAddParams, type RepoAddResult, type RepoDisableParams, type RepoDisableResult, type RepoEnableParams, type RepoEnableResult, type RepoListParams, type RepoListResult, type RepoRemoveParams, type RepoRemoveResult, type RepoSyncAllParams, type RepoSyncAllResult, type RepoSyncParams, type RepoSyncResult, type RunningTaskInfo, SERVICEME_CLI_CAPABILITIES, SERVICEME_CLI_NAME, SERVICEME_CLI_SCHEMA_VERSION, SERVICEME_CLI_VERSION, SERVICEME_ERROR_CODES, SERVICEME_IMAGE_FORMATS, SERVICEME_PROTOCOL_VERSION, type ScheduleCreateDryRunResult, type ScheduleCreateResult, type ScheduleDeleteDryRunResult, type ScheduleDeleteResult, type ScheduleEditDryRunResult, type ScheduleEditResult, type ScheduleGetResult, type ScheduleListResult, type ScheduleLogsResult, type ScheduleToggleResult, type ScheduleTriggerResult, type ScheduledTask, type ScheduledTaskType, type ScheduledTaskV1, type ScheduledTasksConfig, type ScheduledTasksConfigV1, type ScheduledTasksLogFile, type SchedulerStartResult, type SchedulerStatus, type SchedulerStopResult, type SecretToken, type ServiceMeImageCompressOptions, type ServiceMeImageCompressResult, type ServiceMeImageFormat, type ServiceMeImageInfo, type ServiceMeImageValidationResult, type ServiceMeProjectExtractTemplateInput, type ServiceMeProjectExtractTemplateResult, type ServiceMeProjectGitInitResult, type ServiceMeProjectInstallDepsResult, type ServiceMeProjectMakeScriptsExecutableResult, type ServiceMeProjectScaffoldPruneResult, type ServicemeErrorCode, type ServicemeErrorDetails, ServicemeProtocolError, type ShellPayload, type SkillDownloadFile, type SkillMarketplaceEntry, type SkillMarketplaceState, type SkillMutationAction, type SkillMutationRequest, type SkillMutationResult, type SkillOwnerKind, type SkillPublishableResult, type SkillReconcileResult, type SkillRepoConvertToSymlinkParams, type SkillRepoConvertToSymlinkResult, type SkillRepoDraftCommitParams, type SkillRepoDraftCommitResult, type SkillRepoDraftCreateParams, type SkillRepoDraftCreateResult, type SkillRepoDraftDeleteParams, type SkillRepoDraftDeleteResult, type SkillRepoDraftListParams, type SkillRepoDraftListResult, type SkillRepoGetParams, type SkillRepoGetResult, type SkillRepoInstallParams, type SkillRepoInstallResult, type SkillRepoListLinkedParams, type SkillRepoListLinkedResult, type SkillRepoListParams, type SkillRepoListResult, type SkillRepoUninstallParams, type SkillRepoUninstallResult, type SkillScope, type SkillScopeState, type SkillScopeStatus, type SubmitToOfficialPayload, type SubmitToOfficialResult, type SupportedBridgeProtocolVersion, TOOLBOX_SCOPES, type TaskCancelResult, type TaskCancelledEventParams, type TaskCompletedEventParams, type TaskExecuteResult, type TaskExecutionLog, type TaskExecutionSnapshot, type TaskExecutionStatus, type TaskFailedEventParams, type TaskListRunningResult, type TaskOutputEventParams, type TaskPayload, type TaskRunStatus, type TaskStartedEventParams, type TaskTriggerType, type TaskWorkspaceRef, type ToolCheckResult, type ToolboxAddParams, type ToolboxAddResult, type ToolboxList, type ToolboxListParams, type ToolboxListResult, type ToolboxRemoveParams, type ToolboxRemoveResult, type ToolboxScope, type ToolboxUpdateParams, type ToolboxUpdateResult, type UploadAgentPayload, type UploadFile, type UploadSkillPayload, createCliFailure, createCliSuccess, createServicemeError, getBridgeEventParamsValidator, getBridgeResultValidator, isAgentMarketplaceState, isAgentMutationRequest, isAgentMutationResult, isAgentPermissionSummary, isAgentPermissionsResult, isAgentSessionStatus, isAuthAccountMeta, isAuthLoginParams, isAuthLoginResult, isAuthLogoutParams, isAuthLogoutResult, isAuthProvider, isAuthSessionHandle, isAuthStatus, isAuthSwitchParams, isAuthSwitchResult, isAuthWhoamiResult, isBridgeCapabilities, isBridgeEvent, isBridgeEventName, isBridgeMethod, isBridgeRequest, isBridgeResponse, isCliEnvelope, isDeviceBindingState, isDeviceEnrollParams, isDeviceEnrollResult, isDeviceIdentityState, isDeviceMetadata, isDeviceRotateSecretParams, isDeviceRotateSecretResult, isDeviceStatus, isEnvironmentCheckResult, isExternalTool, isExternalToolPatch, isJsonOutputResult, isJsonSortAlgorithm, isJsonSortOptions, isJsonSortOrder, isJsonValidationResult, isKnownEnvironmentTool, isRepoAddParams, isRepoAddResult, isRepoDisableParams, isRepoDisableResult, isRepoEnableParams, isRepoEnableResult, isRepoListParams, isRepoListResult, isRepoRemoveParams, isRepoRemoveResult, isRepoSyncAllParams, isRepoSyncAllResult, isRepoSyncParams, isRepoSyncResult, isRetryableErrorCode, isScheduledTask, isScheduledTaskType, isScheduledTaskV1, isScheduledTasksConfig, isScheduledTasksConfigV1, isSchedulerStatus, isServiceMeImageCompressOptions, isServiceMeImageCompressResult, isServiceMeImageFormat, isServiceMeImageInfo, isServiceMeImageValidationResult, isServiceMeProjectExtractTemplateInput, isServiceMeProjectExtractTemplateResult, isServiceMeProjectGitInitResult, isServiceMeProjectInstallDepsResult, isServiceMeProjectMakeScriptsExecutableResult, isServiceMeProjectScaffoldPruneResult, isServicemeErrorCode, isServicemeErrorDetails, isSkillMarketplaceState, isSkillMutationRequest, isSkillMutationResult, isSkillPublishableResult, isSkillReconcileResult, isSkillRepoConvertToSymlinkParams, isSkillRepoConvertToSymlinkResult, isSkillRepoDraftCommitResult, isSkillRepoDraftCreateResult, isSkillRepoDraftDeleteResult, isSkillRepoDraftListResult, isSkillRepoGetParams, isSkillRepoGetResult, isSkillRepoInstallParams, isSkillRepoInstallResult, isSkillRepoListLinkedParams, isSkillRepoListLinkedResult, isSkillRepoListParams, isSkillRepoListResult, isSkillRepoUninstallParams, isSkillRepoUninstallResult, isSystemHelloResult, isSystemPingResult, isSystemShutdownResult, isTaskCancelResult, isTaskCancelledEventParams, isTaskCompletedEventParams, isTaskExecuteResult, isTaskExecutionLog, isTaskFailedEventParams, isTaskListRunningResult, isTaskOutputEventParams, isTaskStartedEventParams, isTaskWorkspaceRef, isToolCheckResult, isToolboxAddParams, isToolboxAddResult, isToolboxList, isToolboxListParams, isToolboxRemoveParams, isToolboxRemoveResult, isToolboxScope, isToolboxUpdateParams, isToolboxUpdateResult, migrateTaskV1ToV2, migrateV1ToV2, normalizeServicemeError };
|
|
1707
|
+
export { AUTH_PROVIDERS, type AgentDownloadFile, type AgentMarketplaceEntry, type AgentMarketplaceState, type AgentMutationAction, type AgentMutationRequest, type AgentMutationResult, type AgentOwnerKind, type AgentPermissionSummary, type AgentPermissionsResult, type AgentScope, type AgentScopeState, type AgentScopeStatus, type AgentSessionStatus, type AgentToolPermission, type AgentToolRiskLevel, type AuthAccountMeta, type AuthLoginParams, type AuthLoginResult, type AuthLogoutParams, type AuthLogoutResult, type AuthProvider, type AuthSessionHandle, type AuthStatus, type AuthStatusParams, type AuthSwitchParams, type AuthSwitchResult, type AuthTokenEnvelope, type AuthWhoamiResult, BRIDGE_EVENTS, BRIDGE_METHODS, type BridgeCapabilities, type BridgeErrorResponse, type BridgeEvent, type BridgeEventMap, type BridgeEventName, type BridgeEventParams, type BridgeLinkMode, type BridgeLinkedSkill, type BridgeMessage, type BridgeMethod, type BridgeMethodMap, type BridgeParams, type BridgeRepoEntry, type BridgeRepoSyncPull, type BridgeRequest, type BridgeResponse, type BridgeResult, type BridgeSkillKind, type BridgeSkillRepoDetail, type BridgeSkillRepoEntry, type BridgeSkillRepoFile, type BridgeSuccessResponse, COPILOT_ERROR_CODES, type CliEnvelope, type CliFailure, type CliSuccess, type CommandPayload, type ConcurrencyPolicy, type CopilotDoctorResult, type CopilotPromptOptions, type CopilotPromptResult, DEFAULT_JSON_SORT_OPTIONS, DEVICE_BINDING_STATES, type DeviceBindingState, type DeviceEnrollParams, type DeviceEnrollResult, type DeviceIdentityState, type DeviceMetadata, type DeviceRotateSecretParams, type DeviceRotateSecretResult, type DeviceSecret, type DeviceStatus, type DeviceStatusParams, type EnvironmentCheckResult, type ExternalTool, type ExternalToolPatch, type GithubCopilotCliPayload, type HttpRequestPayload, JSON_SORT_ALGORITHMS, JSON_SORT_ORDERS, type JsonSortAlgorithm, type JsonSortOptions, type JsonSortOrder, type JsonValidationResult, KNOWN_ENVIRONMENT_TOOLS, type KnownEnvironmentTool, type LocalPublishableAgent, type LocalPublishableSkill, type MarketplaceAgentItem, type MarketplaceAgentsCatalog, type MarketplaceCatalog, type MarketplaceSkillItem, type MigratedTask, type PublishableSkillEntry, type RepoAddParams, type RepoAddResult, type RepoDisableParams, type RepoDisableResult, type RepoEnableParams, type RepoEnableResult, type RepoListParams, type RepoListResult, type RepoRemoveParams, type RepoRemoveResult, type RepoSyncAllParams, type RepoSyncAllResult, type RepoSyncParams, type RepoSyncResult, type RepoUpdateParams, type RepoUpdateResult, type RunningTaskInfo, SERVICEME_CLI_CAPABILITIES, SERVICEME_CLI_NAME, SERVICEME_CLI_SCHEMA_VERSION, SERVICEME_CLI_VERSION, SERVICEME_ERROR_CODES, SERVICEME_IMAGE_FORMATS, SERVICEME_PROTOCOL_VERSION, type ScheduleCreateDryRunResult, type ScheduleCreateResult, type ScheduleDeleteDryRunResult, type ScheduleDeleteResult, type ScheduleEditDryRunResult, type ScheduleEditResult, type ScheduleGetResult, type ScheduleListResult, type ScheduleLogsResult, type ScheduleToggleResult, type ScheduleTriggerResult, type ScheduledTask, type ScheduledTaskType, type ScheduledTaskV1, type ScheduledTasksConfig, type ScheduledTasksConfigV1, type ScheduledTasksLogFile, type SchedulerStartResult, type SchedulerStatus, type SchedulerStopResult, type SecretToken, type ServiceMeImageCompressOptions, type ServiceMeImageCompressResult, type ServiceMeImageFormat, type ServiceMeImageInfo, type ServiceMeImageValidationResult, type ServiceMeProjectExtractTemplateInput, type ServiceMeProjectExtractTemplateResult, type ServiceMeProjectGitInitResult, type ServiceMeProjectInstallDepsResult, type ServiceMeProjectMakeScriptsExecutableResult, type ServiceMeProjectScaffoldPruneResult, type ServicemeErrorCode, type ServicemeErrorDetails, ServicemeProtocolError, type ShellPayload, type SkillDownloadFile, type SkillMarketplaceEntry, type SkillMarketplaceState, type SkillMutationAction, type SkillMutationRequest, type SkillMutationResult, type SkillOwnerKind, type SkillPublishableResult, type SkillReconcileResult, type SkillRepoConvertToSymlinkParams, type SkillRepoConvertToSymlinkResult, type SkillRepoDraftCommitParams, type SkillRepoDraftCommitResult, type SkillRepoDraftCreateParams, type SkillRepoDraftCreateResult, type SkillRepoDraftDeleteParams, type SkillRepoDraftDeleteResult, type SkillRepoDraftListParams, type SkillRepoDraftListResult, type SkillRepoGetParams, type SkillRepoGetResult, type SkillRepoInstallParams, type SkillRepoInstallResult, type SkillRepoListLinkedParams, type SkillRepoListLinkedResult, type SkillRepoListParams, type SkillRepoListResult, type SkillRepoUninstallParams, type SkillRepoUninstallResult, type SkillScope, type SkillScopeState, type SkillScopeStatus, type SubmitToOfficialPayload, type SubmitToOfficialResult, type SupportedBridgeProtocolVersion, TOOLBOX_SCOPES, type TaskCancelResult, type TaskCancelledEventParams, type TaskCompletedEventParams, type TaskExecuteResult, type TaskExecutionLog, type TaskExecutionSnapshot, type TaskExecutionStatus, type TaskFailedEventParams, type TaskListRunningResult, type TaskOutputEventParams, type TaskPayload, type TaskRunStatus, type TaskStartedEventParams, type TaskTriggerType, type TaskWorkspaceRef, type ToolCheckResult, type ToolboxAddParams, type ToolboxAddResult, type ToolboxList, type ToolboxListParams, type ToolboxListResult, type ToolboxRemoveParams, type ToolboxRemoveResult, type ToolboxScope, type ToolboxUpdateParams, type ToolboxUpdateResult, type UploadAgentPayload, type UploadFile, type UploadSkillPayload, createCliFailure, createCliSuccess, createServicemeError, getBridgeEventParamsValidator, getBridgeResultValidator, isAgentMarketplaceState, isAgentMutationRequest, isAgentMutationResult, isAgentPermissionSummary, isAgentPermissionsResult, isAgentSessionStatus, isAuthAccountMeta, isAuthLoginParams, isAuthLoginResult, isAuthLogoutParams, isAuthLogoutResult, isAuthProvider, isAuthSessionHandle, isAuthStatus, isAuthSwitchParams, isAuthSwitchResult, isAuthWhoamiResult, isBridgeCapabilities, isBridgeEvent, isBridgeEventName, isBridgeMethod, isBridgeRequest, isBridgeResponse, isCliEnvelope, isDeviceBindingState, isDeviceEnrollParams, isDeviceEnrollResult, isDeviceIdentityState, isDeviceMetadata, isDeviceRotateSecretParams, isDeviceRotateSecretResult, isDeviceStatus, isEnvironmentCheckResult, isExternalTool, isExternalToolPatch, isJsonOutputResult, isJsonSortAlgorithm, isJsonSortOptions, isJsonSortOrder, isJsonValidationResult, isKnownEnvironmentTool, isRepoAddParams, isRepoAddResult, isRepoDisableParams, isRepoDisableResult, isRepoEnableParams, isRepoEnableResult, isRepoListParams, isRepoListResult, isRepoRemoveParams, isRepoRemoveResult, isRepoSyncAllParams, isRepoSyncAllResult, isRepoSyncParams, isRepoSyncResult, isRepoUpdateResult, isRetryableErrorCode, isScheduledTask, isScheduledTaskType, isScheduledTaskV1, isScheduledTasksConfig, isScheduledTasksConfigV1, isSchedulerStatus, isServiceMeImageCompressOptions, isServiceMeImageCompressResult, isServiceMeImageFormat, isServiceMeImageInfo, isServiceMeImageValidationResult, isServiceMeProjectExtractTemplateInput, isServiceMeProjectExtractTemplateResult, isServiceMeProjectGitInitResult, isServiceMeProjectInstallDepsResult, isServiceMeProjectMakeScriptsExecutableResult, isServiceMeProjectScaffoldPruneResult, isServicemeErrorCode, isServicemeErrorDetails, isSkillMarketplaceState, isSkillMutationRequest, isSkillMutationResult, isSkillPublishableResult, isSkillReconcileResult, isSkillRepoConvertToSymlinkParams, isSkillRepoConvertToSymlinkResult, isSkillRepoDraftCommitResult, isSkillRepoDraftCreateResult, isSkillRepoDraftDeleteResult, isSkillRepoDraftListResult, isSkillRepoGetParams, isSkillRepoGetResult, isSkillRepoInstallParams, isSkillRepoInstallResult, isSkillRepoListLinkedParams, isSkillRepoListLinkedResult, isSkillRepoListParams, isSkillRepoListResult, isSkillRepoUninstallParams, isSkillRepoUninstallResult, isSystemHelloResult, isSystemPingResult, isSystemShutdownResult, isTaskCancelResult, isTaskCancelledEventParams, isTaskCompletedEventParams, isTaskExecuteResult, isTaskExecutionLog, isTaskFailedEventParams, isTaskListRunningResult, isTaskOutputEventParams, isTaskStartedEventParams, isTaskWorkspaceRef, isToolCheckResult, isToolboxAddParams, isToolboxAddResult, isToolboxList, isToolboxListParams, isToolboxRemoveParams, isToolboxRemoveResult, isToolboxScope, isToolboxUpdateParams, isToolboxUpdateResult, migrateTaskV1ToV2, migrateV1ToV2, normalizeServicemeError };
|
package/dist/index.js
CHANGED
|
@@ -98,6 +98,7 @@ __export(index_exports, {
|
|
|
98
98
|
isRepoSyncAllResult: () => isRepoSyncAllResult,
|
|
99
99
|
isRepoSyncParams: () => isRepoSyncParams,
|
|
100
100
|
isRepoSyncResult: () => isRepoSyncResult,
|
|
101
|
+
isRepoUpdateResult: () => isRepoUpdateResult,
|
|
101
102
|
isRetryableErrorCode: () => isRetryableErrorCode,
|
|
102
103
|
isScheduledTask: () => isScheduledTask,
|
|
103
104
|
isScheduledTaskType: () => isScheduledTaskType,
|
|
@@ -186,11 +187,7 @@ var VALID_AGENT_MUTATION_ACTIONS = [
|
|
|
186
187
|
"republish",
|
|
187
188
|
"submit-to-official"
|
|
188
189
|
];
|
|
189
|
-
var VALID_AGENT_TOOL_RISK_LEVELS = [
|
|
190
|
-
"high",
|
|
191
|
-
"medium",
|
|
192
|
-
"low"
|
|
193
|
-
];
|
|
190
|
+
var VALID_AGENT_TOOL_RISK_LEVELS = ["high", "medium", "low"];
|
|
194
191
|
function isRecord(value) {
|
|
195
192
|
return typeof value === "object" && value !== null;
|
|
196
193
|
}
|
|
@@ -358,6 +355,9 @@ function isRecord3(value) {
|
|
|
358
355
|
function isStringOrUndefined2(value) {
|
|
359
356
|
return value === void 0 || typeof value === "string";
|
|
360
357
|
}
|
|
358
|
+
function isBooleanOrUndefined(value) {
|
|
359
|
+
return value === void 0 || typeof value === "boolean";
|
|
360
|
+
}
|
|
361
361
|
function isSkillKindOrUndefined(value) {
|
|
362
362
|
return value === void 0 || value === "skill" || value === "agent";
|
|
363
363
|
}
|
|
@@ -383,13 +383,12 @@ function isRepoEntry(value) {
|
|
|
383
383
|
if (typeof value.url !== "string") return false;
|
|
384
384
|
if (typeof value.branch !== "string") return false;
|
|
385
385
|
if (typeof value.enabled !== "boolean") return false;
|
|
386
|
+
if (value.useProxy !== void 0 && typeof value.useProxy !== "boolean") return false;
|
|
386
387
|
if (typeof value.writeEnabled !== "boolean") return false;
|
|
387
388
|
if (value.source !== "default" && value.source !== "user") return false;
|
|
388
389
|
if (typeof value.addedAt !== "string") return false;
|
|
389
|
-
if (value.description !== void 0 && typeof value.description !== "string")
|
|
390
|
-
|
|
391
|
-
if (value.lastSyncAt !== void 0 && typeof value.lastSyncAt !== "string")
|
|
392
|
-
return false;
|
|
390
|
+
if (value.description !== void 0 && typeof value.description !== "string") return false;
|
|
391
|
+
if (value.lastSyncAt !== void 0 && typeof value.lastSyncAt !== "string") return false;
|
|
393
392
|
if (value.lastSyncCommitSha !== void 0 && typeof value.lastSyncCommitSha !== "string") {
|
|
394
393
|
return false;
|
|
395
394
|
}
|
|
@@ -470,6 +469,9 @@ function isRepoEnableResult(value) {
|
|
|
470
469
|
function isRepoDisableResult(value) {
|
|
471
470
|
return isRecord3(value) && isRepoEntry(value.repo);
|
|
472
471
|
}
|
|
472
|
+
function isRepoUpdateResult(value) {
|
|
473
|
+
return isRecord3(value) && isRepoEntry(value.repo);
|
|
474
|
+
}
|
|
473
475
|
function isRepoSyncResult(value) {
|
|
474
476
|
return isRecord3(value) && Array.isArray(value.pulls) && value.pulls.length >= 1 && value.pulls.every(isSyncPull);
|
|
475
477
|
}
|
|
@@ -498,7 +500,7 @@ function isRepoListParams(value) {
|
|
|
498
500
|
return isRecord3(value) && (value.source === void 0 || value.source === "default" || value.source === "user");
|
|
499
501
|
}
|
|
500
502
|
function isRepoAddParams(value) {
|
|
501
|
-
return isRecord3(value) && typeof value.url === "string" && isStringOrUndefined2(value.branch) && isStringOrUndefined2(value.name);
|
|
503
|
+
return isRecord3(value) && typeof value.url === "string" && isStringOrUndefined2(value.branch) && isStringOrUndefined2(value.name) && isBooleanOrUndefined(value.useProxy);
|
|
502
504
|
}
|
|
503
505
|
function isRepoRemoveParams(value) {
|
|
504
506
|
return isRecord3(value) && typeof value.repoId === "string";
|
|
@@ -853,6 +855,7 @@ var BRIDGE_METHODS = [
|
|
|
853
855
|
"repo.remove",
|
|
854
856
|
"repo.enable",
|
|
855
857
|
"repo.disable",
|
|
858
|
+
"repo.update",
|
|
856
859
|
"repo.sync",
|
|
857
860
|
"repo.syncAll",
|
|
858
861
|
"auth.status",
|
|
@@ -928,6 +931,8 @@ function getBridgeResultValidator(method) {
|
|
|
928
931
|
return isRepoEnableResult;
|
|
929
932
|
case "repo.disable":
|
|
930
933
|
return isRepoDisableResult;
|
|
934
|
+
case "repo.update":
|
|
935
|
+
return isRepoUpdateResult;
|
|
931
936
|
case "repo.sync":
|
|
932
937
|
return isRepoSyncResult;
|
|
933
938
|
case "repo.syncAll":
|
|
@@ -1075,9 +1080,7 @@ function isEnvironmentCheckResult(value) {
|
|
|
1075
1080
|
if (!isRecord9(value)) {
|
|
1076
1081
|
return false;
|
|
1077
1082
|
}
|
|
1078
|
-
return KNOWN_ENVIRONMENT_TOOLS.every(
|
|
1079
|
-
(tool) => isToolCheckResult(value[tool])
|
|
1080
|
-
);
|
|
1083
|
+
return KNOWN_ENVIRONMENT_TOOLS.every((tool) => isToolCheckResult(value[tool]));
|
|
1081
1084
|
}
|
|
1082
1085
|
|
|
1083
1086
|
// src/errors.ts
|
|
@@ -1240,10 +1243,7 @@ var JSON_SORT_ALGORITHMS = [
|
|
|
1240
1243
|
"values",
|
|
1241
1244
|
"type"
|
|
1242
1245
|
];
|
|
1243
|
-
var JSON_SORT_ORDERS = [
|
|
1244
|
-
"asc",
|
|
1245
|
-
"desc"
|
|
1246
|
-
];
|
|
1246
|
+
var JSON_SORT_ORDERS = ["asc", "desc"];
|
|
1247
1247
|
var DEFAULT_JSON_SORT_OPTIONS = {
|
|
1248
1248
|
sortOrder: "asc",
|
|
1249
1249
|
sortAlgo: "default"
|
|
@@ -1269,7 +1269,7 @@ function isJsonOutputResult(value) {
|
|
|
1269
1269
|
|
|
1270
1270
|
// src/metadata.ts
|
|
1271
1271
|
var SERVICEME_CLI_NAME = "serviceme";
|
|
1272
|
-
var SERVICEME_CLI_VERSION = "0.
|
|
1272
|
+
var SERVICEME_CLI_VERSION = "0.3.0";
|
|
1273
1273
|
var SERVICEME_CLI_CAPABILITIES = {
|
|
1274
1274
|
bridge: true,
|
|
1275
1275
|
tasks: 1,
|
|
@@ -1466,6 +1466,7 @@ function isSkillPublishableResult(value) {
|
|
|
1466
1466
|
isRepoSyncAllResult,
|
|
1467
1467
|
isRepoSyncParams,
|
|
1468
1468
|
isRepoSyncResult,
|
|
1469
|
+
isRepoUpdateResult,
|
|
1469
1470
|
isRetryableErrorCode,
|
|
1470
1471
|
isScheduledTask,
|
|
1471
1472
|
isScheduledTaskType,
|
package/dist/index.mjs
CHANGED
|
@@ -16,11 +16,7 @@ var VALID_AGENT_MUTATION_ACTIONS = [
|
|
|
16
16
|
"republish",
|
|
17
17
|
"submit-to-official"
|
|
18
18
|
];
|
|
19
|
-
var VALID_AGENT_TOOL_RISK_LEVELS = [
|
|
20
|
-
"high",
|
|
21
|
-
"medium",
|
|
22
|
-
"low"
|
|
23
|
-
];
|
|
19
|
+
var VALID_AGENT_TOOL_RISK_LEVELS = ["high", "medium", "low"];
|
|
24
20
|
function isRecord(value) {
|
|
25
21
|
return typeof value === "object" && value !== null;
|
|
26
22
|
}
|
|
@@ -188,6 +184,9 @@ function isRecord3(value) {
|
|
|
188
184
|
function isStringOrUndefined2(value) {
|
|
189
185
|
return value === void 0 || typeof value === "string";
|
|
190
186
|
}
|
|
187
|
+
function isBooleanOrUndefined(value) {
|
|
188
|
+
return value === void 0 || typeof value === "boolean";
|
|
189
|
+
}
|
|
191
190
|
function isSkillKindOrUndefined(value) {
|
|
192
191
|
return value === void 0 || value === "skill" || value === "agent";
|
|
193
192
|
}
|
|
@@ -213,13 +212,12 @@ function isRepoEntry(value) {
|
|
|
213
212
|
if (typeof value.url !== "string") return false;
|
|
214
213
|
if (typeof value.branch !== "string") return false;
|
|
215
214
|
if (typeof value.enabled !== "boolean") return false;
|
|
215
|
+
if (value.useProxy !== void 0 && typeof value.useProxy !== "boolean") return false;
|
|
216
216
|
if (typeof value.writeEnabled !== "boolean") return false;
|
|
217
217
|
if (value.source !== "default" && value.source !== "user") return false;
|
|
218
218
|
if (typeof value.addedAt !== "string") return false;
|
|
219
|
-
if (value.description !== void 0 && typeof value.description !== "string")
|
|
220
|
-
|
|
221
|
-
if (value.lastSyncAt !== void 0 && typeof value.lastSyncAt !== "string")
|
|
222
|
-
return false;
|
|
219
|
+
if (value.description !== void 0 && typeof value.description !== "string") return false;
|
|
220
|
+
if (value.lastSyncAt !== void 0 && typeof value.lastSyncAt !== "string") return false;
|
|
223
221
|
if (value.lastSyncCommitSha !== void 0 && typeof value.lastSyncCommitSha !== "string") {
|
|
224
222
|
return false;
|
|
225
223
|
}
|
|
@@ -300,6 +298,9 @@ function isRepoEnableResult(value) {
|
|
|
300
298
|
function isRepoDisableResult(value) {
|
|
301
299
|
return isRecord3(value) && isRepoEntry(value.repo);
|
|
302
300
|
}
|
|
301
|
+
function isRepoUpdateResult(value) {
|
|
302
|
+
return isRecord3(value) && isRepoEntry(value.repo);
|
|
303
|
+
}
|
|
303
304
|
function isRepoSyncResult(value) {
|
|
304
305
|
return isRecord3(value) && Array.isArray(value.pulls) && value.pulls.length >= 1 && value.pulls.every(isSyncPull);
|
|
305
306
|
}
|
|
@@ -328,7 +329,7 @@ function isRepoListParams(value) {
|
|
|
328
329
|
return isRecord3(value) && (value.source === void 0 || value.source === "default" || value.source === "user");
|
|
329
330
|
}
|
|
330
331
|
function isRepoAddParams(value) {
|
|
331
|
-
return isRecord3(value) && typeof value.url === "string" && isStringOrUndefined2(value.branch) && isStringOrUndefined2(value.name);
|
|
332
|
+
return isRecord3(value) && typeof value.url === "string" && isStringOrUndefined2(value.branch) && isStringOrUndefined2(value.name) && isBooleanOrUndefined(value.useProxy);
|
|
332
333
|
}
|
|
333
334
|
function isRepoRemoveParams(value) {
|
|
334
335
|
return isRecord3(value) && typeof value.repoId === "string";
|
|
@@ -683,6 +684,7 @@ var BRIDGE_METHODS = [
|
|
|
683
684
|
"repo.remove",
|
|
684
685
|
"repo.enable",
|
|
685
686
|
"repo.disable",
|
|
687
|
+
"repo.update",
|
|
686
688
|
"repo.sync",
|
|
687
689
|
"repo.syncAll",
|
|
688
690
|
"auth.status",
|
|
@@ -758,6 +760,8 @@ function getBridgeResultValidator(method) {
|
|
|
758
760
|
return isRepoEnableResult;
|
|
759
761
|
case "repo.disable":
|
|
760
762
|
return isRepoDisableResult;
|
|
763
|
+
case "repo.update":
|
|
764
|
+
return isRepoUpdateResult;
|
|
761
765
|
case "repo.sync":
|
|
762
766
|
return isRepoSyncResult;
|
|
763
767
|
case "repo.syncAll":
|
|
@@ -905,9 +909,7 @@ function isEnvironmentCheckResult(value) {
|
|
|
905
909
|
if (!isRecord9(value)) {
|
|
906
910
|
return false;
|
|
907
911
|
}
|
|
908
|
-
return KNOWN_ENVIRONMENT_TOOLS.every(
|
|
909
|
-
(tool) => isToolCheckResult(value[tool])
|
|
910
|
-
);
|
|
912
|
+
return KNOWN_ENVIRONMENT_TOOLS.every((tool) => isToolCheckResult(value[tool]));
|
|
911
913
|
}
|
|
912
914
|
|
|
913
915
|
// src/errors.ts
|
|
@@ -1070,10 +1072,7 @@ var JSON_SORT_ALGORITHMS = [
|
|
|
1070
1072
|
"values",
|
|
1071
1073
|
"type"
|
|
1072
1074
|
];
|
|
1073
|
-
var JSON_SORT_ORDERS = [
|
|
1074
|
-
"asc",
|
|
1075
|
-
"desc"
|
|
1076
|
-
];
|
|
1075
|
+
var JSON_SORT_ORDERS = ["asc", "desc"];
|
|
1077
1076
|
var DEFAULT_JSON_SORT_OPTIONS = {
|
|
1078
1077
|
sortOrder: "asc",
|
|
1079
1078
|
sortAlgo: "default"
|
|
@@ -1099,7 +1098,7 @@ function isJsonOutputResult(value) {
|
|
|
1099
1098
|
|
|
1100
1099
|
// src/metadata.ts
|
|
1101
1100
|
var SERVICEME_CLI_NAME = "serviceme";
|
|
1102
|
-
var SERVICEME_CLI_VERSION = "0.
|
|
1101
|
+
var SERVICEME_CLI_VERSION = "0.3.0";
|
|
1103
1102
|
var SERVICEME_CLI_CAPABILITIES = {
|
|
1104
1103
|
bridge: true,
|
|
1105
1104
|
tasks: 1,
|
|
@@ -1295,6 +1294,7 @@ export {
|
|
|
1295
1294
|
isRepoSyncAllResult,
|
|
1296
1295
|
isRepoSyncParams,
|
|
1297
1296
|
isRepoSyncResult,
|
|
1297
|
+
isRepoUpdateResult,
|
|
1298
1298
|
isRetryableErrorCode,
|
|
1299
1299
|
isScheduledTask,
|
|
1300
1300
|
isScheduledTaskType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serviceme/devtools-protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Shared protocol contracts, runtime validators, and error models for SERVICEME tools.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"repository": {
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"scripts": {
|
|
41
41
|
"watch": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
42
42
|
"lint": "biome check src test",
|
|
43
|
+
"format": "biome format --write src test",
|
|
43
44
|
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
44
45
|
"typecheck": "tsc --noEmit",
|
|
45
46
|
"test": "pnpm run build && node --test test/**/*.test.js",
|
package/dist/bridge.d.ts
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import type { ServicemeErrorDetails } from "./errors";
|
|
2
|
-
import type { AgentSessionStatus, OpenCodeAgentEvent, OpenCodeRuntimeOptions, OpenCodeServerState } from "./opencode";
|
|
3
|
-
export declare const SERVICEME_PROTOCOL_VERSION: 1;
|
|
4
|
-
export interface BridgeCapabilities {
|
|
5
|
-
bridge: true;
|
|
6
|
-
opencode: 1;
|
|
7
|
-
json: 1;
|
|
8
|
-
env: 1;
|
|
9
|
-
}
|
|
10
|
-
export declare function isBridgeCapabilities(value: unknown): value is BridgeCapabilities;
|
|
11
|
-
export interface BridgeMethodMap {
|
|
12
|
-
"system.hello": {
|
|
13
|
-
params: {
|
|
14
|
-
clientName: string;
|
|
15
|
-
clientVersion: string;
|
|
16
|
-
wantedCapabilities?: string[];
|
|
17
|
-
};
|
|
18
|
-
result: {
|
|
19
|
-
cliVersion: string;
|
|
20
|
-
protocolVersion: typeof SERVICEME_PROTOCOL_VERSION;
|
|
21
|
-
capabilities: BridgeCapabilities;
|
|
22
|
-
pid: number;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
"system.ping": {
|
|
26
|
-
params: Record<string, never>;
|
|
27
|
-
result: {
|
|
28
|
-
now: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
"system.shutdown": {
|
|
32
|
-
params: Record<string, never>;
|
|
33
|
-
result: {
|
|
34
|
-
shuttingDown: true;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
"opencode.server.ensure": {
|
|
38
|
-
params: OpenCodeRuntimeOptions;
|
|
39
|
-
result: OpenCodeServerState;
|
|
40
|
-
};
|
|
41
|
-
"opencode.server.status": {
|
|
42
|
-
params: OpenCodeRuntimeOptions;
|
|
43
|
-
result: OpenCodeServerState;
|
|
44
|
-
};
|
|
45
|
-
"opencode.session.create": {
|
|
46
|
-
params: {
|
|
47
|
-
chatSessionId: string;
|
|
48
|
-
workspaceRoot?: string;
|
|
49
|
-
runtime?: OpenCodeRuntimeOptions;
|
|
50
|
-
};
|
|
51
|
-
result: {
|
|
52
|
-
sessionId: string;
|
|
53
|
-
title?: string;
|
|
54
|
-
status: AgentSessionStatus;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
"opencode.session.prompt": {
|
|
58
|
-
params: {
|
|
59
|
-
sessionId: string;
|
|
60
|
-
promptId: string;
|
|
61
|
-
prompt: string;
|
|
62
|
-
workspaceRoot?: string;
|
|
63
|
-
runtime?: OpenCodeRuntimeOptions;
|
|
64
|
-
};
|
|
65
|
-
result: {
|
|
66
|
-
accepted: true;
|
|
67
|
-
sessionId: string;
|
|
68
|
-
promptId: string;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
"opencode.session.status": {
|
|
72
|
-
params: {
|
|
73
|
-
sessionId: string;
|
|
74
|
-
workspaceRoot?: string;
|
|
75
|
-
};
|
|
76
|
-
result: {
|
|
77
|
-
sessionId: string;
|
|
78
|
-
status: AgentSessionStatus;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
"opencode.session.abort": {
|
|
82
|
-
params: {
|
|
83
|
-
sessionId: string;
|
|
84
|
-
workspaceRoot?: string;
|
|
85
|
-
};
|
|
86
|
-
result: {
|
|
87
|
-
aborted: true;
|
|
88
|
-
sessionId: string;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
"opencode.session.dispose": {
|
|
92
|
-
params: {
|
|
93
|
-
sessionId: string;
|
|
94
|
-
};
|
|
95
|
-
result: {
|
|
96
|
-
disposed: true;
|
|
97
|
-
sessionId: string;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
export declare const BRIDGE_METHODS: readonly ["system.hello", "system.ping", "system.shutdown", "opencode.server.ensure", "opencode.server.status", "opencode.session.create", "opencode.session.prompt", "opencode.session.status", "opencode.session.abort", "opencode.session.dispose"];
|
|
102
|
-
export type BridgeMethod = keyof BridgeMethodMap;
|
|
103
|
-
export type BridgeParams<M extends BridgeMethod> = BridgeMethodMap[M]["params"];
|
|
104
|
-
export type BridgeResult<M extends BridgeMethod> = BridgeMethodMap[M]["result"];
|
|
105
|
-
export interface BridgeEventMap {
|
|
106
|
-
"opencode.session.event": {
|
|
107
|
-
sessionId: string;
|
|
108
|
-
promptId?: string;
|
|
109
|
-
payload: OpenCodeAgentEvent;
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
export declare const BRIDGE_EVENTS: readonly ["opencode.session.event"];
|
|
113
|
-
export type BridgeEventName = keyof BridgeEventMap;
|
|
114
|
-
export type BridgeEventParams<E extends BridgeEventName> = BridgeEventMap[E];
|
|
115
|
-
export interface BridgeRequest<M extends BridgeMethod = BridgeMethod> {
|
|
116
|
-
protocolVersion: typeof SERVICEME_PROTOCOL_VERSION;
|
|
117
|
-
kind: "request";
|
|
118
|
-
id: string;
|
|
119
|
-
method: M;
|
|
120
|
-
params: BridgeParams<M>;
|
|
121
|
-
}
|
|
122
|
-
export interface BridgeSuccessResponse<M extends BridgeMethod = BridgeMethod> {
|
|
123
|
-
protocolVersion: typeof SERVICEME_PROTOCOL_VERSION;
|
|
124
|
-
kind: "response";
|
|
125
|
-
id: string;
|
|
126
|
-
ok: true;
|
|
127
|
-
result: BridgeResult<M>;
|
|
128
|
-
}
|
|
129
|
-
export interface BridgeErrorResponse {
|
|
130
|
-
protocolVersion: typeof SERVICEME_PROTOCOL_VERSION;
|
|
131
|
-
kind: "response";
|
|
132
|
-
id: string;
|
|
133
|
-
ok: false;
|
|
134
|
-
error: ServicemeErrorDetails;
|
|
135
|
-
}
|
|
136
|
-
export type BridgeResponse<M extends BridgeMethod = BridgeMethod> = BridgeSuccessResponse<M> | BridgeErrorResponse;
|
|
137
|
-
export interface BridgeEvent<E extends BridgeEventName = BridgeEventName> {
|
|
138
|
-
protocolVersion: typeof SERVICEME_PROTOCOL_VERSION;
|
|
139
|
-
kind: "event";
|
|
140
|
-
event: E;
|
|
141
|
-
params: BridgeEventParams<E>;
|
|
142
|
-
}
|
|
143
|
-
export type BridgeMessage = BridgeRequest | BridgeResponse | BridgeEvent;
|
|
144
|
-
export declare function isSystemHelloResult(value: unknown): value is BridgeResult<"system.hello">;
|
|
145
|
-
export declare function isSystemPingResult(value: unknown): value is BridgeResult<"system.ping">;
|
|
146
|
-
export declare function isSystemShutdownResult(value: unknown): value is BridgeResult<"system.shutdown">;
|
|
147
|
-
export declare function isOpenCodeSessionCreateResult(value: unknown): value is BridgeResult<"opencode.session.create">;
|
|
148
|
-
export declare function isOpenCodeSessionPromptResult(value: unknown): value is BridgeResult<"opencode.session.prompt">;
|
|
149
|
-
export declare function isOpenCodeSessionStatusResult(value: unknown): value is BridgeResult<"opencode.session.status">;
|
|
150
|
-
export declare function isOpenCodeSessionAbortResult(value: unknown): value is BridgeResult<"opencode.session.abort">;
|
|
151
|
-
export declare function isOpenCodeSessionDisposeResult(value: unknown): value is BridgeResult<"opencode.session.dispose">;
|
|
152
|
-
export declare function getBridgeResultValidator(method: BridgeMethod): ((value: unknown) => boolean) | undefined;
|
|
153
|
-
export declare function isOpenCodeSessionEventParams(value: unknown): value is BridgeEventParams<"opencode.session.event">;
|
|
154
|
-
export declare function getBridgeEventParamsValidator(event: BridgeEventName): ((value: unknown) => boolean) | undefined;
|
|
155
|
-
export declare function isBridgeMethod(value: unknown): value is BridgeMethod;
|
|
156
|
-
export declare function isBridgeEventName(value: unknown): value is BridgeEventName;
|
|
157
|
-
export declare function isBridgeRequest(value: unknown): value is BridgeRequest;
|
|
158
|
-
export declare function isBridgeResponse(value: unknown): value is BridgeResponse;
|
|
159
|
-
export declare function isBridgeEvent(value: unknown): value is BridgeEvent;
|