Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/design-surfaces.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
"about": "Which source paths make up each UI surface, and the design spec that surface follows (one spec per surface, in leo-workspace design/<surface>.md). scripts/ci/pr_design_spec_check.py warns, never fails, when a pull request changes a surface's paths and its description does not cite the spec. leo-workspace tools/prior_art.py reads this map to list a surface's open and recently merged PRs before work starts. A path is a file or a directory (everything under it). Tests and gallery files are left out: changing them changes no design. Keep paths current when files move; the check warns about a mapped path that no longer exists.",
"version": 1,
"surfaces": {
"chief-work": {
"spec": "leo-workspace design/chief-work.md",
"aliases": ["Chief background tasks", "Chief subagents", "Chief work"],
"paths": [
"webviews/src/pages/home-channels/ChiefWorkPanel.tsx",
"webviews/src/pages/home-channels/chiefWork.css",
"webviews/src/pages/home-channels/ChiefWorkPane.tsx",
"webviews/src/pages/home-channels/ChiefWorkStore.ts"
]
},
"chief-web": {
"spec": "leo-workspace design/chief-web.md",
"aliases": ["Chief mobile web", "Chief web address"],
Expand Down
14 changes: 7 additions & 7 deletions cmux-tui/bindings/cpp/.cmux-sdk-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"files": [
{
"path": "include/cmux/raw/generated/commands.hpp",
"sha256": "446fb34ebd4fc7518f1192941f12af2cb5b3974adc02a3a91fddb25139dbc45f",
"size": 39850
"sha256": "1ed5fa7c4c331f0856b51fa19391988fea24ae51c055f07f13309ce98b674e32",
"size": 39966
},
{
"path": "include/cmux/raw/generated/events.hpp",
Expand All @@ -12,17 +12,17 @@
},
{
"path": "include/cmux/raw/generated/models.hpp",
"sha256": "9097dedcd5a6b2e50cc91935933b5b74ac409e7b43cb37f2ef2cf90c9a251a0e",
"size": 321348
"sha256": "7dff59f563cb88b98f07d2606c1613654959430ed50c396441b4065618e0d283",
"size": 323852
},
{
"path": "src/raw/generated/protocol.cpp",
"sha256": "479056a609c56f60623da132d18c29596d6c7423c171852589c6ca21d775665d",
"size": 2036468
"sha256": "32c1ffb5bad4bee0afe438298077f0886935eb19e31a67e60a9c261fc6ce7778",
"size": 2052620
}
],
"format": 1,
"ir_sha256": "dbb6d5bcff30c1db703c0ff175acb28f75d2bfe02a82ba6de26191fc52ec0976",
"ir_sha256": "bba25ef6c17ba6206fa161713567d0d998a15d4a2e1103681b3c5badc91feb87",
"language": "cpp",
"mux_protocol": 12,
"schema_version": 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class Client {
[[nodiscard]] Result<EmptyResult> browser_wheel(const BrowserWheelRequest& request, RequestOptions options = {});
[[nodiscard]] Result<EmptyResult> browser_wheel_guarded(const BrowserWheelGuardedRequest& request, RequestOptions options = {});
[[nodiscard]] Result<ChiefInspectResult> chief_inspect(const ChiefInspectRequest& request, RequestOptions options = {});
[[nodiscard]] Result<ChiefWorkResult> chief_work(const ChiefWorkRequest& request, RequestOptions options = {});
[[nodiscard]] Result<EmptyResult> clear_history(const ClearHistoryRequest& request, RequestOptions options = {});
[[nodiscard]] Result<EmptyResult> clear_window_title(const ClearWindowTitleRequest& request = {}, RequestOptions options = {});
[[nodiscard]] Result<ClientFocusResult> client_focus(const ClientFocusRequest& request, RequestOptions options = {});
Expand Down
94 changes: 93 additions & 1 deletion cmux-tui/bindings/cpp/include/cmux/raw/generated/models.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace cmux::raw {

inline constexpr std::uint32_t kMuxProtocolVersion = 12U;
inline constexpr std::string_view kProtocolIrSha256 = "dbb6d5bcff30c1db703c0ff175acb28f75d2bfe02a82ba6de26191fc52ec0976";
inline constexpr std::string_view kProtocolIrSha256 = "bba25ef6c17ba6206fa161713567d0d998a15d4a2e1103681b3c5badc91feb87";

struct ActivitySnapshot;
struct ActivitySubscribeResult;
Expand Down Expand Up @@ -42,6 +42,8 @@ struct BrowserProviderUnregisterResult;
struct CellPixelFailure;
struct CellPixelResize;
struct CellPixelSurface;
struct ChiefWorkAgent;
struct ChiefWorkTask;
struct ClientInfo;
struct ClientSize;
enum class ClientTransport;
Expand Down Expand Up @@ -266,6 +268,8 @@ struct BrowserWheelRequest;
struct BrowserWheelGuardedRequest;
struct ChiefInspectRequest;
struct ChiefInspectResult;
struct ChiefWorkRequest;
struct ChiefWorkResult;
struct ClearHistoryRequest;
struct ClearWindowTitleRequest;
struct ClientFocusRequest;
Expand Down Expand Up @@ -667,6 +671,8 @@ struct WorkspaceClosedEvent;
struct WorkspaceMovedEvent;
struct WorkspacePresentationChangedEvent;
struct WorkspaceRenamedEvent;
enum class ChiefWorkAgentState;
enum class ChiefWorkTaskStatus;
enum class CopyResultMode;
struct DeclarativeLayoutLeaf;
struct DeclarativeLayoutSplit;
Expand Down Expand Up @@ -1247,6 +1253,56 @@ struct ChiefInspectResult {
friend bool operator==(const ChiefInspectResult&, const ChiefInspectResult&) = default;
};

enum class ChiefWorkAgentState {
working,
waiting,
idle,
failed,
};

struct ChiefWorkAgent {
std::string id{};
std::string name{};
std::optional<std::uint64_t> started_at{};
ChiefWorkAgentState state{};
std::optional<std::string> task{};
std::optional<std::uint64_t> updated_at{};
friend bool operator==(const ChiefWorkAgent&, const ChiefWorkAgent&) = default;
};

struct ChiefWorkRequest {
std::string chief{};
friend bool operator==(const ChiefWorkRequest&, const ChiefWorkRequest&) = default;
};

enum class ChiefWorkTaskStatus {
running,
done,
failed,
cancelled,
unknown,
};

struct ChiefWorkTask {
std::string command{};
std::optional<std::string> detail{};
std::optional<std::uint64_t> ended_at{};
std::string id{};
std::string session_id{};
std::optional<std::uint64_t> started_at{};
ChiefWorkTaskStatus status{};
std::string title{};
friend bool operator==(const ChiefWorkTask&, const ChiefWorkTask&) = default;
};

struct ChiefWorkResult {
std::vector<ChiefWorkAgent> agents{};
std::vector<std::string> task_sources{};
std::vector<ChiefWorkTask> tasks{};
bool truncated{};
friend bool operator==(const ChiefWorkResult&, const ChiefWorkResult&) = default;
};

enum class TerminalKey {
unidentified,
backquote,
Expand Down Expand Up @@ -6273,6 +6329,18 @@ struct Codec<CellPixelSurface> {
static Result<CellPixelSurface> decode(const Json& value);
};

template <>
struct Codec<ChiefWorkAgent> {
static Result<Json> encode(const ChiefWorkAgent& value);
static Result<ChiefWorkAgent> decode(const Json& value);
};

template <>
struct Codec<ChiefWorkTask> {
static Result<Json> encode(const ChiefWorkTask& value);
static Result<ChiefWorkTask> decode(const Json& value);
};

template <>
struct Codec<ClientInfo> {
static Result<Json> encode(const ClientInfo& value);
Expand Down Expand Up @@ -7617,6 +7685,18 @@ struct Codec<ChiefInspectResult> {
static Result<ChiefInspectResult> decode(const Json& value);
};

template <>
struct Codec<ChiefWorkRequest> {
static Result<Json> encode(const ChiefWorkRequest& value);
static Result<ChiefWorkRequest> decode(const Json& value);
};

template <>
struct Codec<ChiefWorkResult> {
static Result<Json> encode(const ChiefWorkResult& value);
static Result<ChiefWorkResult> decode(const Json& value);
};

template <>
struct Codec<ClearHistoryRequest> {
static Result<Json> encode(const ClearHistoryRequest& value);
Expand Down Expand Up @@ -10023,6 +10103,18 @@ struct Codec<WorkspaceRenamedEvent> {
static Result<WorkspaceRenamedEvent> decode(const Json& value);
};

template <>
struct Codec<ChiefWorkAgentState> {
static Result<Json> encode(const ChiefWorkAgentState& value);
static Result<ChiefWorkAgentState> decode(const Json& value);
};

template <>
struct Codec<ChiefWorkTaskStatus> {
static Result<Json> encode(const ChiefWorkTaskStatus& value);
static Result<ChiefWorkTaskStatus> decode(const Json& value);
};

template <>
struct Codec<CopyResultMode> {
static Result<Json> encode(const CopyResultMode& value);
Expand Down
Loading
Loading