186 lines
4.9 KiB
C++
186 lines
4.9 KiB
C++
#include "meta/muse_code_spec.h"
|
|
|
|
namespace molo::meta {
|
|
|
|
// Generated from schema/msp/stable/msp.schema.json of the muse-code-sdk
|
|
// mirror (fingerprint sha256:cfdb6d2525601b9bac76584ccb0610ab3a5539b5e4f51141f079b99b39fcb4e0,
|
|
// schemaVersion 1). tools/check_spec.py re-fetches the schema and fails if any
|
|
// list below drifts.
|
|
// MSP-METHODS-BEGIN
|
|
static const char* const kMethods[] = {
|
|
"approval/decide",
|
|
"approval/listPending",
|
|
"computerUseSettings/read",
|
|
"computerUseSettings/update",
|
|
"computerUseSetup/check",
|
|
"computerUseSetup/read",
|
|
"computerUseSetup/start",
|
|
"feedback/submit",
|
|
"goal/clear",
|
|
"goal/edit",
|
|
"goal/pause",
|
|
"goal/resume",
|
|
"goal/set",
|
|
"hook/list",
|
|
"initialize",
|
|
"item/readOutput",
|
|
"media/upload",
|
|
"model/list",
|
|
"plugin/install",
|
|
"plugin/list",
|
|
"plugin/marketplaceAdd",
|
|
"plugin/marketplaceRemove",
|
|
"plugin/marketplaceUpdate",
|
|
"recap/cancel",
|
|
"recap/request",
|
|
"session/compact",
|
|
"session/fork",
|
|
"session/leave",
|
|
"session/list",
|
|
"session/read",
|
|
"session/rename",
|
|
"session/resume",
|
|
"session/setApprovalMode",
|
|
"session/setModel",
|
|
"session/setReasoningEffort",
|
|
"session/sideChat",
|
|
"session/start",
|
|
"session/userShell",
|
|
"skill/import",
|
|
"skill/list",
|
|
"skill/setActivation",
|
|
"subagent/close",
|
|
"subagent/followupTask",
|
|
"subagent/interrupt",
|
|
"subagent/readResult",
|
|
"subagent/reopen",
|
|
"subagent/resume",
|
|
"subagent/sendMessage",
|
|
"subagent/stop",
|
|
"task/background",
|
|
"task/list",
|
|
"task/stop",
|
|
"task/stopAll",
|
|
"turn/cancel",
|
|
"turn/interrupt",
|
|
"turn/start",
|
|
"turn/steer",
|
|
"turn/unqueue",
|
|
"usage/read",
|
|
"userInput/answer",
|
|
"userInput/cancel",
|
|
"userInput/clarify",
|
|
"userInput/interrupt",
|
|
"view/page",
|
|
"view/subscribe",
|
|
"view/unsubscribe",
|
|
"workflow/cancel",
|
|
"workflow/childControl",
|
|
"workflow/pause",
|
|
"workflow/resume",
|
|
};
|
|
// MSP-METHODS-END
|
|
// MSP-NOTIFICATIONS-BEGIN
|
|
static const char* const kNotifications[] = {
|
|
"approval/requested",
|
|
"approval/resolved",
|
|
"approval/reviewing",
|
|
"approval/updated",
|
|
"computerUseSetup/changed",
|
|
"initialized",
|
|
"item/completed",
|
|
"item/delta",
|
|
"item/started",
|
|
"item/updated",
|
|
"monitor/inboxItemAdmitted",
|
|
"monitor/inboxItemDrained",
|
|
"monitor/inboxItemVoided",
|
|
"plugin/changed",
|
|
"plugin/marketplaceChanged",
|
|
"recap/completed",
|
|
"session/approvalModeChanged",
|
|
"session/branchChanged",
|
|
"session/closed",
|
|
"session/contextUsage",
|
|
"session/goalChanged",
|
|
"session/leaveCompleted",
|
|
"session/listChanged",
|
|
"session/modelChanged",
|
|
"session/modelRouteUnserved",
|
|
"session/nameChanged",
|
|
"session/reasoningEffortChanged",
|
|
"session/started",
|
|
"session/statusChanged",
|
|
"session/todoListChanged",
|
|
"session/tokenUsage",
|
|
"session/viewHealthChanged",
|
|
"skill/changed",
|
|
"turn/completed",
|
|
"turn/foregroundCompleted",
|
|
"turn/modelRetryScheduled",
|
|
"turn/retracted",
|
|
"turn/retryScheduled",
|
|
"turn/started",
|
|
"turn/unqueued",
|
|
"usage/changed",
|
|
"userInput/engaged",
|
|
"userInput/requested",
|
|
"userInput/settled",
|
|
"view/gap",
|
|
};
|
|
// MSP-NOTIFICATIONS-END
|
|
// MSP-REQUESTS-BEGIN
|
|
static const char* const kRequests[] = {
|
|
"approval/request",
|
|
"userInput/request",
|
|
};
|
|
// MSP-REQUESTS-END
|
|
// MSP-ERRORS-BEGIN (code:kind:retryable)
|
|
static const char* const kErrors[] = {
|
|
"-32700:parseError:0",
|
|
"-32600:invalidRequest:0",
|
|
"-32601:methodNotFound:0",
|
|
"-32602:invalidParams:0",
|
|
"-32603:internal:0",
|
|
"-32001:overloaded:1",
|
|
"-32002:inputTooLarge:0",
|
|
"-32010:capabilityRequired:0",
|
|
"-32011:notFound:0",
|
|
"-32013:interrupted:?",
|
|
"-32014:cancelled:?",
|
|
"-32020:sessionNotFound:0",
|
|
"-32021:sessionInUse:0",
|
|
"-32022:sessionAmbiguous:0",
|
|
"-32023:forkBoundaryInvalid:0",
|
|
"-32024:sessionNotLoaded:0",
|
|
"-32025:sessionStreamMismatch:0",
|
|
"-32030:commandRejected:0",
|
|
"-32031:backpressured:1",
|
|
"-32032:skillNotFound:0",
|
|
"-32033:computerUseUnavailable:0",
|
|
"-32034:marketplaceNotFound:0",
|
|
"-32035:pluginNotFound:0",
|
|
"-32036:marketplaceAlreadyExists:0",
|
|
"-32037:pluginMutationsDisabled:0",
|
|
"-32038:uploadNotFound:0",
|
|
"-32040:viewTruncated:0",
|
|
"-32041:outputUnavailable:0",
|
|
"-32042:boundaryPruned:0",
|
|
"-32050:approvalNotFound:0",
|
|
"-32051:approvalAlreadyResolved:0",
|
|
"-32052:approvalChoiceInvalid:0",
|
|
"-32053:approvalRequirementStale:0",
|
|
"-32054:approvalReviewerUnavailable:0",
|
|
"-32055:userInputNotFound:0",
|
|
"-32056:userInputAlreadySettled:0",
|
|
"-32057:userInputAnswerInvalid:0",
|
|
};
|
|
// MSP-ERRORS-END
|
|
|
|
const char* const* MuseCodeSpec::methods(std::size_t& n) { n = sizeof(kMethods) / sizeof(kMethods[0]); return kMethods; }
|
|
const char* const* MuseCodeSpec::notifications(std::size_t& n) { n = sizeof(kNotifications) / sizeof(kNotifications[0]); return kNotifications; }
|
|
const char* const* MuseCodeSpec::server_requests(std::size_t& n) { n = sizeof(kRequests) / sizeof(kRequests[0]); return kRequests; }
|
|
const char* const* MuseCodeSpec::errors(std::size_t& n) { n = sizeof(kErrors) / sizeof(kErrors[0]); return kErrors; }
|
|
|
|
} // namespace molo::meta
|