@agent-marshal/marshal-prime-agent 0.48.4
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/README.md +73 -0
- package/package.json +48 -0
- package/src/daemon.ts +358 -0
- package/src/entities.ts +197 -0
- package/src/generated/AckMessages.ts +16 -0
- package/src/generated/AckMessagesArgs.ts +16 -0
- package/src/generated/AckMessagesResult.ts +12 -0
- package/src/generated/AutoSource.ts +9 -0
- package/src/generated/BroadcastMessage.ts +10 -0
- package/src/generated/BroadcastMessageArgs.ts +10 -0
- package/src/generated/BroadcastMessageResult.ts +25 -0
- package/src/generated/CancelSubscription.ts +6 -0
- package/src/generated/ChildEntities.ts +6 -0
- package/src/generated/ChildEntitiesAllTime.ts +6 -0
- package/src/generated/ClearClientWindbackTime.ts +7 -0
- package/src/generated/ClearClientWindbackTimeArgs.ts +3 -0
- package/src/generated/Client.ts +14 -0
- package/src/generated/ClientCount.ts +3 -0
- package/src/generated/ClientId.ts +3 -0
- package/src/generated/ClientStatus.ts +7 -0
- package/src/generated/ClientStatusOutput.ts +3 -0
- package/src/generated/CommandError.ts +3 -0
- package/src/generated/CommandResponse.ts +4 -0
- package/src/generated/CountAllClients.ts +3 -0
- package/src/generated/CountAllMessageReads.ts +3 -0
- package/src/generated/CountAllMessages.ts +3 -0
- package/src/generated/CountAllRoomMembers.ts +3 -0
- package/src/generated/CountAllRooms.ts +3 -0
- package/src/generated/CountAllServers.ts +3 -0
- package/src/generated/CountAllSessionNicknames.ts +3 -0
- package/src/generated/CountAllSessions.ts +3 -0
- package/src/generated/CountClients.ts +4 -0
- package/src/generated/CountMessageReads.ts +4 -0
- package/src/generated/CountMessages.ts +4 -0
- package/src/generated/CountRoomMembers.ts +4 -0
- package/src/generated/CountRooms.ts +4 -0
- package/src/generated/CountServers.ts +4 -0
- package/src/generated/CountSessionNicknames.ts +4 -0
- package/src/generated/CountSessions.ts +4 -0
- package/src/generated/DeleteClient.ts +7 -0
- package/src/generated/DeleteClientArgs.ts +4 -0
- package/src/generated/DeleteClientResult.ts +6 -0
- package/src/generated/DeleteClients.ts +7 -0
- package/src/generated/DeleteClientsArgs.ts +4 -0
- package/src/generated/DeleteClientsResult.ts +6 -0
- package/src/generated/DeleteMessage.ts +7 -0
- package/src/generated/DeleteMessageArgs.ts +4 -0
- package/src/generated/DeleteMessageRead.ts +7 -0
- package/src/generated/DeleteMessageReadArgs.ts +4 -0
- package/src/generated/DeleteMessageReadResult.ts +6 -0
- package/src/generated/DeleteMessageReads.ts +7 -0
- package/src/generated/DeleteMessageReadsArgs.ts +4 -0
- package/src/generated/DeleteMessageReadsResult.ts +6 -0
- package/src/generated/DeleteMessageResult.ts +6 -0
- package/src/generated/DeleteMessages.ts +7 -0
- package/src/generated/DeleteMessagesArgs.ts +4 -0
- package/src/generated/DeleteMessagesResult.ts +6 -0
- package/src/generated/DeleteRoom.ts +7 -0
- package/src/generated/DeleteRoomArgs.ts +4 -0
- package/src/generated/DeleteRoomMember.ts +7 -0
- package/src/generated/DeleteRoomMemberArgs.ts +4 -0
- package/src/generated/DeleteRoomMemberResult.ts +6 -0
- package/src/generated/DeleteRoomMembers.ts +7 -0
- package/src/generated/DeleteRoomMembersArgs.ts +4 -0
- package/src/generated/DeleteRoomMembersResult.ts +6 -0
- package/src/generated/DeleteRoomResult.ts +6 -0
- package/src/generated/DeleteRooms.ts +7 -0
- package/src/generated/DeleteRoomsArgs.ts +4 -0
- package/src/generated/DeleteRoomsResult.ts +6 -0
- package/src/generated/DeleteServer.ts +7 -0
- package/src/generated/DeleteServerArgs.ts +4 -0
- package/src/generated/DeleteServerResult.ts +6 -0
- package/src/generated/DeleteServers.ts +7 -0
- package/src/generated/DeleteServersArgs.ts +4 -0
- package/src/generated/DeleteServersResult.ts +6 -0
- package/src/generated/DeleteSession.ts +7 -0
- package/src/generated/DeleteSessionArgs.ts +4 -0
- package/src/generated/DeleteSessionNickname.ts +7 -0
- package/src/generated/DeleteSessionNicknameArgs.ts +4 -0
- package/src/generated/DeleteSessionNicknameResult.ts +6 -0
- package/src/generated/DeleteSessionNicknames.ts +7 -0
- package/src/generated/DeleteSessionNicknamesArgs.ts +4 -0
- package/src/generated/DeleteSessionNicknamesResult.ts +6 -0
- package/src/generated/DeleteSessionResult.ts +6 -0
- package/src/generated/DeleteSessions.ts +7 -0
- package/src/generated/DeleteSessionsArgs.ts +4 -0
- package/src/generated/DeleteSessionsResult.ts +6 -0
- package/src/generated/DeliveredRecipient.ts +4 -0
- package/src/generated/EntitySearch.ts +21 -0
- package/src/generated/EntitySearchResult.ts +10 -0
- package/src/generated/EntitySnapshotDifference.ts +6 -0
- package/src/generated/EntitySnapshotDifferenceData.ts +7 -0
- package/src/generated/EntityTreeExport.ts +27 -0
- package/src/generated/EventContainer.ts +7 -0
- package/src/generated/EventOptions.ts +11 -0
- package/src/generated/EventsForTransaction.ts +6 -0
- package/src/generated/ExportEntityTree.ts +24 -0
- package/src/generated/ExportedEntity.ts +15 -0
- package/src/generated/FailedRecipient.ts +4 -0
- package/src/generated/FullChildEntities.ts +6 -0
- package/src/generated/GetAllClients.ts +3 -0
- package/src/generated/GetAllMessageReads.ts +3 -0
- package/src/generated/GetAllMessages.ts +3 -0
- package/src/generated/GetAllRoomMembers.ts +3 -0
- package/src/generated/GetAllRooms.ts +3 -0
- package/src/generated/GetAllServers.ts +3 -0
- package/src/generated/GetAllSessionNicknames.ts +3 -0
- package/src/generated/GetAllSessions.ts +3 -0
- package/src/generated/GetClientById.ts +4 -0
- package/src/generated/GetClientsByIds.ts +4 -0
- package/src/generated/GetClientsByQuery.ts +4 -0
- package/src/generated/GetConnectedServer.ts +3 -0
- package/src/generated/GetItemsByTypeAndIds.ts +14 -0
- package/src/generated/GetMessageById.ts +4 -0
- package/src/generated/GetMessageReadById.ts +4 -0
- package/src/generated/GetMessageReadsByIds.ts +4 -0
- package/src/generated/GetMessageReadsByQuery.ts +4 -0
- package/src/generated/GetMessagesByIds.ts +4 -0
- package/src/generated/GetMessagesByQuery.ts +4 -0
- package/src/generated/GetPeerServers.ts +3 -0
- package/src/generated/GetPersistHealth.ts +8 -0
- package/src/generated/GetRoomById.ts +4 -0
- package/src/generated/GetRoomMemberById.ts +4 -0
- package/src/generated/GetRoomMembersByIds.ts +4 -0
- package/src/generated/GetRoomMembersByQuery.ts +4 -0
- package/src/generated/GetRoomsByIds.ts +4 -0
- package/src/generated/GetRoomsByQuery.ts +4 -0
- package/src/generated/GetServerById.ts +4 -0
- package/src/generated/GetServersByIds.ts +4 -0
- package/src/generated/GetServersByQuery.ts +4 -0
- package/src/generated/GetSessionById.ts +4 -0
- package/src/generated/GetSessionNicknameById.ts +4 -0
- package/src/generated/GetSessionNicknamesByIds.ts +4 -0
- package/src/generated/GetSessionNicknamesByQuery.ts +4 -0
- package/src/generated/GetSessionsByIds.ts +4 -0
- package/src/generated/GetSessionsByQuery.ts +4 -0
- package/src/generated/HostInfo.ts +21 -0
- package/src/generated/ImportItems.ts +19 -0
- package/src/generated/ImportItemsArgs.ts +13 -0
- package/src/generated/ItemStub.ts +7 -0
- package/src/generated/JoinRoom.ts +19 -0
- package/src/generated/JoinRoomArgs.ts +19 -0
- package/src/generated/JoinRoomResult.ts +14 -0
- package/src/generated/LeaveRoom.ts +14 -0
- package/src/generated/LeaveRoomArgs.ts +14 -0
- package/src/generated/LeaveRoomResult.ts +9 -0
- package/src/generated/LivePushStatus.ts +3 -0
- package/src/generated/LogLevel.ts +6 -0
- package/src/generated/Loggers.ts +6 -0
- package/src/generated/MEvent.ts +5 -0
- package/src/generated/MEventType.ts +3 -0
- package/src/generated/Message.ts +60 -0
- package/src/generated/MessageCount.ts +3 -0
- package/src/generated/MessageId.ts +3 -0
- package/src/generated/MessageRead.ts +10 -0
- package/src/generated/MessageReadCount.ts +3 -0
- package/src/generated/MessageReadId.ts +3 -0
- package/src/generated/MessageView.ts +12 -0
- package/src/generated/MykoMessage.ts +19 -0
- package/src/generated/NotifyChannel.ts +10 -0
- package/src/generated/NotifyChannelArgs.ts +4 -0
- package/src/generated/PartialClient.ts +14 -0
- package/src/generated/PartialMessage.ts +60 -0
- package/src/generated/PartialMessageRead.ts +10 -0
- package/src/generated/PartialRoom.ts +23 -0
- package/src/generated/PartialRoomMember.ts +13 -0
- package/src/generated/PartialServer.ts +4 -0
- package/src/generated/PartialSession.ts +130 -0
- package/src/generated/PartialSessionNickname.ts +9 -0
- package/src/generated/PeerAlive.ts +7 -0
- package/src/generated/PersistHealthStatus.ts +34 -0
- package/src/generated/PingData.ts +14 -0
- package/src/generated/QueryError.ts +3 -0
- package/src/generated/QueryWindow.ts +3 -0
- package/src/generated/QueryWindowUpdate.ts +4 -0
- package/src/generated/ReadMessages.ts +48 -0
- package/src/generated/ReadMessagesArgs.ts +48 -0
- package/src/generated/ReadMessagesResult.ts +9 -0
- package/src/generated/ReportError.ts +3 -0
- package/src/generated/ReportResponse.ts +4 -0
- package/src/generated/Room.ts +23 -0
- package/src/generated/RoomCount.ts +3 -0
- package/src/generated/RoomId.ts +3 -0
- package/src/generated/RoomKind.ts +9 -0
- package/src/generated/RoomMember.ts +13 -0
- package/src/generated/RoomMemberCount.ts +3 -0
- package/src/generated/RoomMemberId.ts +3 -0
- package/src/generated/SearchServer.ts +8 -0
- package/src/generated/SearchServerResult.ts +4 -0
- package/src/generated/SendMessage.ts +12 -0
- package/src/generated/SendMessageArgs.ts +12 -0
- package/src/generated/SendMessageResult.ts +33 -0
- package/src/generated/Server.ts +4 -0
- package/src/generated/ServerCount.ts +3 -0
- package/src/generated/ServerId.ts +3 -0
- package/src/generated/ServerLogLevel.ts +6 -0
- package/src/generated/ServerStats.ts +27 -0
- package/src/generated/ServerStatsOutput.ts +20 -0
- package/src/generated/Session.ts +130 -0
- package/src/generated/SessionCount.ts +3 -0
- package/src/generated/SessionId.ts +3 -0
- package/src/generated/SessionNickname.ts +9 -0
- package/src/generated/SessionNicknameCount.ts +3 -0
- package/src/generated/SessionNicknameId.ts +3 -0
- package/src/generated/SetClientWindbackTime.ts +11 -0
- package/src/generated/SetClientWindbackTimeArgs.ts +7 -0
- package/src/generated/SetLogLevel.ts +7 -0
- package/src/generated/SetLogLevelArgs.ts +4 -0
- package/src/generated/SetRoomDescription.ts +7 -0
- package/src/generated/SetRoomDescriptionArgs.ts +4 -0
- package/src/generated/SetRoomName.ts +7 -0
- package/src/generated/SetRoomNameArgs.ts +4 -0
- package/src/generated/SetSessionActivity.ts +7 -0
- package/src/generated/SetSessionActivityArgs.ts +4 -0
- package/src/generated/SetSessionCurrentTask.ts +7 -0
- package/src/generated/SetSessionCurrentTaskArgs.ts +4 -0
- package/src/generated/SetSessionGitBranch.ts +7 -0
- package/src/generated/SetSessionGitBranchArgs.ts +4 -0
- package/src/generated/SetSessionLastActivityAt.ts +7 -0
- package/src/generated/SetSessionLastActivityAtArgs.ts +4 -0
- package/src/generated/SetSessionLastTool.ts +7 -0
- package/src/generated/SetSessionLastToolArgs.ts +4 -0
- package/src/generated/SetSessionLastToolAt.ts +7 -0
- package/src/generated/SetSessionLastToolAtArgs.ts +4 -0
- package/src/generated/SetSessionSessionName.ts +7 -0
- package/src/generated/SetSessionSessionNameArgs.ts +4 -0
- package/src/generated/StartProfile.ts +10 -0
- package/src/generated/StartProfileArgs.ts +7 -0
- package/src/generated/StopProfile.ts +6 -0
- package/src/generated/StopProfileArgs.ts +3 -0
- package/src/generated/StopProfileOutput.ts +14 -0
- package/src/generated/ViewError.ts +3 -0
- package/src/generated/ViewWindowUpdate.ts +4 -0
- package/src/generated/WakeStatus.ts +3 -0
- package/src/generated/WindbackStatus.ts +3 -0
- package/src/generated/WindbackStatusOutput.ts +11 -0
- package/src/generated/WrappedCommand.ts +4 -0
- package/src/generated/WrappedItem.ts +7 -0
- package/src/generated/WrappedQuery.ts +5 -0
- package/src/generated/WrappedReport.ts +4 -0
- package/src/generated/WrappedView.ts +5 -0
- package/src/generated/index.ts +1060 -0
- package/src/generated/serde_json/JsonValue.ts +3 -0
- package/src/identity.ts +61 -0
- package/src/index.ts +589 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { AutoSource } from "./AutoSource";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What kind of room this is. Auto-rooms carry their `AutoSource` so
|
|
6
|
+
* the saga can reconcile membership and the UI can flag them
|
|
7
|
+
* differently from ad-hoc rooms (icon, dim color, can't-leave).
|
|
8
|
+
*/
|
|
9
|
+
export type RoomKind = { "kind": "auto", source: AutoSource, } | { "kind": "adhoc" };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { RoomId } from "./RoomId";
|
|
3
|
+
import type { RoomMemberId } from "./RoomMemberId";
|
|
4
|
+
import type { SessionId } from "./SessionId";
|
|
5
|
+
|
|
6
|
+
export type RoomMember = { roomId: RoomId, sessionId: SessionId,
|
|
7
|
+
/**
|
|
8
|
+
* Wall-clock millis when this session first joined this room.
|
|
9
|
+
* Used by `read_messages` visibility rules: members only see
|
|
10
|
+
* messages sent at or after `joined_at` so a re-join doesn't
|
|
11
|
+
* surface back-history they were never part of.
|
|
12
|
+
*/
|
|
13
|
+
joinedAt: bigint, id: RoomMemberId, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Search this entity type by query string. Backed by the typed
|
|
5
|
+
* per-entity `SearchIndex<T>` (exact + nucleo subsequence +
|
|
6
|
+
* Levenshtein typo). Returns matching ids in tier order.
|
|
7
|
+
*/
|
|
8
|
+
export type SearchServer = { query: string, limit: number, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { SessionId } from "./SessionId";
|
|
3
|
+
|
|
4
|
+
export type SendMessage = { toSessionId: SessionId, body: string,
|
|
5
|
+
/**
|
|
6
|
+
* Self-identified sender, for callers with no connection identity —
|
|
7
|
+
* an agent calling this tool over stock myko's HTTP-MCP transport
|
|
8
|
+
* (no WS `client_id`). The id is the agent's own `session_id`, which
|
|
9
|
+
* it learned from its SessionStart hook output. WS shim callers omit
|
|
10
|
+
* this; the server derives the sender from the live connection.
|
|
11
|
+
*/
|
|
12
|
+
asSession?: SessionId | null, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { SessionId } from "./SessionId";
|
|
3
|
+
|
|
4
|
+
export type SendMessageArgs = { toSessionId: SessionId, body: string,
|
|
5
|
+
/**
|
|
6
|
+
* Self-identified sender, for callers with no connection identity —
|
|
7
|
+
* an agent calling this tool over stock myko's HTTP-MCP transport
|
|
8
|
+
* (no WS `client_id`). The id is the agent's own `session_id`, which
|
|
9
|
+
* it learned from its SessionStart hook output. WS shim callers omit
|
|
10
|
+
* this; the server derives the sender from the live connection.
|
|
11
|
+
*/
|
|
12
|
+
asSession?: SessionId | null, };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { LivePushStatus } from "./LivePushStatus";
|
|
3
|
+
import type { MessageId } from "./MessageId";
|
|
4
|
+
import type { SessionId } from "./SessionId";
|
|
5
|
+
import type { WakeStatus } from "./WakeStatus";
|
|
6
|
+
|
|
7
|
+
export type SendMessageResult = { messageId: MessageId,
|
|
8
|
+
/**
|
|
9
|
+
* Recipient's session id, echoed back so callers can confirm what
|
|
10
|
+
* was actually addressed (the daemon's caller resolution can
|
|
11
|
+
* disambiguate by host+cwd in edge cases the client couldn't see).
|
|
12
|
+
*/
|
|
13
|
+
toSessionId: SessionId, sentAt: bigint,
|
|
14
|
+
/**
|
|
15
|
+
* Outcome of the synchronous `NotifyChannel` path. This says nothing
|
|
16
|
+
* about a later wake bridge attempt.
|
|
17
|
+
*/
|
|
18
|
+
livePush: LivePushStatus,
|
|
19
|
+
/**
|
|
20
|
+
* Whether this synchronous response observed an asynchronous wake.
|
|
21
|
+
*
|
|
22
|
+
* A durable unread message may be noticed by a Codex bridge after this
|
|
23
|
+
* command returns. Marshal currently has no bridge acknowledgement path,
|
|
24
|
+
* so an inbox result is `Unobserved`, never a false claim of wake failure.
|
|
25
|
+
*/
|
|
26
|
+
wake: WakeStatus,
|
|
27
|
+
/**
|
|
28
|
+
* Compatibility alias for clients predating `live_push`.
|
|
29
|
+
*
|
|
30
|
+
* This is `true` exactly when `live_push == Delivered`. It describes only
|
|
31
|
+
* the synchronous channel push; it does not describe asynchronous wake.
|
|
32
|
+
*/
|
|
33
|
+
deliveredLive: boolean, };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Report that returns current server statistics.
|
|
5
|
+
*
|
|
6
|
+
* This report demonstrates:
|
|
7
|
+
* - Subscribing to multiple queries (`GetConnectedServer`, `GetAllClients`)
|
|
8
|
+
* - Combining query results reactively
|
|
9
|
+
* - Computing derived values (uptime)
|
|
10
|
+
*
|
|
11
|
+
* # Example
|
|
12
|
+
*
|
|
13
|
+
* ```text
|
|
14
|
+
* // Client-side usage:
|
|
15
|
+
* let cell = client.watch_report::<ServerStats, ServerStatsOutput>(ServerStats {});
|
|
16
|
+
*
|
|
17
|
+
* // `cell` updates whenever server/client state changes.
|
|
18
|
+
* // Read current value:
|
|
19
|
+
* let latest = cell.get();
|
|
20
|
+
*
|
|
21
|
+
* // Or subscribe reactively:
|
|
22
|
+
* let _guard = cell.subscribe(|signal| {
|
|
23
|
+
* // handle Signal::Value(Some(ServerStatsOutput { ... }))
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export type ServerStats = Record<string, never>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { Server } from "./Server";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Server statistics including connected client count.
|
|
6
|
+
* This is a manually implemented report demonstrating reactive query subscriptions.
|
|
7
|
+
*/
|
|
8
|
+
export type ServerStatsOutput = {
|
|
9
|
+
/**
|
|
10
|
+
* The server entity (if found)
|
|
11
|
+
*/
|
|
12
|
+
server: Server | null,
|
|
13
|
+
/**
|
|
14
|
+
* Number of clients connected to this server
|
|
15
|
+
*/
|
|
16
|
+
clientCount: number,
|
|
17
|
+
/**
|
|
18
|
+
* Server uptime in seconds (computed from started_at)
|
|
19
|
+
*/
|
|
20
|
+
uptimeSeconds: bigint | null, };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { ClientId } from "./ClientId";
|
|
3
|
+
import type { HostInfo } from "./HostInfo";
|
|
4
|
+
import type { SessionId } from "./SessionId";
|
|
5
|
+
|
|
6
|
+
export type Session = {
|
|
7
|
+
/**
|
|
8
|
+
* WebSocket client this session is currently bound to. Auto-populated
|
|
9
|
+
* by the server from the WS connection — clients send the SET command
|
|
10
|
+
* without providing it. There is intentionally no `belongs_to(Client)`
|
|
11
|
+
* cascade: sessions are durable roster entries that survive
|
|
12
|
+
* disconnects (and daemon restarts, via the disk persister). Whether
|
|
13
|
+
* a session's shim is currently live is determined by looking up
|
|
14
|
+
* `client_id` in the Client store; absent there ⇒ disconnected.
|
|
15
|
+
*/
|
|
16
|
+
clientId?: ClientId | null,
|
|
17
|
+
/**
|
|
18
|
+
* OS process id of the connecting client.
|
|
19
|
+
*/
|
|
20
|
+
pid: number,
|
|
21
|
+
/**
|
|
22
|
+
* Working directory the client launched from.
|
|
23
|
+
*/
|
|
24
|
+
cwd: string,
|
|
25
|
+
/**
|
|
26
|
+
* Git branch in `cwd`, if it's a repo. Pushed by the shim's HEAD watcher
|
|
27
|
+
* on checkout/switch (event-driven, not sampled at startup) so peers see
|
|
28
|
+
* branch changes mid-session, matching the operator's own statusline.
|
|
29
|
+
*/
|
|
30
|
+
gitBranch?: string | null,
|
|
31
|
+
/**
|
|
32
|
+
* Free-form short status text, settable via the `set_status` command.
|
|
33
|
+
* Surfaces on the roster so peers can see what this session is up to
|
|
34
|
+
* without needing a separate task system.
|
|
35
|
+
*/
|
|
36
|
+
currentTask?: string | null,
|
|
37
|
+
/**
|
|
38
|
+
* Human-facing session name. For Claude Code this is the operator's
|
|
39
|
+
* `/rename` value (Claude's auto-generated title until they rename),
|
|
40
|
+
* read by the shim from Claude's per-PID manifest
|
|
41
|
+
* `~/.claude/sessions/<pid>.json` (`name`) and refreshed when it
|
|
42
|
+
* changes mid-session. Distinct from `nickname` — the daemon-assigned
|
|
43
|
+
* stable handle peers ADDRESS: this is what the human *called* the
|
|
44
|
+
* session, so the roster is legible for cross-repo targeting ("which
|
|
45
|
+
* agent is doing X"). `None` for harnesses with no such manifest
|
|
46
|
+
* (Codex) or Claude builds predating it.
|
|
47
|
+
*/
|
|
48
|
+
sessionName?: string | null,
|
|
49
|
+
/**
|
|
50
|
+
* Live activity / turn-state, from Claude's per-PID manifest `status`:
|
|
51
|
+
* `"busy"` (processing a turn), `"idle"` (awaiting input), or `"shell"`
|
|
52
|
+
* (in a shell command). A truer "is this agent working right now" signal
|
|
53
|
+
* than `last_activity_at`, which only moves on MCP tool calls — an agent
|
|
54
|
+
* can be `busy` for minutes without touching marshal. The shim pushes it
|
|
55
|
+
* event-driven (an fs-watch on the manifest), so the roster tracks
|
|
56
|
+
* turn-state in near real time. `None` for harnesses with no such
|
|
57
|
+
* manifest (Codex) or older Claude builds.
|
|
58
|
+
*/
|
|
59
|
+
activity?: string | null,
|
|
60
|
+
/**
|
|
61
|
+
* Session kind, from the manifest `kind`: `"interactive"` (a human at a
|
|
62
|
+
* terminal) or `"bg"` (a background / headless agent). Set once at
|
|
63
|
+
* registration — it doesn't change over a session's life, so no setter.
|
|
64
|
+
* `None` when unknown (no manifest).
|
|
65
|
+
*/
|
|
66
|
+
kind?: string | null,
|
|
67
|
+
/**
|
|
68
|
+
* Wall-clock millis since unix epoch when the session connected.
|
|
69
|
+
*/
|
|
70
|
+
connectedAt: bigint,
|
|
71
|
+
/**
|
|
72
|
+
* Wall-clock millis at the most recent shim-side activity (any
|
|
73
|
+
* MCP tool call). Bumped by the shim's `Activity` tracker (the
|
|
74
|
+
* same one that gates the self-update watcher's exec swap) and
|
|
75
|
+
* flushed upstream periodically — `None` until the first push,
|
|
76
|
+
* then a sliding timestamp the roster surfaces uses to compute
|
|
77
|
+
* "did this peer do anything in the last N seconds?". Stale =
|
|
78
|
+
* candidate for the stuck-session visualization.
|
|
79
|
+
*/
|
|
80
|
+
lastActivityAt?: bigint | null,
|
|
81
|
+
/**
|
|
82
|
+
* Name of the most recent MCP tool the shim served (e.g.
|
|
83
|
+
* "send_message", "set_status"). Captures only the tool name —
|
|
84
|
+
* no arguments, no payloads — so the roster can show "this peer
|
|
85
|
+
* last called X 3s ago" without leaking message content. Pair
|
|
86
|
+
* with `last_tool_at` for staleness reasoning.
|
|
87
|
+
*/
|
|
88
|
+
lastTool?: string | null,
|
|
89
|
+
/**
|
|
90
|
+
* Wall-clock millis when `last_tool` was served. Distinct from
|
|
91
|
+
* `last_activity_at` because activity covers all shim traffic
|
|
92
|
+
* (notifications, periodic heartbeats, anything the dispatcher
|
|
93
|
+
* touches) while this is the timestamp of the last *named* MCP
|
|
94
|
+
* tool call. They typically agree, but a session that only
|
|
95
|
+
* receives notifications and never calls a tool will have a
|
|
96
|
+
* fresh `last_activity_at` and a stale `last_tool_at`.
|
|
97
|
+
*/
|
|
98
|
+
lastToolAt?: bigint | null,
|
|
99
|
+
/**
|
|
100
|
+
* Which human this session belongs to. Resolved by the shim:
|
|
101
|
+
* `$MARSHAL_OPERATOR` → `$USER` → `"anonymous"`. Anchors the
|
|
102
|
+
* auto-room `op:<operator>`, so peers can see "all of trevor's
|
|
103
|
+
* sessions" regardless of cwd. `None` for legacy / observer
|
|
104
|
+
* shims that don't set it.
|
|
105
|
+
*/
|
|
106
|
+
operator?: string | null,
|
|
107
|
+
/**
|
|
108
|
+
* Host environment summary the shim populates at startup.
|
|
109
|
+
* Anchors the auto-room `host:<name>`. See `HostInfo`.
|
|
110
|
+
*/
|
|
111
|
+
host?: HostInfo | null,
|
|
112
|
+
/**
|
|
113
|
+
* Project basename — the basename of the git repo root containing
|
|
114
|
+
* this session's `cwd`. Resolved by the shim at startup (the
|
|
115
|
+
* daemon can't run `git` against a remote shim's filesystem).
|
|
116
|
+
* Anchors the auto-room `project:<basename>`. `None` when `cwd`
|
|
117
|
+
* isn't inside a git repo.
|
|
118
|
+
*/
|
|
119
|
+
project?: string | null,
|
|
120
|
+
/**
|
|
121
|
+
* Whether this session can receive LIVE channel pushes — i.e. its
|
|
122
|
+
* claude was launched with `--dangerously-load-development-channels
|
|
123
|
+
* …marshal`. The shim resolves it from the parent process at startup;
|
|
124
|
+
* the daemon can't see it (it's a recipient-host launch detail).
|
|
125
|
+
* `None` = unknown (legacy shim that doesn't report it). `SendMessage`
|
|
126
|
+
* uses it to report `delivered_live` HONESTLY: a live WS client with
|
|
127
|
+
* channels OFF still can't render a push, so the message is queued to
|
|
128
|
+
* the inbox (delivered_live = false) rather than claimed as live.
|
|
129
|
+
*/
|
|
130
|
+
channelsEnabled?: boolean | null, id: SessionId, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { SessionNicknameId } from "./SessionNicknameId";
|
|
3
|
+
|
|
4
|
+
export type SessionNickname = {
|
|
5
|
+
/**
|
|
6
|
+
* The assigned `adjective-noun` handle, frozen for this session's life.
|
|
7
|
+
* The entity `id` is the session id it belongs to.
|
|
8
|
+
*/
|
|
9
|
+
nickname: string, id: SessionNicknameId, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Command to set the windback time for the current client.
|
|
5
|
+
* When set, queries return historical state as of the specified timestamp.
|
|
6
|
+
*/
|
|
7
|
+
export type SetClientWindbackTime = {
|
|
8
|
+
/**
|
|
9
|
+
* ISO timestamp to wind back to
|
|
10
|
+
*/
|
|
11
|
+
windback: string, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { LogLevel } from "./LogLevel";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Command to set the log level for a server.
|
|
6
|
+
*/
|
|
7
|
+
export type SetLogLevel = { serverId: string, level: LogLevel, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { RoomId } from "./RoomId";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Auto-generated setter command
|
|
6
|
+
*/
|
|
7
|
+
export type SetRoomDescription = { id: RoomId, description: string | null, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { SessionId } from "./SessionId";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Auto-generated setter command
|
|
6
|
+
*/
|
|
7
|
+
export type SetSessionActivity = { id: SessionId, activity: string | null, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { SessionId } from "./SessionId";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Auto-generated setter command
|
|
6
|
+
*/
|
|
7
|
+
export type SetSessionCurrentTask = { id: SessionId, currentTask: string | null, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { SessionId } from "./SessionId";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Auto-generated setter command
|
|
6
|
+
*/
|
|
7
|
+
export type SetSessionGitBranch = { id: SessionId, gitBranch: string | null, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { SessionId } from "./SessionId";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Auto-generated setter command
|
|
6
|
+
*/
|
|
7
|
+
export type SetSessionLastActivityAt = { id: SessionId, lastActivityAt: bigint | null, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { SessionId } from "./SessionId";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Auto-generated setter command
|
|
6
|
+
*/
|
|
7
|
+
export type SetSessionLastTool = { id: SessionId, lastTool: string | null, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { SessionId } from "./SessionId";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Auto-generated setter command
|
|
6
|
+
*/
|
|
7
|
+
export type SetSessionLastToolAt = { id: SessionId, lastToolAt: bigint | null, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { SessionId } from "./SessionId";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Auto-generated setter command
|
|
6
|
+
*/
|
|
7
|
+
export type SetSessionSessionName = { id: SessionId, sessionName: string | null, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Start CPU sampling of this server process.
|
|
5
|
+
*/
|
|
6
|
+
export type StartProfile = {
|
|
7
|
+
/**
|
|
8
|
+
* Sampling frequency in Hz. Defaults to 99 when omitted.
|
|
9
|
+
*/
|
|
10
|
+
frequencyHz: number | null, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Result of `StopProfile`. `folded` is the agent-readable primary artifact.
|
|
5
|
+
*/
|
|
6
|
+
export type StopProfileOutput = {
|
|
7
|
+
/**
|
|
8
|
+
* Collapsed stacks, one per line: `root;child;leaf <count>`. Sortable/greppable.
|
|
9
|
+
*/
|
|
10
|
+
folded: string,
|
|
11
|
+
/**
|
|
12
|
+
* Absolute path to a flamegraph `.svg` written to disk for humans (if writable).
|
|
13
|
+
*/
|
|
14
|
+
svgPath: string | null, sampleCount: number, durationMs: bigint, frequencyHz: number, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Report that returns the current windback time for the requesting client.
|
|
5
|
+
* Returns None if the client is not in windback mode.
|
|
6
|
+
*/
|
|
7
|
+
export type WindbackStatusOutput = {
|
|
8
|
+
/**
|
|
9
|
+
* ISO timestamp if in windback mode, None otherwise
|
|
10
|
+
*/
|
|
11
|
+
windback: string | null, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* JSON-valued item wrapper for deserialization and TS export.
|
|
6
|
+
*/
|
|
7
|
+
export type WrappedItem = { item: JsonValue, itemType: string, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { QueryWindow } from "./QueryWindow";
|
|
3
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
4
|
+
|
|
5
|
+
export type WrappedQuery = { query: JsonValue, queryId: string, queryItemType: string, window?: QueryWindow | null, };
|