muse-code-msp 1.4.13__tar.gz → 1.4.14__tar.gz
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.
- {muse_code_msp-1.4.13/src/muse_code_msp.egg-info → muse_code_msp-1.4.14}/PKG-INFO +1 -1
- {muse_code_msp-1.4.13 → muse_code_msp-1.4.14}/pyproject.toml +1 -1
- {muse_code_msp-1.4.13 → muse_code_msp-1.4.14}/src/muse_code_msp/__init__.py +71 -3
- {muse_code_msp-1.4.13 → muse_code_msp-1.4.14}/src/muse_code_msp/experimental/__init__.py +294 -7
- {muse_code_msp-1.4.13 → muse_code_msp-1.4.14/src/muse_code_msp.egg-info}/PKG-INFO +1 -1
- {muse_code_msp-1.4.13 → muse_code_msp-1.4.14}/LICENSE +0 -0
- {muse_code_msp-1.4.13 → muse_code_msp-1.4.14}/README.md +0 -0
- {muse_code_msp-1.4.13 → muse_code_msp-1.4.14}/setup.cfg +0 -0
- {muse_code_msp-1.4.13 → muse_code_msp-1.4.14}/src/muse_code_msp/py.typed +0 -0
- {muse_code_msp-1.4.13 → muse_code_msp-1.4.14}/src/muse_code_msp.egg-info/SOURCES.txt +0 -0
- {muse_code_msp-1.4.13 → muse_code_msp-1.4.14}/src/muse_code_msp.egg-info/dependency_links.txt +0 -0
- {muse_code_msp-1.4.13 → muse_code_msp-1.4.14}/src/muse_code_msp.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: muse-code-msp
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.14
|
|
4
4
|
Summary: Generated Python wire types for the Muse Session Protocol (MSP). No hand-written protocol types, ever.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/meta-models/muse-code-sdk
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "muse-code-msp"
|
|
8
|
-
version = "1.4.
|
|
8
|
+
version = "1.4.14"
|
|
9
9
|
description = "Generated Python wire types for the Muse Session Protocol (MSP). No hand-written protocol types, ever."
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
requires-python = ">=3.10"
|
|
@@ -7,10 +7,10 @@ from __future__ import annotations
|
|
|
7
7
|
|
|
8
8
|
from typing import Any, Final, Literal, TypedDict
|
|
9
9
|
|
|
10
|
-
SCHEMA_FINGERPRINT: Final[str] = "sha256:
|
|
10
|
+
SCHEMA_FINGERPRINT: Final[str] = "sha256:c94c3d1f2f51e6424074b9ec43eac3eedcf532d3dcd77351ec1383a87d3049c6"
|
|
11
11
|
SCHEMA_VERSION: Final[int] = 1
|
|
12
12
|
EXPERIMENTAL: Final[bool] = False
|
|
13
|
-
REQUIRED_HOST_VERSION: Final[str] = "1.4.
|
|
13
|
+
REQUIRED_HOST_VERSION: Final[str] = "1.4.14"
|
|
14
14
|
|
|
15
15
|
# How long a rule created by an approval decision lasts. The set is open, so newer hosts may send other values.
|
|
16
16
|
ApprovalAmendmentDurability = str # open enum: unknown values stay representable
|
|
@@ -121,6 +121,10 @@ FeedbackClassification = Literal["bug", "badResult", "goodResult", "other"]
|
|
|
121
121
|
FeedbackSubmitOutcome = str # open enum: unknown values stay representable
|
|
122
122
|
FEEDBACK_SUBMIT_OUTCOME_KNOWN_VALUES: Final[tuple[str, ...]] = ("uploaded", "recorded", "acceptedWithoutReceipt", "trackingFailed", "trackingUncertain", "dark", "disabled", "noCredential", "authRejected", "rateLimited", "failed",)
|
|
123
123
|
|
|
124
|
+
# What holds a tool call before it is admitted to execute. Open: a client reads an unknown value as held by something it does not know, never as released.
|
|
125
|
+
HeldFor = str # open enum: unknown values stay representable
|
|
126
|
+
HELD_FOR_KNOWN_VALUES: Final[tuple[str, ...]] = ("approval", "hook",)
|
|
127
|
+
|
|
124
128
|
# What history a lifecycle result actually served. Open on the client side: report-what-was-served means a client treats an unknown mode as "page it yourself".
|
|
125
129
|
HistoryMode = str # open enum: unknown values stay representable
|
|
126
130
|
HISTORY_MODE_KNOWN_VALUES: Final[tuple[str, ...]] = ("anchoredSnapshot", "inline", "snapshot", "none",)
|
|
@@ -149,7 +153,7 @@ IfBusy = Literal["queue", "steer", "replace"]
|
|
|
149
153
|
|
|
150
154
|
# The eleven v1 item kinds plus post-v1 kinds. Open: a new kind is additive evolution, and clients MUST render unknown kinds generically.
|
|
151
155
|
ItemKind = str # open enum: unknown values stay representable
|
|
152
|
-
ITEM_KIND_KNOWN_VALUES: Final[tuple[str, ...]] = ("userMessage", "agentMessage", "reasoning", "toolCall", "userShell", "subagent", "workflow", "reminderChild", "compaction", "hookRun", "sideChat", "webSearch", "monitorFeed", "damagedRange", "scheduledFire", "backgroundTerminalCompletion", "overdueNotice",)
|
|
156
|
+
ITEM_KIND_KNOWN_VALUES: Final[tuple[str, ...]] = ("userMessage", "agentMessage", "reasoning", "toolCall", "userShell", "subagent", "workflow", "reminderChild", "compaction", "hookRun", "sideChat", "webSearch", "monitorFeed", "damagedRange", "scheduledFire", "backgroundTerminalCompletion", "overdueNotice", "earlierHistory",)
|
|
153
157
|
|
|
154
158
|
# The `item/readOutput` content encoding. Closed: text media is ALWAYS `utf8` and binary media `base64`; a third value would change the client's decode contract.
|
|
155
159
|
ItemReadOutputEncoding = Literal["utf8", "base64"]
|
|
@@ -238,6 +242,18 @@ RequestId = int | str
|
|
|
238
242
|
RetractOutcome = str # open enum: unknown values stay representable
|
|
239
243
|
RETRACT_OUTCOME_KNOWN_VALUES: Final[tuple[str, ...]] = ("accepted", "declined",)
|
|
240
244
|
|
|
245
|
+
# How a session's worktree is cleaned up. The set is open, so newer hosts may send other values.
|
|
246
|
+
RuntimeWorktreeCleanupPolicy = str # open enum: unknown values stay representable
|
|
247
|
+
RUNTIME_WORKTREE_CLEANUP_POLICY_KNOWN_VALUES: Final[tuple[str, ...]] = ("removeIfClean",)
|
|
248
|
+
|
|
249
|
+
# Where a session's worktree cleanup stands. The set is open, so newer hosts may send other values.
|
|
250
|
+
RuntimeWorktreeCleanupState = str # open enum: unknown values stay representable
|
|
251
|
+
RUNTIME_WORKTREE_CLEANUP_STATE_KNOWN_VALUES: Final[tuple[str, ...]] = ("active", "cleaned", "retained", "cleanupFailed",)
|
|
252
|
+
|
|
253
|
+
# Who owns a session's worktree. The set is open, so newer hosts may send other values.
|
|
254
|
+
RuntimeWorktreeOwnership = str # open enum: unknown values stay representable
|
|
255
|
+
RUNTIME_WORKTREE_OWNERSHIP_KNOWN_VALUES: Final[tuple[str, ...]] = ("runtimeOwned",)
|
|
256
|
+
|
|
241
257
|
# Whether this host can enforce the sandbox. A property of the host process, probed once at construction and identical for every session and every connection it serves — never requested, granted, or negotiated, which is why it is not a capability. Open: a future enforcement posture arrives as a new value, read by older clients as unknown.
|
|
242
258
|
SandboxAvailability = str # open enum: unknown values stay representable
|
|
243
259
|
SANDBOX_AVAILABILITY_KNOWN_VALUES: Final[tuple[str, ...]] = ("available", "unavailable",)
|
|
@@ -537,6 +553,7 @@ class ApprovalRequestParams(_ApprovalRequestParamsBase, total=False):
|
|
|
537
553
|
"""Full params shared by `approval/request` and `approval/requested`."""
|
|
538
554
|
|
|
539
555
|
cuaCardFacts: ApprovalCuaCardFacts
|
|
556
|
+
reviewerReason: str
|
|
540
557
|
subagentOrigin: ApprovalSubagentOrigin
|
|
541
558
|
|
|
542
559
|
|
|
@@ -911,6 +928,19 @@ class DamagedRange(_DamagedRangeBase, total=False):
|
|
|
911
928
|
readableBeforeAt: str
|
|
912
929
|
|
|
913
930
|
|
|
931
|
+
class EarlierHistory(TypedDict):
|
|
932
|
+
"""`earlierHistory`: the boundary checkpoint's transcript tail, served in place of every item that opened in its pruned prefix. No log record carries it; the host derives it from the checkpoint."""
|
|
933
|
+
|
|
934
|
+
messages: list[EarlierHistoryMessage]
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
class EarlierHistoryMessage(TypedDict):
|
|
938
|
+
"""One transcript-tail message of an [`EarlierHistory`] item."""
|
|
939
|
+
|
|
940
|
+
role: str
|
|
941
|
+
text: str
|
|
942
|
+
|
|
943
|
+
|
|
914
944
|
class EffectiveApprovalModeState(TypedDict):
|
|
915
945
|
"""The effective approval-mode projection: the same object `session/setApprovalMode` returns as `effectiveMode` and the `Session` object carries as `approvalMode`."""
|
|
916
946
|
|
|
@@ -1181,6 +1211,7 @@ class Item(_ItemBase, total=False):
|
|
|
1181
1211
|
displayLabel: ToolDisplayLabel
|
|
1182
1212
|
displayText: str
|
|
1183
1213
|
durationMs: int
|
|
1214
|
+
earlierHistory: EarlierHistory
|
|
1184
1215
|
entryId: str
|
|
1185
1216
|
event: HookEventName
|
|
1186
1217
|
exitCode: int
|
|
@@ -1190,6 +1221,8 @@ class Item(_ItemBase, total=False):
|
|
|
1190
1221
|
fallbackText: str
|
|
1191
1222
|
finalSummary: str
|
|
1192
1223
|
generationId: int
|
|
1224
|
+
held: bool
|
|
1225
|
+
heldFor: HeldFor
|
|
1193
1226
|
hookKey: str
|
|
1194
1227
|
jobId: str
|
|
1195
1228
|
label: str
|
|
@@ -1245,6 +1278,7 @@ class Item(_ItemBase, total=False):
|
|
|
1245
1278
|
turnId: str | None
|
|
1246
1279
|
usage: TokenUsage
|
|
1247
1280
|
visibleOutput: str
|
|
1281
|
+
wakeSourceDescriptions: list[str]
|
|
1248
1282
|
workId: str
|
|
1249
1283
|
workflowRunId: str
|
|
1250
1284
|
|
|
@@ -1819,6 +1853,18 @@ class RequestReceipt(TypedDict):
|
|
|
1819
1853
|
pass
|
|
1820
1854
|
|
|
1821
1855
|
|
|
1856
|
+
class RuntimeWorktree(TypedDict):
|
|
1857
|
+
"""The runtime-owned git worktree a child session runs in, mirrored from the `subagent.worktree.*` records on its parent's log. The three enums are open: clients treat an unknown value as unknown."""
|
|
1858
|
+
|
|
1859
|
+
baseCommit: str
|
|
1860
|
+
cleanupPolicy: RuntimeWorktreeCleanupPolicy
|
|
1861
|
+
cleanupState: RuntimeWorktreeCleanupState
|
|
1862
|
+
headCommit: str
|
|
1863
|
+
ownership: RuntimeWorktreeOwnership
|
|
1864
|
+
parentDirtyExcluded: bool
|
|
1865
|
+
worktreeRoot: str
|
|
1866
|
+
|
|
1867
|
+
|
|
1822
1868
|
class SchemaInfo(TypedDict):
|
|
1823
1869
|
"""The `schema` pair in [`InitializeResult`]. `version` is the wire **envelope** schema version — distinct from the session-view `schemaVersion`, the raw-log `schema_version`, and the 0.x/1.0 stability posture, which is not on the wire at all."""
|
|
1824
1870
|
|
|
@@ -1854,14 +1900,19 @@ class Session(_SessionBase, total=False):
|
|
|
1854
1900
|
attention: list[AttentionFlag]
|
|
1855
1901
|
branch: str
|
|
1856
1902
|
createdByClient: ClientInfo
|
|
1903
|
+
driveHolder: ClientInfo
|
|
1857
1904
|
firstUserPrompt: str
|
|
1858
1905
|
generatedName: str
|
|
1906
|
+
itemCount: int
|
|
1859
1907
|
kind: SessionKind
|
|
1860
1908
|
lastActivityAt: str
|
|
1909
|
+
logBytes: int
|
|
1861
1910
|
name: str
|
|
1862
1911
|
nameOrigin: SessionNameOrigin
|
|
1863
1912
|
parentSessionId: str
|
|
1913
|
+
resumedByClient: ClientInfo
|
|
1864
1914
|
sideFrom: SideProvenance | None
|
|
1915
|
+
spawnedBy: SessionSpawnedBy
|
|
1865
1916
|
title: str
|
|
1866
1917
|
|
|
1867
1918
|
|
|
@@ -2134,6 +2185,7 @@ class SessionReadResult(_SessionReadResultBase, total=False):
|
|
|
2134
2185
|
lastTurn: LastTurn
|
|
2135
2186
|
queuedInputs: list[QueuedInput]
|
|
2136
2187
|
recoveryObservation: RecoveryObservation
|
|
2188
|
+
worktree: RuntimeWorktree
|
|
2137
2189
|
|
|
2138
2190
|
|
|
2139
2191
|
class SessionReasoningEffortChangedParams(TypedDict):
|
|
@@ -2177,6 +2229,7 @@ class SessionResumeParams(_SessionResumeParamsBase, total=False):
|
|
|
2177
2229
|
cursor: str | None
|
|
2178
2230
|
excludeItems: bool
|
|
2179
2231
|
history: HistoryPreference
|
|
2232
|
+
modelId: str
|
|
2180
2233
|
permissionProfile: str
|
|
2181
2234
|
recoveryMode: RecoveryMode
|
|
2182
2235
|
|
|
@@ -2258,6 +2311,17 @@ class SessionSideChatResult(TypedDict):
|
|
|
2258
2311
|
viewCursor: str
|
|
2259
2312
|
|
|
2260
2313
|
|
|
2314
|
+
class _SessionSpawnedByBase(TypedDict):
|
|
2315
|
+
parentSessionId: str
|
|
2316
|
+
|
|
2317
|
+
|
|
2318
|
+
class SessionSpawnedBy(_SessionSpawnedByBase, total=False):
|
|
2319
|
+
"""Who opened a session."""
|
|
2320
|
+
|
|
2321
|
+
project: str
|
|
2322
|
+
thread: str
|
|
2323
|
+
|
|
2324
|
+
|
|
2261
2325
|
class _SessionStartParamsBase(TypedDict):
|
|
2262
2326
|
commandId: str
|
|
2263
2327
|
|
|
@@ -2269,9 +2333,11 @@ class SessionStartParams(_SessionStartParamsBase, total=False):
|
|
|
2269
2333
|
config: SessionConfig
|
|
2270
2334
|
modelId: str
|
|
2271
2335
|
permissionProfile: str
|
|
2336
|
+
previousSessionId: str
|
|
2272
2337
|
providerId: str | None
|
|
2273
2338
|
recoveryMode: RecoveryMode
|
|
2274
2339
|
sessionId: str
|
|
2340
|
+
spawnedBy: SessionSpawnedBy
|
|
2275
2341
|
workspaceRoot: str
|
|
2276
2342
|
workspaceRoots: list[str]
|
|
2277
2343
|
|
|
@@ -2812,6 +2878,7 @@ class TurnError(_TurnErrorBase, total=False):
|
|
|
2812
2878
|
"""The settled turn-failure object: `{kind, message, retryable}`."""
|
|
2813
2879
|
|
|
2814
2880
|
quota: QuotaDetail
|
|
2881
|
+
requestDenied: bool
|
|
2815
2882
|
|
|
2816
2883
|
|
|
2817
2884
|
class TurnForegroundCompletedParams(TypedDict):
|
|
@@ -3236,6 +3303,7 @@ class ViewPageParams(_ViewPageParamsBase, total=False):
|
|
|
3236
3303
|
anchor: ViewPageAnchor
|
|
3237
3304
|
cursor: str
|
|
3238
3305
|
direction: ViewPageDirection
|
|
3306
|
+
maxBytes: int
|
|
3239
3307
|
|
|
3240
3308
|
|
|
3241
3309
|
class ViewPageResolvedAnchor(TypedDict):
|
|
@@ -7,10 +7,10 @@ from __future__ import annotations
|
|
|
7
7
|
|
|
8
8
|
from typing import Any, Final, Literal, TypedDict
|
|
9
9
|
|
|
10
|
-
SCHEMA_FINGERPRINT: Final[str] = "sha256:
|
|
10
|
+
SCHEMA_FINGERPRINT: Final[str] = "sha256:159e01dd32c37f5ad711225aa1840dbca653e346fd83bed7f3b2b9ea49b40aa7"
|
|
11
11
|
SCHEMA_VERSION: Final[int] = 1
|
|
12
12
|
EXPERIMENTAL: Final[bool] = True
|
|
13
|
-
REQUIRED_HOST_VERSION: Final[str] = "1.4.
|
|
13
|
+
REQUIRED_HOST_VERSION: Final[str] = "1.4.14"
|
|
14
14
|
|
|
15
15
|
# How a login flow ended. Server-produced, so the vocabulary is open per the E2 rule — a future flow may end in a new way additively.
|
|
16
16
|
AccountLoginOutcome = str # open enum: unknown values stay representable
|
|
@@ -76,7 +76,7 @@ BACKGROUND_STATE_KNOWN_VALUES: Final[tuple[str, ...]] = ("backgrounded",)
|
|
|
76
76
|
|
|
77
77
|
# A grantable capability name. Open: the experimental-only `rawLog` entry joins the stable domain as an additive open-enum extension when it graduates — closed would make that a retype.
|
|
78
78
|
CapabilityName = str # open enum: unknown values stay representable
|
|
79
|
-
CAPABILITY_NAME_KNOWN_VALUES: Final[tuple[str, ...]] = ("userShell", "sessionMcp", "sessionListStream", "feedback", "computerUseSetup", "computerUseHostSetup", "sessionRename", "peerMessaging", "rawLog", "rawLogPhysical",)
|
|
79
|
+
CAPABILITY_NAME_KNOWN_VALUES: Final[tuple[str, ...]] = ("userShell", "sessionMcp", "sessionListStream", "feedback", "computerUseSetup", "computerUseHostSetup", "sessionRename", "peerMessaging", "rawLog", "rawLogPhysical", "daemonVacate",)
|
|
80
80
|
|
|
81
81
|
# The language a Code Mode cell ran in. Open: values are lowercase VS Code language identifiers, and only `javascript` (the V8 engine) is minted today.
|
|
82
82
|
CodeModeLanguage = str # open enum: unknown values stay representable
|
|
@@ -129,9 +129,21 @@ COMPUTER_USE_SETUP_PHASE_KNOWN_VALUES: Final[tuple[str, ...]] = ("dormant", "inP
|
|
|
129
129
|
ContextPressureLevel = str # open enum: unknown values stay representable
|
|
130
130
|
CONTEXT_PRESSURE_LEVEL_KNOWN_VALUES: Final[tuple[str, ...]] = ("normal", "warning", "blocked",)
|
|
131
131
|
|
|
132
|
+
# Why a session's drive holder changed. **Open**: a newer host may add a reason; a client keeps an unknown word and treats the frame as a holder change. No `started`: every `session/start`, `fork` and `sideChat` already broadcasts `session/started`, and the starter drives by construction.
|
|
133
|
+
DriveChangedReason = str # open enum: unknown values stay representable
|
|
134
|
+
DRIVE_CHANGED_REASON_KNOWN_VALUES: Final[tuple[str, ...]] = ("requested", "released", "resumed", "lapsed",)
|
|
135
|
+
|
|
136
|
+
# The answer to a drive release. **Open**: a newer host may add a status; a client keeps an unknown word and treats it as "not released".
|
|
137
|
+
DriveReleaseStatus = str # open enum: unknown values stay representable
|
|
138
|
+
DRIVE_RELEASE_STATUS_KNOWN_VALUES: Final[tuple[str, ...]] = ("released", "busy",)
|
|
139
|
+
|
|
140
|
+
# The answer to a drive request. **Open**: a newer host may add a status; a client keeps an unknown word and treats it as "not granted".
|
|
141
|
+
DriveRequestStatus = str # open enum: unknown values stay representable
|
|
142
|
+
DRIVE_REQUEST_STATUS_KNOWN_VALUES: Final[tuple[str, ...]] = ("granted", "busy",)
|
|
143
|
+
|
|
132
144
|
# A stable `error.data.kind` category: camelCase, the value clients branch on. Open: new kinds are added as their methods land, and a new `kind` is additive only because this domain is declared open.
|
|
133
145
|
ErrorKind = str # open enum: unknown values stay representable
|
|
134
|
-
ERROR_KIND_KNOWN_VALUES: Final[tuple[str, ...]] = ("parseError", "invalidRequest", "notInitialized", "alreadyInitialized", "methodNotFound", "invalidParams", "experimentalRequired", "internal", "pageEventTooLarge", "outputResultTooLarge", "overloaded", "inputTooLarge", "capabilityRequired", "notFound", "interrupted", "cancelled", "sessionNotFound", "sessionInUse", "sessionAmbiguous", "forkBoundaryInvalid", "sessionNotLoaded", "sessionStreamMismatch", "commandRejected", "backpressured", "skillNotFound", "computerUseUnavailable", "marketplaceNotFound", "pluginNotFound", "marketplaceAlreadyExists", "pluginMutationsDisabled", "uploadNotFound", "viewTruncated", "outputUnavailable", "boundaryPruned", "boundaryUnusable", "noBoundary", "approvalNotFound", "approvalAlreadyResolved", "approvalChoiceInvalid", "approvalRequirementStale", "approvalReviewerUnavailable", "userInputNotFound", "userInputAlreadySettled", "userInputAnswerInvalid", "limitsAboveMax", "workspaceNotTrusted", "missingAnchor", "prunedPrefix", "wrongStream", "unknownStream", "unknownProjection", "admissionNotFound", "admissionAlreadyResolved", "admissionChoiceInvalid", "usageRefreshRateLimited", "usageRefreshUnavailable", "usageRefreshFailed",)
|
|
146
|
+
ERROR_KIND_KNOWN_VALUES: Final[tuple[str, ...]] = ("parseError", "invalidRequest", "notInitialized", "alreadyInitialized", "methodNotFound", "invalidParams", "experimentalRequired", "internal", "pageEventTooLarge", "outputResultTooLarge", "overloaded", "inputTooLarge", "capabilityRequired", "notFound", "interrupted", "cancelled", "sessionNotFound", "sessionInUse", "sessionAmbiguous", "forkBoundaryInvalid", "sessionNotLoaded", "sessionStreamMismatch", "commandRejected", "backpressured", "skillNotFound", "computerUseUnavailable", "marketplaceNotFound", "pluginNotFound", "marketplaceAlreadyExists", "pluginMutationsDisabled", "uploadNotFound", "viewTruncated", "outputUnavailable", "boundaryPruned", "boundaryUnusable", "noBoundary", "approvalNotFound", "approvalAlreadyResolved", "approvalChoiceInvalid", "approvalRequirementStale", "approvalReviewerUnavailable", "userInputNotFound", "userInputAlreadySettled", "userInputAnswerInvalid", "daemonDraining", "limitsAboveMax", "workspaceNotTrusted", "missingAnchor", "prunedPrefix", "wrongStream", "unknownStream", "unknownProjection", "admissionNotFound", "admissionAlreadyResolved", "admissionChoiceInvalid", "usageRefreshRateLimited", "usageRefreshUnavailable", "usageRefreshFailed",)
|
|
135
147
|
|
|
136
148
|
# `feedback/submit` classification: the four TUI classes in camelCase wire spelling. **Closed**: a client-selected param vocabulary.
|
|
137
149
|
FeedbackClassification = Literal["bug", "badResult", "goodResult", "other"]
|
|
@@ -140,6 +152,10 @@ FeedbackClassification = Literal["bug", "badResult", "goodResult", "other"]
|
|
|
140
152
|
FeedbackSubmitOutcome = str # open enum: unknown values stay representable
|
|
141
153
|
FEEDBACK_SUBMIT_OUTCOME_KNOWN_VALUES: Final[tuple[str, ...]] = ("uploaded", "recorded", "acceptedWithoutReceipt", "trackingFailed", "trackingUncertain", "dark", "disabled", "noCredential", "authRejected", "rateLimited", "failed",)
|
|
142
154
|
|
|
155
|
+
# What holds a tool call before it is admitted to execute. Open: a client reads an unknown value as held by something it does not know, never as released.
|
|
156
|
+
HeldFor = str # open enum: unknown values stay representable
|
|
157
|
+
HELD_FOR_KNOWN_VALUES: Final[tuple[str, ...]] = ("approval", "hook",)
|
|
158
|
+
|
|
143
159
|
# What history a lifecycle result actually served. Open on the client side: report-what-was-served means a client treats an unknown mode as "page it yourself".
|
|
144
160
|
HistoryMode = str # open enum: unknown values stay representable
|
|
145
161
|
HISTORY_MODE_KNOWN_VALUES: Final[tuple[str, ...]] = ("anchoredSnapshot", "inline", "snapshot", "none",)
|
|
@@ -168,7 +184,7 @@ IfBusy = Literal["queue", "steer", "replace"]
|
|
|
168
184
|
|
|
169
185
|
# The eleven v1 item kinds plus post-v1 kinds. Open: a new kind is additive evolution, and clients MUST render unknown kinds generically.
|
|
170
186
|
ItemKind = str # open enum: unknown values stay representable
|
|
171
|
-
ITEM_KIND_KNOWN_VALUES: Final[tuple[str, ...]] = ("userMessage", "agentMessage", "reasoning", "toolCall", "userShell", "subagent", "workflow", "reminderChild", "compaction", "hookRun", "sideChat", "webSearch", "monitorFeed", "damagedRange", "scheduledFire", "backgroundTerminalCompletion", "overdueNotice", "skillRead",)
|
|
187
|
+
ITEM_KIND_KNOWN_VALUES: Final[tuple[str, ...]] = ("userMessage", "agentMessage", "reasoning", "toolCall", "userShell", "subagent", "workflow", "reminderChild", "compaction", "hookRun", "sideChat", "webSearch", "monitorFeed", "damagedRange", "scheduledFire", "backgroundTerminalCompletion", "overdueNotice", "earlierHistory", "skillRead",)
|
|
172
188
|
|
|
173
189
|
# The `item/readOutput` content encoding. Closed: text media is ALWAYS `utf8` and binary media `base64`; a third value would change the client's decode contract.
|
|
174
190
|
ItemReadOutputEncoding = Literal["utf8", "base64"]
|
|
@@ -227,6 +243,28 @@ MODEL_CHANGE_SOURCE_KNOWN_VALUES: Final[tuple[str, ...]] = ("user", "default", "
|
|
|
227
243
|
OutputRefAvailability = str # open enum: unknown values stay representable
|
|
228
244
|
OUTPUT_REF_AVAILABILITY_KNOWN_VALUES: Final[tuple[str, ...]] = ("available", "missing", "unsupported", "accessFailed",)
|
|
229
245
|
|
|
246
|
+
# Whether the owning lane is alive. **Open**: a newer host's state decodes to `Unknown`.
|
|
247
|
+
PeerMessageOwnerState = str # open enum: unknown values stay representable
|
|
248
|
+
PEER_MESSAGE_OWNER_STATE_KNOWN_VALUES: Final[tuple[str, ...]] = ("owned", "gone",)
|
|
249
|
+
|
|
250
|
+
# How the sender generation's code identity was established. **Open**: a newer host's identity decodes to `Unknown`.
|
|
251
|
+
PeerOriginCodeIdentity = str # open enum: unknown values stay representable
|
|
252
|
+
PEER_ORIGIN_CODE_IDENTITY_KNOWN_VALUES: Final[tuple[str, ...]] = ("verifiedMacosCli", "unverifiedKernelPeer",)
|
|
253
|
+
|
|
254
|
+
# The sender generation's platform. **Open**: a newer host's platform decodes to `Unknown`.
|
|
255
|
+
PeerOriginPlatform = str # open enum: unknown values stay representable
|
|
256
|
+
PEER_ORIGIN_PLATFORM_KNOWN_VALUES: Final[tuple[str, ...]] = ("linux", "macos",)
|
|
257
|
+
|
|
258
|
+
# A connected-sender decision kind, spelled with the decision ids that `admission/resolved` uses for the same decisions. **Open**: a server-produced result vocabulary, so a word this build does not know decodes to `Unknown` instead of failing the page.
|
|
259
|
+
PeerSettlementDecisionKind = str # open enum: unknown values stay representable
|
|
260
|
+
PEER_SETTLEMENT_DECISION_KIND_KNOWN_VALUES: Final[tuple[str, ...]] = ("allow_connected", "reject_once", "block_connected",)
|
|
261
|
+
|
|
262
|
+
# Which kind of sender origin a settlement belongs to. **Closed**: the receiver timeline keys on exactly these two.
|
|
263
|
+
PeerSettlementOriginKind = Literal["authenticated", "nonCoalescing"]
|
|
264
|
+
|
|
265
|
+
# Which kind of released message an outcome shows. **Closed**: the receiver timeline renders exactly these two.
|
|
266
|
+
PeerSettlementOutcomeKind = Literal["normal", "allow_once"]
|
|
267
|
+
|
|
230
268
|
# `peer/list` row `status`: the `LocalSessionStatus` vocabulary. **Open**: a server-produced result vocabulary.
|
|
231
269
|
PeerStatus = str # open enum: unknown values stay representable
|
|
232
270
|
PEER_STATUS_KNOWN_VALUES: Final[tuple[str, ...]] = ("idle", "active", "busy", "closing", "stale", "unknown",)
|
|
@@ -320,6 +358,22 @@ RETRACT_OUTCOME_KNOWN_VALUES: Final[tuple[str, ...]] = ("accepted", "declined",)
|
|
|
320
358
|
ReviewerAuthority = str # open enum: unknown values stay representable
|
|
321
359
|
REVIEWER_AUTHORITY_KNOWN_VALUES: Final[tuple[str, ...]] = ("autoReview", "human", "none",)
|
|
322
360
|
|
|
361
|
+
# Which kind of process runs a session elsewhere on this machine. **Open**: a new origin is additive evolution, and a client MUST treat an unknown value as an unknown-but-present origin rather than rejecting the row.
|
|
362
|
+
RunningElsewhereOrigin = str # open enum: unknown values stay representable
|
|
363
|
+
RUNNING_ELSEWHERE_ORIGIN_KNOWN_VALUES: Final[tuple[str, ...]] = ("tui", "exec", "serve",)
|
|
364
|
+
|
|
365
|
+
# How a session's worktree is cleaned up. The set is open, so newer hosts may send other values.
|
|
366
|
+
RuntimeWorktreeCleanupPolicy = str # open enum: unknown values stay representable
|
|
367
|
+
RUNTIME_WORKTREE_CLEANUP_POLICY_KNOWN_VALUES: Final[tuple[str, ...]] = ("removeIfClean",)
|
|
368
|
+
|
|
369
|
+
# Where a session's worktree cleanup stands. The set is open, so newer hosts may send other values.
|
|
370
|
+
RuntimeWorktreeCleanupState = str # open enum: unknown values stay representable
|
|
371
|
+
RUNTIME_WORKTREE_CLEANUP_STATE_KNOWN_VALUES: Final[tuple[str, ...]] = ("active", "cleaned", "retained", "cleanupFailed",)
|
|
372
|
+
|
|
373
|
+
# Who owns a session's worktree. The set is open, so newer hosts may send other values.
|
|
374
|
+
RuntimeWorktreeOwnership = str # open enum: unknown values stay representable
|
|
375
|
+
RUNTIME_WORKTREE_OWNERSHIP_KNOWN_VALUES: Final[tuple[str, ...]] = ("runtimeOwned",)
|
|
376
|
+
|
|
323
377
|
# Whether this host can enforce the sandbox. A property of the host process, probed once at construction and identical for every session and every connection it serves — never requested, granted, or negotiated, which is why it is not a capability. Open: a future enforcement posture arrives as a new value, read by older clients as unknown.
|
|
324
378
|
SandboxAvailability = str # open enum: unknown values stay representable
|
|
325
379
|
SANDBOX_AVAILABILITY_KNOWN_VALUES: Final[tuple[str, ...]] = ("available", "unavailable",)
|
|
@@ -330,7 +384,7 @@ SANDBOX_UNAVAILABLE_REASON_KNOWN_VALUES: Final[tuple[str, ...]] = ("userNamespac
|
|
|
330
384
|
|
|
331
385
|
# The closed-reason vocabulary. Server-produced and published OPEN by owner ruling — the menu-B pick, which settles that this notification reason enum publishes open rather than resting on E2's result-vocabulary rule by analogy. A crash is deliberately not a reason, because a crash emits no notification at all.
|
|
332
386
|
SessionClosedReason = str # open enum: unknown values stay representable
|
|
333
|
-
SESSION_CLOSED_REASON_KNOWN_VALUES: Final[tuple[str, ...]] = ("idle", "hostShutdown", "leave",)
|
|
387
|
+
SESSION_CLOSED_REASON_KNOWN_VALUES: Final[tuple[str, ...]] = ("idle", "hostShutdown", "leave", "vacated",)
|
|
334
388
|
|
|
335
389
|
# Whether this host writes its sessions to disk. A property of the host process, fixed at construction and identical for every session and every connection it serves — never requested, granted, or negotiated, which is why it is not a capability. Open: the unrepresented degraded state has candidate resolutions that add a third value here, so closed would make that a breaking change.
|
|
336
390
|
SessionDurability = str # open enum: unknown values stay representable
|
|
@@ -468,6 +522,12 @@ LimitsAxisValue = bool | LimitsNetworkMode
|
|
|
468
522
|
# A complete ordered effort set, or an explicit unknown capability.
|
|
469
523
|
ModelReasoningEffortVariants = list[ReasoningEffort] | UnknownModelReasoningEffortVariants
|
|
470
524
|
|
|
525
|
+
class AbnormalEnd(TypedDict, total=False):
|
|
526
|
+
"""`abnormalEnd` on `session/resume`: the load found the session's latest serve segment without a clean end and recorded (or had already recorded) the `crash_inferred` backstop."""
|
|
527
|
+
|
|
528
|
+
lastActivityAt: str
|
|
529
|
+
|
|
530
|
+
|
|
471
531
|
class AccountLoginCancelResult(TypedDict):
|
|
472
532
|
"""`account/loginCancel` result: exactly `{cancelled}` — `true` iff a pending flow existed and was cancelled."""
|
|
473
533
|
|
|
@@ -777,6 +837,7 @@ class ApprovalRequestParams(_ApprovalRequestParamsBase, total=False):
|
|
|
777
837
|
"""Full params shared by `approval/request` and `approval/requested`."""
|
|
778
838
|
|
|
779
839
|
cuaCardFacts: ApprovalCuaCardFacts
|
|
840
|
+
reviewerReason: str
|
|
780
841
|
subagentOrigin: ApprovalSubagentOrigin
|
|
781
842
|
|
|
782
843
|
|
|
@@ -1161,6 +1222,19 @@ class DamagedRange(_DamagedRangeBase, total=False):
|
|
|
1161
1222
|
readableBeforeAt: str
|
|
1162
1223
|
|
|
1163
1224
|
|
|
1225
|
+
class EarlierHistory(TypedDict):
|
|
1226
|
+
"""`earlierHistory`: the boundary checkpoint's transcript tail, served in place of every item that opened in its pruned prefix. No log record carries it; the host derives it from the checkpoint."""
|
|
1227
|
+
|
|
1228
|
+
messages: list[EarlierHistoryMessage]
|
|
1229
|
+
|
|
1230
|
+
|
|
1231
|
+
class EarlierHistoryMessage(TypedDict):
|
|
1232
|
+
"""One transcript-tail message of an [`EarlierHistory`] item."""
|
|
1233
|
+
|
|
1234
|
+
role: str
|
|
1235
|
+
text: str
|
|
1236
|
+
|
|
1237
|
+
|
|
1164
1238
|
class EffectiveApprovalModeState(TypedDict):
|
|
1165
1239
|
"""The effective approval-mode projection: the same object `session/setApprovalMode` returns as `effectiveMode` and the `Session` object carries as `approvalMode`."""
|
|
1166
1240
|
|
|
@@ -1466,6 +1540,7 @@ class Item(_ItemBase, total=False):
|
|
|
1466
1540
|
displayLabel: ToolDisplayLabel
|
|
1467
1541
|
displayText: str
|
|
1468
1542
|
durationMs: int
|
|
1543
|
+
earlierHistory: EarlierHistory
|
|
1469
1544
|
entryId: str
|
|
1470
1545
|
event: HookEventName
|
|
1471
1546
|
exitCode: int
|
|
@@ -1475,6 +1550,9 @@ class Item(_ItemBase, total=False):
|
|
|
1475
1550
|
fallbackText: str
|
|
1476
1551
|
finalSummary: str
|
|
1477
1552
|
generationId: int
|
|
1553
|
+
held: bool
|
|
1554
|
+
heldFor: HeldFor
|
|
1555
|
+
historyUnreadable: bool
|
|
1478
1556
|
hookKey: str
|
|
1479
1557
|
jobId: str
|
|
1480
1558
|
label: str
|
|
@@ -1538,6 +1616,7 @@ class Item(_ItemBase, total=False):
|
|
|
1538
1616
|
url: str
|
|
1539
1617
|
usage: TokenUsage
|
|
1540
1618
|
visibleOutput: str
|
|
1619
|
+
wakeSourceDescriptions: list[str]
|
|
1541
1620
|
workId: str
|
|
1542
1621
|
workflowRunId: str
|
|
1543
1622
|
|
|
@@ -2056,6 +2135,38 @@ class PeerListResult(TypedDict):
|
|
|
2056
2135
|
sessionId: str
|
|
2057
2136
|
|
|
2058
2137
|
|
|
2138
|
+
class PeerMessageDisplayContext(TypedDict, total=False):
|
|
2139
|
+
"""The connector presentation facts of a forwarded message, every member optional."""
|
|
2140
|
+
|
|
2141
|
+
conversationKey: str
|
|
2142
|
+
inbox: str
|
|
2143
|
+
lane: str
|
|
2144
|
+
mailboxId: str
|
|
2145
|
+
owner: PeerMessageOwner
|
|
2146
|
+
relayContext: dict[str, Any]
|
|
2147
|
+
senderDisplayName: str
|
|
2148
|
+
transport: str
|
|
2149
|
+
transportMessageId: str
|
|
2150
|
+
|
|
2151
|
+
|
|
2152
|
+
class PeerMessageOwner(TypedDict):
|
|
2153
|
+
"""Which coordinator lane owns the forwarded conversation."""
|
|
2154
|
+
|
|
2155
|
+
laneSession: str
|
|
2156
|
+
state: PeerMessageOwnerState
|
|
2157
|
+
|
|
2158
|
+
|
|
2159
|
+
class PeerOriginGeneration(TypedDict):
|
|
2160
|
+
"""An authenticated sender process generation."""
|
|
2161
|
+
|
|
2162
|
+
bootInstance: str
|
|
2163
|
+
codeIdentity: PeerOriginCodeIdentity
|
|
2164
|
+
pid: int
|
|
2165
|
+
platform: PeerOriginPlatform
|
|
2166
|
+
processInstance: str
|
|
2167
|
+
uid: int
|
|
2168
|
+
|
|
2169
|
+
|
|
2059
2170
|
class PeerRow(TypedDict):
|
|
2060
2171
|
"""One `peer/list` row: local rows only — no `discoverySource`, no mailbox rows, no `host`."""
|
|
2061
2172
|
|
|
@@ -2067,6 +2178,93 @@ class PeerRow(TypedDict):
|
|
|
2067
2178
|
status: PeerStatus
|
|
2068
2179
|
|
|
2069
2180
|
|
|
2181
|
+
class _PeerSettlementBase(TypedDict):
|
|
2182
|
+
outcomes: list[PeerSettlementOutcome | None]
|
|
2183
|
+
position: PeerSettlementPosition
|
|
2184
|
+
|
|
2185
|
+
|
|
2186
|
+
class PeerSettlement(_PeerSettlementBase, total=False):
|
|
2187
|
+
"""One settlement: an optional admission decision plus the outcome of each message the settlement released, in order."""
|
|
2188
|
+
|
|
2189
|
+
decision: PeerSettlementDecision
|
|
2190
|
+
|
|
2191
|
+
|
|
2192
|
+
class _PeerSettlementDecisionBase(TypedDict):
|
|
2193
|
+
decisionId: str
|
|
2194
|
+
kind: PeerSettlementDecisionKind
|
|
2195
|
+
origin: PeerSettlementOrigin
|
|
2196
|
+
senderLabel: str
|
|
2197
|
+
|
|
2198
|
+
|
|
2199
|
+
class PeerSettlementDecision(_PeerSettlementDecisionBase, total=False):
|
|
2200
|
+
"""The admission decision a settlement records."""
|
|
2201
|
+
|
|
2202
|
+
senderSessionId: str
|
|
2203
|
+
|
|
2204
|
+
|
|
2205
|
+
class _PeerSettlementOriginBase(TypedDict):
|
|
2206
|
+
kind: PeerSettlementOriginKind
|
|
2207
|
+
|
|
2208
|
+
|
|
2209
|
+
class PeerSettlementOrigin(_PeerSettlementOriginBase, total=False):
|
|
2210
|
+
"""The sender origin a settlement belongs to. Rows with the same authenticated generation coalesce on the timeline; a non-coalescing origin never coalesces with another. A flat object rather than a tagged union so the experimental gate can key every member."""
|
|
2211
|
+
|
|
2212
|
+
generation: PeerOriginGeneration
|
|
2213
|
+
value: str
|
|
2214
|
+
|
|
2215
|
+
|
|
2216
|
+
class _PeerSettlementOutcomeBase(TypedDict):
|
|
2217
|
+
body: str
|
|
2218
|
+
itemId: str
|
|
2219
|
+
kind: PeerSettlementOutcomeKind
|
|
2220
|
+
messageId: str
|
|
2221
|
+
origin: PeerSettlementOrigin
|
|
2222
|
+
senderLabel: str
|
|
2223
|
+
|
|
2224
|
+
|
|
2225
|
+
class PeerSettlementOutcome(_PeerSettlementOutcomeBase, total=False):
|
|
2226
|
+
"""What one released message shows on the receiver timeline. A flat object rather than a tagged union so the experimental gate can key every member."""
|
|
2227
|
+
|
|
2228
|
+
decisionId: str
|
|
2229
|
+
displayContext: PeerMessageDisplayContext
|
|
2230
|
+
senderSessionId: str
|
|
2231
|
+
settledAtUs: int
|
|
2232
|
+
|
|
2233
|
+
|
|
2234
|
+
class PeerSettlementPosition(TypedDict):
|
|
2235
|
+
"""A settlement's position in the receiving session's log: the settlement record's id and its stream sequence. Clients treat it as an opaque cursor that orders by `sequence`."""
|
|
2236
|
+
|
|
2237
|
+
id: str
|
|
2238
|
+
sequence: int
|
|
2239
|
+
|
|
2240
|
+
|
|
2241
|
+
class PeerSettlementsChangedParams(TypedDict):
|
|
2242
|
+
"""`peer/settlementsChanged` params: a non-view notification to the receiving session's connections. `revision` grows by at least one per committed settlement batch; it is a wake hint, not a cursor, and the client reads `peer/settlements` from its own cursor."""
|
|
2243
|
+
|
|
2244
|
+
revision: int
|
|
2245
|
+
sessionId: str
|
|
2246
|
+
|
|
2247
|
+
|
|
2248
|
+
class _PeerSettlementsParamsBase(TypedDict):
|
|
2249
|
+
sessionId: str
|
|
2250
|
+
|
|
2251
|
+
|
|
2252
|
+
class PeerSettlementsParams(_PeerSettlementsParamsBase, total=False):
|
|
2253
|
+
"""`peer/settlements` params. Unknown fields are `invalidParams`."""
|
|
2254
|
+
|
|
2255
|
+
after: PeerSettlementPosition
|
|
2256
|
+
limit: int
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
class PeerSettlementsResult(TypedDict):
|
|
2260
|
+
"""`peer/settlements` result: one page, ascending by position."""
|
|
2261
|
+
|
|
2262
|
+
requestedAfter: PeerSettlementPosition | None
|
|
2263
|
+
sessionId: str
|
|
2264
|
+
settlements: list[PeerSettlement]
|
|
2265
|
+
through: PeerSettlementPosition | None
|
|
2266
|
+
|
|
2267
|
+
|
|
2070
2268
|
class _PendingApprovalPointerBase(TypedDict):
|
|
2071
2269
|
approvalId: str
|
|
2072
2270
|
viewCursor: str
|
|
@@ -2483,6 +2681,24 @@ class RequestReceipt(TypedDict):
|
|
|
2483
2681
|
pass
|
|
2484
2682
|
|
|
2485
2683
|
|
|
2684
|
+
class RunningElsewhere(TypedDict, total=False):
|
|
2685
|
+
"""The `runningElsewhere` member of a `Session`: another live process on this machine runs the session."""
|
|
2686
|
+
|
|
2687
|
+
origin: RunningElsewhereOrigin
|
|
2688
|
+
|
|
2689
|
+
|
|
2690
|
+
class RuntimeWorktree(TypedDict):
|
|
2691
|
+
"""The runtime-owned git worktree a child session runs in, mirrored from the `subagent.worktree.*` records on its parent's log. The three enums are open: clients treat an unknown value as unknown."""
|
|
2692
|
+
|
|
2693
|
+
baseCommit: str
|
|
2694
|
+
cleanupPolicy: RuntimeWorktreeCleanupPolicy
|
|
2695
|
+
cleanupState: RuntimeWorktreeCleanupState
|
|
2696
|
+
headCommit: str
|
|
2697
|
+
ownership: RuntimeWorktreeOwnership
|
|
2698
|
+
parentDirtyExcluded: bool
|
|
2699
|
+
worktreeRoot: str
|
|
2700
|
+
|
|
2701
|
+
|
|
2486
2702
|
class SchemaInfo(TypedDict):
|
|
2487
2703
|
"""The `schema` pair in [`InitializeResult`]. `version` is the wire **envelope** schema version — distinct from the session-view `schemaVersion`, the raw-log `schema_version`, and the 0.x/1.0 stability posture, which is not on the wire at all."""
|
|
2488
2704
|
|
|
@@ -2519,15 +2735,21 @@ class Session(_SessionBase, total=False):
|
|
|
2519
2735
|
branch: str
|
|
2520
2736
|
createdByClient: ClientInfo
|
|
2521
2737
|
currentLimits: SessionLimits
|
|
2738
|
+
driveHolder: ClientInfo
|
|
2522
2739
|
firstUserPrompt: str
|
|
2523
2740
|
generatedName: str
|
|
2741
|
+
itemCount: int
|
|
2524
2742
|
kind: SessionKind
|
|
2525
2743
|
lastActivityAt: str
|
|
2744
|
+
logBytes: int
|
|
2526
2745
|
name: str
|
|
2527
2746
|
nameOrigin: SessionNameOrigin
|
|
2528
2747
|
parentSessionId: str
|
|
2529
2748
|
permissionState: EffectivePermissionState
|
|
2749
|
+
resumedByClient: ClientInfo
|
|
2750
|
+
runningElsewhere: RunningElsewhere
|
|
2530
2751
|
sideFrom: SideProvenance | None
|
|
2752
|
+
spawnedBy: SessionSpawnedBy
|
|
2531
2753
|
title: str
|
|
2532
2754
|
worktree: SessionWorktree
|
|
2533
2755
|
|
|
@@ -2608,6 +2830,19 @@ class SessionContextUsageParams(_SessionContextUsageParamsBase, total=False):
|
|
|
2608
2830
|
windowTokens: int
|
|
2609
2831
|
|
|
2610
2832
|
|
|
2833
|
+
class _SessionDriveChangedParamsBase(TypedDict):
|
|
2834
|
+
reason: DriveChangedReason
|
|
2835
|
+
sessionId: str
|
|
2836
|
+
youDrive: bool
|
|
2837
|
+
|
|
2838
|
+
|
|
2839
|
+
class SessionDriveChangedParams(_SessionDriveChangedParamsBase, total=False):
|
|
2840
|
+
"""`session/driveChanged` params: the session's drive holder changed. A command-plane broadcast on the `session/statusChanged` pattern — delivered to every connection on the host, subscribed or not; a connection's `optOutNotificationMethods` suppresses it — so the previous holder and every observer learn who drives now. Not a view event: no `viewCursor`, no `sourceRange` (it reflects live registry state, no durable record). The embedded single-connection host never emits it. **Experimental tier**."""
|
|
2841
|
+
|
|
2842
|
+
driveHolder: ClientInfo
|
|
2843
|
+
previousDriveHolder: ClientInfo
|
|
2844
|
+
|
|
2845
|
+
|
|
2611
2846
|
class _SessionForkParamsBase(TypedDict):
|
|
2612
2847
|
commandId: str
|
|
2613
2848
|
sessionId: str
|
|
@@ -2866,6 +3101,7 @@ class SessionReadResult(_SessionReadResultBase, total=False):
|
|
|
2866
3101
|
lastTurn: LastTurn
|
|
2867
3102
|
queuedInputs: list[QueuedInput]
|
|
2868
3103
|
recoveryObservation: RecoveryObservation
|
|
3104
|
+
worktree: RuntimeWorktree
|
|
2869
3105
|
|
|
2870
3106
|
|
|
2871
3107
|
class SessionReasoningEffortChangedParams(TypedDict):
|
|
@@ -2878,6 +3114,18 @@ class SessionReasoningEffortChangedParams(TypedDict):
|
|
|
2878
3114
|
viewCursor: str
|
|
2879
3115
|
|
|
2880
3116
|
|
|
3117
|
+
class SessionReleaseDriveParams(TypedDict):
|
|
3118
|
+
"""`session/releaseDrive` params."""
|
|
3119
|
+
|
|
3120
|
+
sessionId: str
|
|
3121
|
+
|
|
3122
|
+
|
|
3123
|
+
class SessionReleaseDriveResult(TypedDict):
|
|
3124
|
+
"""`session/releaseDrive` result: `released` left the session loaded with nobody driving (a duplicate release or a holderless session answers it too, with no notice), `busy` changed nothing because a turn runs, or the session is idle with a launch still queued or its launch count unreadable (no `turn/completed` is promised on that arm). No holder member: after a release nobody holds. The two typed refusals (`sessionNotLoaded`, `sessionInUse`) are errors, not results."""
|
|
3125
|
+
|
|
3126
|
+
status: DriveReleaseStatus
|
|
3127
|
+
|
|
3128
|
+
|
|
2881
3129
|
class SessionRenameParams(TypedDict):
|
|
2882
3130
|
"""`session/rename` params: set or change the durable allocated session name through the runtime `session_name` command. One writer; withheld under the ephemeral profile."""
|
|
2883
3131
|
|
|
@@ -2923,6 +3171,22 @@ class SessionReportStartupPhasesResult(TypedDict):
|
|
|
2923
3171
|
recorded: bool
|
|
2924
3172
|
|
|
2925
3173
|
|
|
3174
|
+
class SessionRequestDriveParams(TypedDict):
|
|
3175
|
+
"""`session/requestDrive` params."""
|
|
3176
|
+
|
|
3177
|
+
sessionId: str
|
|
3178
|
+
|
|
3179
|
+
|
|
3180
|
+
class _SessionRequestDriveResultBase(TypedDict):
|
|
3181
|
+
status: DriveRequestStatus
|
|
3182
|
+
|
|
3183
|
+
|
|
3184
|
+
class SessionRequestDriveResult(_SessionRequestDriveResultBase, total=False):
|
|
3185
|
+
"""`session/requestDrive` result: `granted` moved the drive to the caller (or the caller already held it) and stopped nothing — no turn ran, or another connection's turn runs or its input waits and now runs on under the caller; `busy` left everything as it was — the caller's own turn runs or its input waits, the live holder is idle and its queue cannot be read, or the live holder is not quiet and has not opted into `experimentalApi`, so it could not hear that it lost the drive; nothing is parked, and the caller asks again later (after `turn/completed` when a turn runs; a runtime that cannot report its queue promises none). An unloaded session is the typed resume-first refusal, not a result."""
|
|
3186
|
+
|
|
3187
|
+
driveHolder: ClientInfo
|
|
3188
|
+
|
|
3189
|
+
|
|
2926
3190
|
class _SessionResumeParamsBase(TypedDict):
|
|
2927
3191
|
commandId: str
|
|
2928
3192
|
sessionId: str
|
|
@@ -2935,6 +3199,7 @@ class SessionResumeParams(_SessionResumeParamsBase, total=False):
|
|
|
2935
3199
|
cursor: str | None
|
|
2936
3200
|
excludeItems: bool
|
|
2937
3201
|
history: HistoryPreference
|
|
3202
|
+
modelId: str
|
|
2938
3203
|
permissionProfile: str
|
|
2939
3204
|
recoveryMode: RecoveryMode
|
|
2940
3205
|
|
|
@@ -2949,6 +3214,7 @@ class _SessionResumeResultBase(TypedDict):
|
|
|
2949
3214
|
class SessionResumeResult(_SessionResumeResultBase, total=False):
|
|
2950
3215
|
"""`session/resume` result."""
|
|
2951
3216
|
|
|
3217
|
+
abnormalEnd: AbnormalEnd
|
|
2952
3218
|
blockedPrompt: BlockedPrompt
|
|
2953
3219
|
lastTurn: LastTurn
|
|
2954
3220
|
tightenedAxes: list[str]
|
|
@@ -3034,6 +3300,17 @@ class SessionSideChatResult(TypedDict):
|
|
|
3034
3300
|
viewCursor: str
|
|
3035
3301
|
|
|
3036
3302
|
|
|
3303
|
+
class _SessionSpawnedByBase(TypedDict):
|
|
3304
|
+
parentSessionId: str
|
|
3305
|
+
|
|
3306
|
+
|
|
3307
|
+
class SessionSpawnedBy(_SessionSpawnedByBase, total=False):
|
|
3308
|
+
"""Who opened a session."""
|
|
3309
|
+
|
|
3310
|
+
project: str
|
|
3311
|
+
thread: str
|
|
3312
|
+
|
|
3313
|
+
|
|
3037
3314
|
class _SessionStartParamsBase(TypedDict):
|
|
3038
3315
|
commandId: str
|
|
3039
3316
|
|
|
@@ -3046,9 +3323,11 @@ class SessionStartParams(_SessionStartParamsBase, total=False):
|
|
|
3046
3323
|
limits: SessionLimitsChoice
|
|
3047
3324
|
modelId: str
|
|
3048
3325
|
permissionProfile: str
|
|
3326
|
+
previousSessionId: str
|
|
3049
3327
|
providerId: str | None
|
|
3050
3328
|
recoveryMode: RecoveryMode
|
|
3051
3329
|
sessionId: str
|
|
3330
|
+
spawnedBy: SessionSpawnedBy
|
|
3052
3331
|
workspaceRoot: str
|
|
3053
3332
|
workspaceRoots: list[str]
|
|
3054
3333
|
worktree: WorktreeStartRequest
|
|
@@ -3652,6 +3931,7 @@ class TurnError(_TurnErrorBase, total=False):
|
|
|
3652
3931
|
"""The settled turn-failure object: `{kind, message, retryable}`."""
|
|
3653
3932
|
|
|
3654
3933
|
quota: QuotaDetail
|
|
3934
|
+
requestDenied: bool
|
|
3655
3935
|
|
|
3656
3936
|
|
|
3657
3937
|
class TurnForegroundCompletedParams(TypedDict):
|
|
@@ -4086,6 +4366,7 @@ class ViewPageParams(_ViewPageParamsBase, total=False):
|
|
|
4086
4366
|
anchor: ViewPageAnchor
|
|
4087
4367
|
cursor: str
|
|
4088
4368
|
direction: ViewPageDirection
|
|
4369
|
+
maxBytes: int
|
|
4089
4370
|
|
|
4090
4371
|
|
|
4091
4372
|
class ViewPageResolvedAnchor(TypedDict):
|
|
@@ -4380,6 +4661,7 @@ METHODS: Final[dict[str, MethodSpec]] = {
|
|
|
4380
4661
|
"media/upload": {"description": "Moves one video chunk into the session's video store; answers the `uploadId` receipt on every chunk.", "params": "MediaUploadParams", "result": "MediaUploadResult"},
|
|
4381
4662
|
"model/list": {"description": "Reads the catalog of models the host will accept in `session/setModel`; a query, not a command.", "params": "ModelListParams", "result": "ModelListResult"},
|
|
4382
4663
|
"peer/list": {"description": "Lists the viewing session's live local peers from the registry snapshot, minus the viewer, ordered by session id — one row per live entry with its authority-joined name, label, status, age, and eligibility.", "params": "PeerListParams", "result": "PeerListResult"},
|
|
4664
|
+
"peer/settlements": {"description": "Reads one page of the receiving session's peer-admission settlements after a cursor, ascending, in the shape the receiver timeline folds.", "params": "PeerSettlementsParams", "result": "PeerSettlementsResult"},
|
|
4383
4665
|
"permissionProfile/list": {"description": "Reads the selectable permission profiles for a session; a lease-free read.", "params": "PermissionProfileListParams", "result": "PermissionProfileListResult"},
|
|
4384
4666
|
"plugin/install": {"description": "Install one plugin from a marketplace pair or a host local path with scope (per-session, `commandId`-idempotent, hold-open; answers the installed receipt).", "params": "PluginInstallParams", "result": "PluginInstallResult"},
|
|
4385
4667
|
"plugin/list": {"description": "Reads the installed plugin records — one row per installed plugin; a query, not a command.", "params": "PluginListParams", "result": "PluginListResult"},
|
|
@@ -4397,8 +4679,10 @@ METHODS: Final[dict[str, MethodSpec]] = {
|
|
|
4397
4679
|
"session/promptHint": {"description": "Picks one feature-tip table id over the client-supplied candidates; display-only, nothing is logged.", "params": "SessionPromptHintParams", "result": "SessionPromptHintResult"},
|
|
4398
4680
|
"session/read": {"description": "Reads one stored session without attaching: no lease, no load, no subscription, no resume record.", "params": "SessionReadParams", "result": "SessionReadResult"},
|
|
4399
4681
|
"session/readLimits": {"description": "Reads one session's effective limits — experimental, same-user socket only.", "params": "SessionReadLimitsParams", "result": "SessionReadLimitsResult"},
|
|
4682
|
+
"session/releaseDrive": {"description": "The holder gives a loaded session's drive back without ending the load: `released` (nobody drives until a request or resume takes it; `session/driveChanged` tells every connection), `busy` while a turn runs, or the session is idle with a launch still queued or its launch count unreadable (no `turn/completed` is promised on that arm).", "params": "SessionReleaseDriveParams", "result": "SessionReleaseDriveResult"},
|
|
4400
4683
|
"session/rename": {"description": "Sets or changes the durable allocated session name through the runtime session_name command; withheld under the ephemeral profile.", "params": "SessionRenameParams", "result": "SessionRenameResult"},
|
|
4401
4684
|
"session/reportStartupPhases": {"description": "Reports the client's measured startup spans once per launch; the host appends the durable phases record as single writer.", "params": "SessionReportStartupPhasesParams", "result": "SessionReportStartupPhasesResult"},
|
|
4685
|
+
"session/requestDrive": {"description": "Asks for a loaded session's drive: `granted` at once and stopping nothing — when no turn runs, and to another connection while a turn runs or input waits, which run on under the caller (the drive moves and `session/driveChanged` tells every connection); `busy` while the caller's own turn runs or its input waits, while a live holder is idle and its queue cannot be read (no `turn/completed` is promised then), or for a live holder not opted into `experimentalApi` while it is not quiet (a result; nothing parked; ask again later, after `turn/completed` when a turn runs).", "params": "SessionRequestDriveParams", "result": "SessionRequestDriveResult"},
|
|
4402
4686
|
"session/resume": {"description": "Loads a stored session on this host, auto-subscribes this connection, and returns the history needed to render it.", "params": "SessionResumeParams", "result": "SessionResumeResult"},
|
|
4403
4687
|
"session/setApprovalMode": {"description": "Selects a preconfigured approval enforcement mode mid-session; select, never create.", "params": "SessionSetApprovalModeParams", "result": "SessionSetApprovalModeResult"},
|
|
4404
4688
|
"session/setModel": {"description": "Reconfigures the session's model; the selection is durable and applies to subsequent model calls.", "params": "SessionSetModelParams", "result": "SessionSetModelResult"},
|
|
@@ -4470,6 +4754,7 @@ NOTIFICATIONS: Final[dict[str, NotificationSpec]] = {
|
|
|
4470
4754
|
"monitor/inboxItemAdmitted": {"description": "One monitor inbox admission: the fold keys gate-off consumes.", "params": "MonitorInboxItemAdmittedParams"},
|
|
4471
4755
|
"monitor/inboxItemDrained": {"description": "One monitor inbox drain with its recorded stamp, the drain-side operand of latest-wins.", "params": "MonitorInboxItemDrainedParams"},
|
|
4472
4756
|
"monitor/inboxItemVoided": {"description": "One wake-missed void with its recorded stamp; count-only, no transcript row.", "params": "MonitorInboxItemVoidedParams"},
|
|
4757
|
+
"peer/settlementsChanged": {"description": "A peer-admission settlement committed in the receiving session; read `peer/settlements` from your cursor.", "params": "PeerSettlementsChangedParams"},
|
|
4473
4758
|
"plugin/changed": {"description": "An install landed; carries the installed-row summary and clients re-issue `plugin/list`.", "params": "PluginChangedParams"},
|
|
4474
4759
|
"plugin/marketplaceChanged": {"description": "A marketplace was added, updated, or removed; carries the change summary.", "params": "PluginMarketplaceChangedParams"},
|
|
4475
4760
|
"recap/completed": {"description": "A recap request settled exactly once — `completed` (with `text` plus optional `title`), `failed` (`providerFailed`), `cancelled`, or `timedOut` — delivered to the requesting connection outside the view stream.", "params": "RecapCompletedParams"},
|
|
@@ -4477,6 +4762,7 @@ NOTIFICATIONS: Final[dict[str, NotificationSpec]] = {
|
|
|
4477
4762
|
"session/branchChanged": {"description": "A durable workspace-branch observation landed; null branch is a detached-HEAD fact.", "params": "SessionBranchChangedParams"},
|
|
4478
4763
|
"session/closed": {"description": "A loaded session was unloaded (idle | hostShutdown | leave) with the final view cursor; broadcast to every initialized connection.", "params": "SessionClosedParams"},
|
|
4479
4764
|
"session/contextUsage": {"description": "A provider-reported context-occupancy fact folded to a changed (windowTokens, usedTokens, pressure) triple.", "params": "SessionContextUsageParams"},
|
|
4765
|
+
"session/driveChanged": {"description": "A session's drive holder changed; command-plane broadcast to every connection, not cursor-stamped, not subscription-gated, `youDrive` per recipient.", "params": "SessionDriveChangedParams"},
|
|
4480
4766
|
"session/goalChanged": {"description": "The session's goal block changed value; replace wholesale, an explicit null clears.", "params": "SessionGoalChangedParams"},
|
|
4481
4767
|
"session/leaveCompleted": {"description": "Protected correlated terminal for an admitted session/leave.", "params": "SessionLeaveCompletedParams"},
|
|
4482
4768
|
"session/listChanged": {"description": "The changed session/list row, full-row replace; opt-in per connection via the sessionListStream capability, never subscription-gated.", "params": "SessionListChangedParams"},
|
|
@@ -4523,6 +4809,7 @@ ERRORS: Final[tuple[ErrorSpec, ...]] = (
|
|
|
4523
4809
|
{"code": -32023, "kind": "forkBoundaryInvalid", "retryable": False, "overrideKinds": ()},
|
|
4524
4810
|
{"code": -32024, "kind": "sessionNotLoaded", "retryable": False, "overrideKinds": ()},
|
|
4525
4811
|
{"code": -32025, "kind": "sessionStreamMismatch", "retryable": False, "overrideKinds": ()},
|
|
4812
|
+
{"code": -32039, "kind": "daemonDraining", "retryable": True, "overrideKinds": ()},
|
|
4526
4813
|
{"code": -32028, "kind": "limitsAboveMax", "retryable": False, "overrideKinds": ()},
|
|
4527
4814
|
{"code": -32029, "kind": "workspaceNotTrusted", "retryable": False, "overrideKinds": ()},
|
|
4528
4815
|
{"code": -32030, "kind": "commandRejected", "retryable": False, "overrideKinds": ()},
|
|
@@ -4558,4 +4845,4 @@ ERRORS: Final[tuple[ErrorSpec, ...]] = (
|
|
|
4558
4845
|
{"code": -32082, "kind": "usageRefreshFailed", "retryable": False, "overrideKinds": ()},
|
|
4559
4846
|
)
|
|
4560
4847
|
|
|
4561
|
-
GRANTABLE_CAPABILITIES: Final[tuple[str, ...]] = ("userShell", "sessionMcp", "sessionListStream", "feedback", "computerUseSetup", "computerUseHostSetup", "sessionRename", "rawLog", "peerMessaging", "rawLogPhysical",)
|
|
4848
|
+
GRANTABLE_CAPABILITIES: Final[tuple[str, ...]] = ("userShell", "sessionMcp", "sessionListStream", "feedback", "computerUseSetup", "computerUseHostSetup", "sessionRename", "rawLog", "peerMessaging", "rawLogPhysical", "daemonVacate",)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: muse-code-msp
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.14
|
|
4
4
|
Summary: Generated Python wire types for the Muse Session Protocol (MSP). No hand-written protocol types, ever.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/meta-models/muse-code-sdk
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{muse_code_msp-1.4.13 → muse_code_msp-1.4.14}/src/muse_code_msp.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|