muse-code-msp 1.3.1__tar.gz → 1.4.2__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.3.1/src/muse_code_msp.egg-info → muse_code_msp-1.4.2}/PKG-INFO +1 -1
- {muse_code_msp-1.3.1 → muse_code_msp-1.4.2}/pyproject.toml +1 -1
- {muse_code_msp-1.3.1 → muse_code_msp-1.4.2}/src/muse_code_msp/__init__.py +137 -9
- {muse_code_msp-1.3.1 → muse_code_msp-1.4.2}/src/muse_code_msp/experimental/__init__.py +155 -10
- {muse_code_msp-1.3.1 → muse_code_msp-1.4.2/src/muse_code_msp.egg-info}/PKG-INFO +1 -1
- {muse_code_msp-1.3.1 → muse_code_msp-1.4.2}/LICENSE +0 -0
- {muse_code_msp-1.3.1 → muse_code_msp-1.4.2}/README.md +0 -0
- {muse_code_msp-1.3.1 → muse_code_msp-1.4.2}/setup.cfg +0 -0
- {muse_code_msp-1.3.1 → muse_code_msp-1.4.2}/src/muse_code_msp/py.typed +0 -0
- {muse_code_msp-1.3.1 → muse_code_msp-1.4.2}/src/muse_code_msp.egg-info/SOURCES.txt +0 -0
- {muse_code_msp-1.3.1 → muse_code_msp-1.4.2}/src/muse_code_msp.egg-info/dependency_links.txt +0 -0
- {muse_code_msp-1.3.1 → muse_code_msp-1.4.2}/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.
|
|
3
|
+
Version: 1.4.2
|
|
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.
|
|
8
|
+
version = "1.4.2"
|
|
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:61afea3112e0906e9dc3a536144278a74cb4b36fc6e20901a91d4432ba3568e2"
|
|
11
11
|
SCHEMA_VERSION: Final[int] = 1
|
|
12
12
|
EXPERIMENTAL: Final[bool] = False
|
|
13
|
-
REQUIRED_HOST_VERSION: Final[str] = "1.
|
|
13
|
+
REQUIRED_HOST_VERSION: Final[str] = "1.4.2"
|
|
14
14
|
|
|
15
15
|
ApprovalAmendmentDurability = str # open enum: unknown values stay representable
|
|
16
16
|
APPROVAL_AMENDMENT_DURABILITY_KNOWN_VALUES: Final[tuple[str, ...]] = ("session", "localPersistent",)
|
|
@@ -51,7 +51,7 @@ BACKGROUND_INITIATOR_KNOWN_VALUES: Final[tuple[str, ...]] = ("user", "timeout",)
|
|
|
51
51
|
|
|
52
52
|
# A grantable capability name. Open: the reserved `rawLog` entry joins this domain as an additive open-enum extension when the protocol spec un-defers — closed would make that a retype.
|
|
53
53
|
CapabilityName = str # open enum: unknown values stay representable
|
|
54
|
-
CAPABILITY_NAME_KNOWN_VALUES: Final[tuple[str, ...]] = ("userShell", "sessionMcp", "sessionListStream",)
|
|
54
|
+
CAPABILITY_NAME_KNOWN_VALUES: Final[tuple[str, ...]] = ("userShell", "sessionMcp", "sessionListStream", "feedback",)
|
|
55
55
|
|
|
56
56
|
# The ack-status vocabulary: `"accepted"` for every admitted command; `session/compact` alone may answer `"noop"`. Closed: the protocol spec names exactly these two values, so SDK clients get a discriminated type and validation catches a wrong status — and a client that received a third value would have been told nothing it can act on, unlike [`TurnStartDisposition`], where "acked, not otherwise classified" is a usable reading.
|
|
57
57
|
CommandAckStatus = Literal["accepted", "noop"]
|
|
@@ -80,6 +80,13 @@ CONTEXT_PRESSURE_LEVEL_KNOWN_VALUES: Final[tuple[str, ...]] = ("normal", "warnin
|
|
|
80
80
|
ErrorKind = str # open enum: unknown values stay representable
|
|
81
81
|
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", "viewTruncated", "outputUnavailable", "boundaryPruned", "boundaryUnusable", "noBoundary", "approvalNotFound", "approvalAlreadyResolved", "approvalChoiceInvalid", "approvalRequirementStale", "approvalReviewerUnavailable", "userInputNotFound", "userInputAlreadySettled", "userInputAnswerInvalid",)
|
|
82
82
|
|
|
83
|
+
# `feedback/submit` classification: the four TUI classes in camelCase wire spelling. **Closed**: a client-selected param vocabulary.
|
|
84
|
+
FeedbackClassification = Literal["bug", "badResult", "goodResult", "other"]
|
|
85
|
+
|
|
86
|
+
# `feedback/submit` result `outcome`: how one confirmed submit resolved, mirroring the TUI `FeedbackSubmitOutcome` taxonomy. **Open**: a server-produced result vocabulary — an older client reading a newer value it does not know follows the open-enum tolerance rule instead of rejecting it.
|
|
87
|
+
FeedbackSubmitOutcome = str # open enum: unknown values stay representable
|
|
88
|
+
FEEDBACK_SUBMIT_OUTCOME_KNOWN_VALUES: Final[tuple[str, ...]] = ("uploaded", "recorded", "acceptedWithoutReceipt", "trackingFailed", "trackingUncertain", "dark", "disabled", "noCredential", "authRejected", "rateLimited", "failed",)
|
|
89
|
+
|
|
83
90
|
# 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".
|
|
84
91
|
HistoryMode = str # open enum: unknown values stay representable
|
|
85
92
|
HISTORY_MODE_KNOWN_VALUES: Final[tuple[str, ...]] = ("anchoredSnapshot", "inline", "snapshot", "none",)
|
|
@@ -140,6 +147,10 @@ REASONING_EFFORT_CHANGE_SOURCE_KNOWN_VALUES: Final[tuple[str, ...]] = ("user", "
|
|
|
140
147
|
# A request id: client-chosen string or integer. `1` and `"1"` do not compare equal; each direction owns its own id space.
|
|
141
148
|
RequestId = int | str
|
|
142
149
|
|
|
150
|
+
# 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.
|
|
151
|
+
SessionClosedReason = str # open enum: unknown values stay representable
|
|
152
|
+
SESSION_CLOSED_REASON_KNOWN_VALUES: Final[tuple[str, ...]] = ("idle", "hostShutdown",)
|
|
153
|
+
|
|
143
154
|
# Stable deletion-failure vocabulary known to this version. The server emits only these values. Future reason strings remain an open result vocabulary; consumers cannot infer completion from any reason.
|
|
144
155
|
SessionDeleteFailureReason = str # open enum: unknown values stay representable
|
|
145
156
|
SESSION_DELETE_FAILURE_REASON_KNOWN_VALUES: Final[tuple[str, ...]] = ("ownershipUnavailable", "sharedSource", "writerBusy", "unsafeSource", "sourceChanged", "quiescenceFailed", "cancelled", "storageFailure", "cleanupIncomplete", "unsupportedLayout",)
|
|
@@ -156,6 +167,9 @@ SESSION_DELETE_PHYSICAL_CHANGE_KNOWN_VALUES: Final[tuple[str, ...]] = ("none", "
|
|
|
156
167
|
SessionDurability = str # open enum: unknown values stay representable
|
|
157
168
|
SESSION_DURABILITY_KNOWN_VALUES: Final[tuple[str, ...]] = ("durable", "ephemeral",)
|
|
158
169
|
|
|
170
|
+
# A served session field `session/list` text search reads. The client selects it, so the set is closed.
|
|
171
|
+
SessionListTextField = Literal["name", "title"]
|
|
172
|
+
|
|
159
173
|
# Startup failure posture for a session MCP server.
|
|
160
174
|
SessionMcpServerMode = Literal["required", "optional"]
|
|
161
175
|
|
|
@@ -487,14 +501,27 @@ class ContextUsage(_ContextUsageBase, total=False):
|
|
|
487
501
|
windowTokens: int
|
|
488
502
|
|
|
489
503
|
|
|
490
|
-
class
|
|
491
|
-
"""
|
|
504
|
+
class CumulativeCost(TypedDict):
|
|
505
|
+
"""Server-computed session cost member of [`CumulativeTokenUsage`]."""
|
|
492
506
|
|
|
507
|
+
partial: bool
|
|
508
|
+
usd: float
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
class _CumulativeTokenUsageBase(TypedDict):
|
|
493
512
|
outputTokens: int
|
|
494
513
|
promptTokens: int
|
|
495
514
|
totalTokens: int
|
|
496
515
|
|
|
497
516
|
|
|
517
|
+
class CumulativeTokenUsage(_CumulativeTokenUsageBase, total=False):
|
|
518
|
+
"""Session running totals of counted-once usage. Amendment a tracked change: the cache splits and server-computed `cost` join the counters. The counters stay accumulate-only; `cost` is the documented exception — it may move either way on price re-adoption and is labeled estimate. `Copy` was dropped for the `cost` member."""
|
|
519
|
+
|
|
520
|
+
cacheReadTokens: int
|
|
521
|
+
cacheWriteTokens: int
|
|
522
|
+
cost: CumulativeCost
|
|
523
|
+
|
|
524
|
+
|
|
498
525
|
class EffectiveApprovalModeState(TypedDict):
|
|
499
526
|
"""The effective approval-mode projection: the same object `session/setApprovalMode` returns as `effectiveMode` and the `Session` object carries as `approvalMode`."""
|
|
500
527
|
|
|
@@ -565,6 +592,38 @@ class ErrorResponse(TypedDict):
|
|
|
565
592
|
jsonrpc: JsonRpcVersion
|
|
566
593
|
|
|
567
594
|
|
|
595
|
+
class _FeedbackSubmitParamsBase(TypedDict):
|
|
596
|
+
classification: FeedbackClassification
|
|
597
|
+
note: str
|
|
598
|
+
sessionId: str
|
|
599
|
+
withFiles: bool
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
class FeedbackSubmitParams(_FeedbackSubmitParamsBase, total=False):
|
|
603
|
+
"""`feedback/submit` params: mirrors the TUI confirm-time `FeedbackRequest`. The call itself is the explicit confirm."""
|
|
604
|
+
|
|
605
|
+
attachSessionRecord: bool
|
|
606
|
+
clientArtifactsPath: str
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
class _FeedbackSubmitResultBase(TypedDict):
|
|
610
|
+
bundlePath: str
|
|
611
|
+
outcome: FeedbackSubmitOutcome
|
|
612
|
+
sessionRecordAttached: bool
|
|
613
|
+
sessionRecordTruncated: bool
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
class FeedbackSubmitResult(_FeedbackSubmitResultBase, total=False):
|
|
617
|
+
"""`feedback/submit` result: the upload receipt."""
|
|
618
|
+
|
|
619
|
+
cause: str
|
|
620
|
+
localTracingNote: str
|
|
621
|
+
retryAfterMs: int
|
|
622
|
+
sessionNote: str
|
|
623
|
+
taskId: str
|
|
624
|
+
uploadId: str
|
|
625
|
+
|
|
626
|
+
|
|
568
627
|
class ForkCutPoint(TypedDict):
|
|
569
628
|
"""Where a fork cuts the source history. Turn ids are used instead of counts because ids stay stable across compaction and concurrent appends while indices do not."""
|
|
570
629
|
|
|
@@ -832,6 +891,8 @@ class _ModelCatalogEntryBase(TypedDict):
|
|
|
832
891
|
class ModelCatalogEntry(_ModelCatalogEntryBase, total=False):
|
|
833
892
|
"""One visible catalog row. Catalog rows marked hidden never reach the wire, so a client cannot select one."""
|
|
834
893
|
|
|
894
|
+
defaultReasoningEffort: ReasoningEffort
|
|
895
|
+
reasoningEffortVariants: list[ModelDescribedReasoningEffort]
|
|
835
896
|
variants: ModelReasoningEffortVariants
|
|
836
897
|
|
|
837
898
|
|
|
@@ -844,6 +905,16 @@ class ModelCost(TypedDict):
|
|
|
844
905
|
output: str
|
|
845
906
|
|
|
846
907
|
|
|
908
|
+
class _ModelDescribedReasoningEffortBase(TypedDict):
|
|
909
|
+
tier: ReasoningEffort
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
class ModelDescribedReasoningEffort(_ModelDescribedReasoningEffortBase, total=False):
|
|
913
|
+
"""One described reasoning-effort tier of a `model/list` row: a selectable tier plus the catalog's display string for it when declared."""
|
|
914
|
+
|
|
915
|
+
description: str
|
|
916
|
+
|
|
917
|
+
|
|
847
918
|
class ModelListParams(TypedDict, total=False):
|
|
848
919
|
"""`model/list` params: the discovery half of the model-picker gesture. **A query, not a command** — no `commandId`, no durable intake record, no view event."""
|
|
849
920
|
|
|
@@ -1054,6 +1125,14 @@ class SessionBranchChangedParams(_SessionBranchChangedParamsBase, total=False):
|
|
|
1054
1125
|
vcs: Vcs
|
|
1055
1126
|
|
|
1056
1127
|
|
|
1128
|
+
class SessionClosedParams(TypedDict):
|
|
1129
|
+
"""`session/closed` params: a loaded session was unloaded from this host, broadcast to every initialized connection. After it, the session is `notLoaded`; the log remains on disk and `session/resume` reloads it. A crash emits nothing — only the two orderly unload paths do, and both write the durable `SessionEnd` record first."""
|
|
1130
|
+
|
|
1131
|
+
reason: SessionClosedReason
|
|
1132
|
+
sessionId: str
|
|
1133
|
+
viewCursor: str | None
|
|
1134
|
+
|
|
1135
|
+
|
|
1057
1136
|
class _SessionCompactParamsBase(TypedDict):
|
|
1058
1137
|
commandId: str
|
|
1059
1138
|
sessionId: str
|
|
@@ -1161,28 +1240,64 @@ class SessionHistory(_SessionHistoryBase, total=False):
|
|
|
1161
1240
|
noneReason: HistoryNoneReason
|
|
1162
1241
|
|
|
1163
1242
|
|
|
1243
|
+
class SessionListBranchFilter(TypedDict):
|
|
1244
|
+
"""Exact branch selection."""
|
|
1245
|
+
|
|
1246
|
+
anyOf: list[str | None]
|
|
1247
|
+
|
|
1248
|
+
|
|
1164
1249
|
class SessionListChangedParams(TypedDict):
|
|
1165
1250
|
"""`session/listChanged` params: one changed row of the `session/list` shape — the full Session object as the answering host's list face serves it at emission, a replace, never a delta. Emitted only on connections that negotiated the `sessionListStream` capability at `initialize`; row birth stays on `session/started`, unload pairs with `session/closed`."""
|
|
1166
1251
|
|
|
1167
1252
|
session: Session
|
|
1168
1253
|
|
|
1169
1254
|
|
|
1255
|
+
class SessionListFilter(TypedDict, total=False):
|
|
1256
|
+
"""The `session/list` filter. Members are ANDed with each other and with the top-level `workspaceRoot` and `updatedAfter`; values inside each `anyOf` are ORed. The canonical form the server echoes deduplicates and sorts every set, spells session IDs as canonical UUIDs, lowercases text terms, and orders `text.fields` `name` then `title`."""
|
|
1257
|
+
|
|
1258
|
+
branch: SessionListBranchFilter
|
|
1259
|
+
sessionId: SessionListSessionIdFilter
|
|
1260
|
+
text: SessionListTextFilter
|
|
1261
|
+
|
|
1262
|
+
|
|
1170
1263
|
class SessionListParams(TypedDict, total=False):
|
|
1171
1264
|
"""`session/list` params. Read-only; never touches leases."""
|
|
1172
1265
|
|
|
1173
1266
|
cursor: str | None
|
|
1267
|
+
filter: SessionListFilter
|
|
1174
1268
|
limit: int
|
|
1175
1269
|
updatedAfter: str
|
|
1176
1270
|
workspaceRoot: str
|
|
1177
1271
|
|
|
1178
1272
|
|
|
1179
|
-
class
|
|
1180
|
-
"""`session/list` result. Ordering is `updatedAt` descending."""
|
|
1181
|
-
|
|
1273
|
+
class _SessionListResultBase(TypedDict):
|
|
1182
1274
|
nextCursor: str | None
|
|
1183
1275
|
sessions: list[Session]
|
|
1184
1276
|
|
|
1185
1277
|
|
|
1278
|
+
class SessionListResult(_SessionListResultBase, total=False):
|
|
1279
|
+
"""`session/list` result. Ordering is `updatedAt` descending."""
|
|
1280
|
+
|
|
1281
|
+
appliedFilter: SessionListFilter
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
class SessionListSessionIdFilter(TypedDict):
|
|
1285
|
+
"""Exact session-ID selection."""
|
|
1286
|
+
|
|
1287
|
+
anyOf: list[str]
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
class _SessionListTextFilterBase(TypedDict):
|
|
1291
|
+
fields: list[SessionListTextField]
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
class SessionListTextFilter(_SessionListTextFilterBase, total=False):
|
|
1295
|
+
"""Name/title token-prefix search. Each term is trimmed, lowercased with ordinary Unicode lowercase, then NFC- normalized, and matches the beginning of an alphanumeric token, accent-sensitively (`check` matches `Checkout`; `eck` does not). NFC means a decomposed and a precomposed spelling of one term are the same term, and the echo returns the composed form. Matching never reorders rows."""
|
|
1296
|
+
|
|
1297
|
+
allOf: list[str]
|
|
1298
|
+
anyOf: list[str]
|
|
1299
|
+
|
|
1300
|
+
|
|
1186
1301
|
class _SessionModelChangedParamsBase(TypedDict):
|
|
1187
1302
|
modelId: str
|
|
1188
1303
|
sessionId: str
|
|
@@ -1352,6 +1467,7 @@ class SessionStartParams(_SessionStartParamsBase, total=False):
|
|
|
1352
1467
|
providerId: str | None
|
|
1353
1468
|
sessionId: str
|
|
1354
1469
|
workspaceRoot: str
|
|
1470
|
+
workspaceRoots: list[str]
|
|
1355
1471
|
|
|
1356
1472
|
|
|
1357
1473
|
class SessionStartResult(TypedDict):
|
|
@@ -1361,6 +1477,12 @@ class SessionStartResult(TypedDict):
|
|
|
1361
1477
|
viewCursor: str
|
|
1362
1478
|
|
|
1363
1479
|
|
|
1480
|
+
class SessionStartedParams(TypedDict):
|
|
1481
|
+
"""`session/started` params: a session became newly loaded on this host via `session/start` or `session/fork`, broadcast to every initialized connection. The one member is the same `$defs/Session` object the `session/start`/`session/fork` results carry, so the broadcast and the result describe one fact through one type — the host builds the broadcast payload as a `$defs/Session` — the fresh-start arm reuses the result's `session` member, the start-replay arm builds the live attach snapshot — and the emission is parity-gated against this type at the producer (`session-server` prod-assembly capture) and over the committed transcript corpus (conformance `session_lifecycle_enrollment`)."""
|
|
1482
|
+
|
|
1483
|
+
session: Session
|
|
1484
|
+
|
|
1485
|
+
|
|
1364
1486
|
class _SessionStatusChangedParamsBase(TypedDict):
|
|
1365
1487
|
sessionId: str
|
|
1366
1488
|
status: SessionStatus
|
|
@@ -1783,6 +1905,7 @@ class TurnStartParams(_TurnStartParamsBase, total=False):
|
|
|
1783
1905
|
displayText: str
|
|
1784
1906
|
ifBusy: IfBusy
|
|
1785
1907
|
reasoningEffort: ReasoningEffort
|
|
1908
|
+
workspaceRoots: list[str]
|
|
1786
1909
|
|
|
1787
1910
|
|
|
1788
1911
|
class TurnStartResult(TypedDict):
|
|
@@ -2180,6 +2303,7 @@ class ErrorSpec(TypedDict):
|
|
|
2180
2303
|
METHODS: Final[dict[str, MethodSpec]] = {
|
|
2181
2304
|
"approval/decide": {"description": "Decides a pending approval, guarded by the current requirement id against the multi-stage race.", "params": "ApprovalDecideParams", "result": "ApprovalDecideResult"},
|
|
2182
2305
|
"approval/listPending": {"description": "Reads the full pending approval and user-input payloads for a session; a lease-free fold read.", "params": "ApprovalListPendingParams", "result": "ApprovalListPendingResult"},
|
|
2306
|
+
"feedback/submit": {"description": "Submits a first-party feedback report through the host, reusing the TUI submitter seam (consent, bundle-first persistence, redaction), and answers the upload receipt.", "params": "FeedbackSubmitParams", "result": "FeedbackSubmitResult"},
|
|
2183
2307
|
"goal/clear": {"description": "Clears the session goal; never wakes and its ack never names a turn.", "params": "GoalClearParams", "result": "GoalCommandResult"},
|
|
2184
2308
|
"goal/edit": {"description": "Replaces the current goal's objective under the same wake gate as goal/set.", "params": "GoalEditParams", "result": "GoalCommandResult"},
|
|
2185
2309
|
"goal/pause": {"description": "Pauses the session goal; never wakes and its ack never names a turn.", "params": "GoalPauseParams", "result": "GoalCommandResult"},
|
|
@@ -2189,6 +2313,7 @@ METHODS: Final[dict[str, MethodSpec]] = {
|
|
|
2189
2313
|
"item/readOutput": {"description": "Byte-ranged read of stored full output the view truncated; works on loaded and unloaded sessions and takes no lease.", "params": "ItemReadOutputParams", "result": "ItemReadOutputResult"},
|
|
2190
2314
|
"model/list": {"description": "Reads the catalog of models the host will accept in `session/setModel`; a query, not a command.", "params": "ModelListParams", "result": "ModelListResult"},
|
|
2191
2315
|
"session/compact": {"description": "Compacts the session's conversation context; runs asynchronously, so the ack is admission only.", "params": "SessionCompactParams", "result": "SessionCompactResult"},
|
|
2316
|
+
"session/delete": {"description": "Admits durable session deletion; completion arrives separately.", "params": "SessionDeleteParams", "result": "CommandAcceptedResult"},
|
|
2192
2317
|
"session/fork": {"description": "Branches a session into a new id whose log copies the source through a cut point, with durable provenance.", "params": "SessionForkParams", "result": "SessionForkResult"},
|
|
2193
2318
|
"session/list": {"description": "Pages through stored sessions under the sessions root for history and picker UIs; read-only, never touches leases.", "params": "SessionListParams", "result": "SessionListResult"},
|
|
2194
2319
|
"session/read": {"description": "Reads one stored session without attaching: no lease, no load, no subscription, no resume record.", "params": "SessionReadParams", "result": "SessionReadResult"},
|
|
@@ -2238,13 +2363,16 @@ NOTIFICATIONS: Final[dict[str, NotificationSpec]] = {
|
|
|
2238
2363
|
"item/updated": {"description": "An open item changed non-terminally: full re-emission at a higher revision.", "params": "ItemUpdatedParams"},
|
|
2239
2364
|
"session/approvalModeChanged": {"description": "The approval enforcement mode changed: the fold of the durable reconfigure audit fact.", "params": "SessionApprovalModeChangedParams"},
|
|
2240
2365
|
"session/branchChanged": {"description": "A durable workspace-branch observation landed; null branch is a detached-HEAD fact.", "params": "SessionBranchChangedParams"},
|
|
2366
|
+
"session/closed": {"description": "A loaded session was unloaded (idle | hostShutdown) with the final view cursor; broadcast to every initialized connection.", "params": "SessionClosedParams"},
|
|
2241
2367
|
"session/contextUsage": {"description": "A provider-reported context-occupancy fact folded to a changed (windowTokens, usedTokens, pressure) triple.", "params": "SessionContextUsageParams"},
|
|
2368
|
+
"session/deleteCompleted": {"description": "The persisted terminal result of an admitted session deletion.", "params": "SessionDeleteCompletedParams"},
|
|
2242
2369
|
"session/goalChanged": {"description": "The session's goal block changed value; replace wholesale, an explicit null clears.", "params": "SessionGoalChangedParams"},
|
|
2243
2370
|
"session/listChanged": {"description": "The changed session/list row, full-row replace; opt-in per connection via the sessionListStream capability, never subscription-gated.", "params": "SessionListChangedParams"},
|
|
2244
2371
|
"session/modelChanged": {"description": "A durable model selection took effect.", "params": "SessionModelChangedParams"},
|
|
2245
2372
|
"session/modelRouteUnserved": {"description": "An accepted login credential update installed a provider that cannot serve the session's standing model route; the standing selection is unchanged and a routable session/setModel repairs it.", "params": "SessionModelRouteUnservedParams"},
|
|
2246
2373
|
"session/nameChanged": {"description": "A durable session-name record landed (rename or first naming): the fold of the session_name record.", "params": "SessionNameChangedParams"},
|
|
2247
2374
|
"session/reasoningEffortChanged": {"description": "A durable session-default reasoning-effort change took effect.", "params": "SessionReasoningEffortChangedParams"},
|
|
2375
|
+
"session/started": {"description": "A session became newly loaded on this host via session/start or session/fork; broadcast to every initialized connection.", "params": "SessionStartedParams"},
|
|
2248
2376
|
"session/statusChanged": {"description": "A loaded session's (status, attention) flipped; command-plane broadcast, cursor-stamped, not subscription-gated.", "params": "SessionStatusChangedParams"},
|
|
2249
2377
|
"session/todoListChanged": {"description": "The todo list was replaced wholesale; empty items is a cleared list.", "params": "SessionTodoListChangedParams"},
|
|
2250
2378
|
"session/tokenUsage": {"description": "A model call completed with usage: raw counters plus counted-once derivations plus session cumulative.", "params": "SessionTokenUsageParams"},
|
|
@@ -2295,4 +2423,4 @@ ERRORS: Final[tuple[ErrorSpec, ...]] = (
|
|
|
2295
2423
|
{"code": -32057, "kind": "userInputAnswerInvalid", "retryable": False, "overrideKinds": ()},
|
|
2296
2424
|
)
|
|
2297
2425
|
|
|
2298
|
-
GRANTABLE_CAPABILITIES: Final[tuple[str, ...]] = ("userShell", "sessionMcp", "sessionListStream",)
|
|
2426
|
+
GRANTABLE_CAPABILITIES: Final[tuple[str, ...]] = ("userShell", "sessionMcp", "sessionListStream", "feedback",)
|
|
@@ -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:d1cd20e2c2d82efb91479302f8dca4043884e628b636a5db85bce02328c410ce"
|
|
11
11
|
SCHEMA_VERSION: Final[int] = 1
|
|
12
12
|
EXPERIMENTAL: Final[bool] = True
|
|
13
|
-
REQUIRED_HOST_VERSION: Final[str] = "1.
|
|
13
|
+
REQUIRED_HOST_VERSION: Final[str] = "1.4.2"
|
|
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
|
|
@@ -62,7 +62,7 @@ BACKGROUND_INITIATOR_KNOWN_VALUES: Final[tuple[str, ...]] = ("user", "timeout",)
|
|
|
62
62
|
|
|
63
63
|
# A grantable capability name. Open: the reserved `rawLog` entry joins this domain as an additive open-enum extension when the protocol spec un-defers — closed would make that a retype.
|
|
64
64
|
CapabilityName = str # open enum: unknown values stay representable
|
|
65
|
-
CAPABILITY_NAME_KNOWN_VALUES: Final[tuple[str, ...]] = ("userShell", "sessionMcp", "sessionListStream",)
|
|
65
|
+
CAPABILITY_NAME_KNOWN_VALUES: Final[tuple[str, ...]] = ("userShell", "sessionMcp", "sessionListStream", "feedback",)
|
|
66
66
|
|
|
67
67
|
# The ack-status vocabulary: `"accepted"` for every admitted command; `session/compact` alone may answer `"noop"`. Closed: the protocol spec names exactly these two values, so SDK clients get a discriminated type and validation catches a wrong status — and a client that received a third value would have been told nothing it can act on, unlike [`TurnStartDisposition`], where "acked, not otherwise classified" is a usable reading.
|
|
68
68
|
CommandAckStatus = Literal["accepted", "noop"]
|
|
@@ -91,6 +91,13 @@ CONTEXT_PRESSURE_LEVEL_KNOWN_VALUES: Final[tuple[str, ...]] = ("normal", "warnin
|
|
|
91
91
|
ErrorKind = str # open enum: unknown values stay representable
|
|
92
92
|
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", "viewTruncated", "outputUnavailable", "boundaryPruned", "boundaryUnusable", "noBoundary", "approvalNotFound", "approvalAlreadyResolved", "approvalChoiceInvalid", "approvalRequirementStale", "approvalReviewerUnavailable", "userInputNotFound", "userInputAlreadySettled", "userInputAnswerInvalid",)
|
|
93
93
|
|
|
94
|
+
# `feedback/submit` classification: the four TUI classes in camelCase wire spelling. **Closed**: a client-selected param vocabulary.
|
|
95
|
+
FeedbackClassification = Literal["bug", "badResult", "goodResult", "other"]
|
|
96
|
+
|
|
97
|
+
# `feedback/submit` result `outcome`: how one confirmed submit resolved, mirroring the TUI `FeedbackSubmitOutcome` taxonomy. **Open**: a server-produced result vocabulary — an older client reading a newer value it does not know follows the open-enum tolerance rule instead of rejecting it.
|
|
98
|
+
FeedbackSubmitOutcome = str # open enum: unknown values stay representable
|
|
99
|
+
FEEDBACK_SUBMIT_OUTCOME_KNOWN_VALUES: Final[tuple[str, ...]] = ("uploaded", "recorded", "acceptedWithoutReceipt", "trackingFailed", "trackingUncertain", "dark", "disabled", "noCredential", "authRejected", "rateLimited", "failed",)
|
|
100
|
+
|
|
94
101
|
# 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".
|
|
95
102
|
HistoryMode = str # open enum: unknown values stay representable
|
|
96
103
|
HISTORY_MODE_KNOWN_VALUES: Final[tuple[str, ...]] = ("anchoredSnapshot", "inline", "snapshot", "none",)
|
|
@@ -119,6 +126,10 @@ ITEM_STATUS_KNOWN_VALUES: Final[tuple[str, ...]] = ("inProgress", "completed", "
|
|
|
119
126
|
# The literal `"2.0"` every frame carries.
|
|
120
127
|
JsonRpcVersion = Literal["2.0"]
|
|
121
128
|
|
|
129
|
+
# The login flow's terminal vocabulary. Open.
|
|
130
|
+
McpOAuthLoginOutcome = str # open enum: unknown values stay representable
|
|
131
|
+
MCP_O_AUTH_LOGIN_OUTCOME_KNOWN_VALUES: Final[tuple[str, ...]] = ("granted", "denied", "expired", "cancelled", "failed",)
|
|
132
|
+
|
|
122
133
|
# Where a model catalog came from. **Open**: an unrecognized value is an unknown source, not an error.
|
|
123
134
|
ModelCatalogSource = str # open enum: unknown values stay representable
|
|
124
135
|
MODEL_CATALOG_SOURCE_KNOWN_VALUES: Final[tuple[str, ...]] = ("providerCatalog", "fakeCatalog", "unresolvedCatalog", "bundledCatalog", "configCatalog",)
|
|
@@ -151,6 +162,10 @@ REASONING_EFFORT_CHANGE_SOURCE_KNOWN_VALUES: Final[tuple[str, ...]] = ("user", "
|
|
|
151
162
|
# A request id: client-chosen string or integer. `1` and `"1"` do not compare equal; each direction owns its own id space.
|
|
152
163
|
RequestId = int | str
|
|
153
164
|
|
|
165
|
+
# 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.
|
|
166
|
+
SessionClosedReason = str # open enum: unknown values stay representable
|
|
167
|
+
SESSION_CLOSED_REASON_KNOWN_VALUES: Final[tuple[str, ...]] = ("idle", "hostShutdown",)
|
|
168
|
+
|
|
154
169
|
# Stable deletion-failure vocabulary known to this version. The server emits only these values. Future reason strings remain an open result vocabulary; consumers cannot infer completion from any reason.
|
|
155
170
|
SessionDeleteFailureReason = str # open enum: unknown values stay representable
|
|
156
171
|
SESSION_DELETE_FAILURE_REASON_KNOWN_VALUES: Final[tuple[str, ...]] = ("ownershipUnavailable", "sharedSource", "writerBusy", "unsafeSource", "sourceChanged", "quiescenceFailed", "cancelled", "storageFailure", "cleanupIncomplete", "unsupportedLayout",)
|
|
@@ -167,6 +182,9 @@ SESSION_DELETE_PHYSICAL_CHANGE_KNOWN_VALUES: Final[tuple[str, ...]] = ("none", "
|
|
|
167
182
|
SessionDurability = str # open enum: unknown values stay representable
|
|
168
183
|
SESSION_DURABILITY_KNOWN_VALUES: Final[tuple[str, ...]] = ("durable", "ephemeral",)
|
|
169
184
|
|
|
185
|
+
# A served session field `session/list` text search reads. The client selects it, so the set is closed.
|
|
186
|
+
SessionListTextField = Literal["name", "title"]
|
|
187
|
+
|
|
170
188
|
# Startup failure posture for a session MCP server.
|
|
171
189
|
SessionMcpServerMode = Literal["required", "optional"]
|
|
172
190
|
|
|
@@ -272,8 +290,9 @@ class _AccountStateBase(TypedDict):
|
|
|
272
290
|
|
|
273
291
|
|
|
274
292
|
class AccountState(_AccountStateBase, total=False):
|
|
275
|
-
"""The one account payload shape: the `account/read` result and the `account/changed` params. Closed vocabulary; `label`
|
|
293
|
+
"""The one account payload shape: the `account/read` result and the `account/changed` params. Closed vocabulary; `label` and `avatarUrl` are display values that never carry key material and are omitted, never `null`, when absent."""
|
|
276
294
|
|
|
295
|
+
avatarUrl: str
|
|
277
296
|
label: str
|
|
278
297
|
|
|
279
298
|
|
|
@@ -542,14 +561,27 @@ class ContextUsage(_ContextUsageBase, total=False):
|
|
|
542
561
|
windowTokens: int
|
|
543
562
|
|
|
544
563
|
|
|
545
|
-
class
|
|
546
|
-
"""
|
|
564
|
+
class CumulativeCost(TypedDict):
|
|
565
|
+
"""Server-computed session cost member of [`CumulativeTokenUsage`]."""
|
|
547
566
|
|
|
567
|
+
partial: bool
|
|
568
|
+
usd: float
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
class _CumulativeTokenUsageBase(TypedDict):
|
|
548
572
|
outputTokens: int
|
|
549
573
|
promptTokens: int
|
|
550
574
|
totalTokens: int
|
|
551
575
|
|
|
552
576
|
|
|
577
|
+
class CumulativeTokenUsage(_CumulativeTokenUsageBase, total=False):
|
|
578
|
+
"""Session running totals of counted-once usage. Amendment a tracked change: the cache splits and server-computed `cost` join the counters. The counters stay accumulate-only; `cost` is the documented exception — it may move either way on price re-adoption and is labeled estimate. `Copy` was dropped for the `cost` member."""
|
|
579
|
+
|
|
580
|
+
cacheReadTokens: int
|
|
581
|
+
cacheWriteTokens: int
|
|
582
|
+
cost: CumulativeCost
|
|
583
|
+
|
|
584
|
+
|
|
553
585
|
class EffectiveApprovalModeState(TypedDict):
|
|
554
586
|
"""The effective approval-mode projection: the same object `session/setApprovalMode` returns as `effectiveMode` and the `Session` object carries as `approvalMode`."""
|
|
555
587
|
|
|
@@ -620,6 +652,38 @@ class ErrorResponse(TypedDict):
|
|
|
620
652
|
jsonrpc: JsonRpcVersion
|
|
621
653
|
|
|
622
654
|
|
|
655
|
+
class _FeedbackSubmitParamsBase(TypedDict):
|
|
656
|
+
classification: FeedbackClassification
|
|
657
|
+
note: str
|
|
658
|
+
sessionId: str
|
|
659
|
+
withFiles: bool
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
class FeedbackSubmitParams(_FeedbackSubmitParamsBase, total=False):
|
|
663
|
+
"""`feedback/submit` params: mirrors the TUI confirm-time `FeedbackRequest`. The call itself is the explicit confirm."""
|
|
664
|
+
|
|
665
|
+
attachSessionRecord: bool
|
|
666
|
+
clientArtifactsPath: str
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
class _FeedbackSubmitResultBase(TypedDict):
|
|
670
|
+
bundlePath: str
|
|
671
|
+
outcome: FeedbackSubmitOutcome
|
|
672
|
+
sessionRecordAttached: bool
|
|
673
|
+
sessionRecordTruncated: bool
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
class FeedbackSubmitResult(_FeedbackSubmitResultBase, total=False):
|
|
677
|
+
"""`feedback/submit` result: the upload receipt."""
|
|
678
|
+
|
|
679
|
+
cause: str
|
|
680
|
+
localTracingNote: str
|
|
681
|
+
retryAfterMs: int
|
|
682
|
+
sessionNote: str
|
|
683
|
+
taskId: str
|
|
684
|
+
uploadId: str
|
|
685
|
+
|
|
686
|
+
|
|
623
687
|
class ForkCutPoint(TypedDict):
|
|
624
688
|
"""Where a fork cuts the source history. Turn ids are used instead of counts because ids stay stable across compaction and concurrent appends while indices do not."""
|
|
625
689
|
|
|
@@ -858,6 +922,17 @@ class ItemUpdatedParams(TypedDict):
|
|
|
858
922
|
viewCursor: str
|
|
859
923
|
|
|
860
924
|
|
|
925
|
+
class _McpServerOAuthLoginCompletedParamsBase(TypedDict):
|
|
926
|
+
outcome: McpOAuthLoginOutcome
|
|
927
|
+
server: str
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
class McpServerOAuthLoginCompletedParams(_McpServerOAuthLoginCompletedParamsBase, total=False):
|
|
931
|
+
"""`mcpServer/oauthLoginCompleted` params."""
|
|
932
|
+
|
|
933
|
+
message: str
|
|
934
|
+
|
|
935
|
+
|
|
861
936
|
class _MessageAttachmentBase(TypedDict):
|
|
862
937
|
mediaType: str
|
|
863
938
|
type: str
|
|
@@ -887,6 +962,8 @@ class _ModelCatalogEntryBase(TypedDict):
|
|
|
887
962
|
class ModelCatalogEntry(_ModelCatalogEntryBase, total=False):
|
|
888
963
|
"""One visible catalog row. Catalog rows marked hidden never reach the wire, so a client cannot select one."""
|
|
889
964
|
|
|
965
|
+
defaultReasoningEffort: ReasoningEffort
|
|
966
|
+
reasoningEffortVariants: list[ModelDescribedReasoningEffort]
|
|
890
967
|
variants: ModelReasoningEffortVariants
|
|
891
968
|
|
|
892
969
|
|
|
@@ -899,6 +976,16 @@ class ModelCost(TypedDict):
|
|
|
899
976
|
output: str
|
|
900
977
|
|
|
901
978
|
|
|
979
|
+
class _ModelDescribedReasoningEffortBase(TypedDict):
|
|
980
|
+
tier: ReasoningEffort
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
class ModelDescribedReasoningEffort(_ModelDescribedReasoningEffortBase, total=False):
|
|
984
|
+
"""One described reasoning-effort tier of a `model/list` row: a selectable tier plus the catalog's display string for it when declared."""
|
|
985
|
+
|
|
986
|
+
description: str
|
|
987
|
+
|
|
988
|
+
|
|
902
989
|
class ModelListParams(TypedDict, total=False):
|
|
903
990
|
"""`model/list` params: the discovery half of the model-picker gesture. **A query, not a command** — no `commandId`, no durable intake record, no view event."""
|
|
904
991
|
|
|
@@ -1109,6 +1196,14 @@ class SessionBranchChangedParams(_SessionBranchChangedParamsBase, total=False):
|
|
|
1109
1196
|
vcs: Vcs
|
|
1110
1197
|
|
|
1111
1198
|
|
|
1199
|
+
class SessionClosedParams(TypedDict):
|
|
1200
|
+
"""`session/closed` params: a loaded session was unloaded from this host, broadcast to every initialized connection. After it, the session is `notLoaded`; the log remains on disk and `session/resume` reloads it. A crash emits nothing — only the two orderly unload paths do, and both write the durable `SessionEnd` record first."""
|
|
1201
|
+
|
|
1202
|
+
reason: SessionClosedReason
|
|
1203
|
+
sessionId: str
|
|
1204
|
+
viewCursor: str | None
|
|
1205
|
+
|
|
1206
|
+
|
|
1112
1207
|
class _SessionCompactParamsBase(TypedDict):
|
|
1113
1208
|
commandId: str
|
|
1114
1209
|
sessionId: str
|
|
@@ -1216,28 +1311,64 @@ class SessionHistory(_SessionHistoryBase, total=False):
|
|
|
1216
1311
|
noneReason: HistoryNoneReason
|
|
1217
1312
|
|
|
1218
1313
|
|
|
1314
|
+
class SessionListBranchFilter(TypedDict):
|
|
1315
|
+
"""Exact branch selection."""
|
|
1316
|
+
|
|
1317
|
+
anyOf: list[str | None]
|
|
1318
|
+
|
|
1319
|
+
|
|
1219
1320
|
class SessionListChangedParams(TypedDict):
|
|
1220
1321
|
"""`session/listChanged` params: one changed row of the `session/list` shape — the full Session object as the answering host's list face serves it at emission, a replace, never a delta. Emitted only on connections that negotiated the `sessionListStream` capability at `initialize`; row birth stays on `session/started`, unload pairs with `session/closed`."""
|
|
1221
1322
|
|
|
1222
1323
|
session: Session
|
|
1223
1324
|
|
|
1224
1325
|
|
|
1326
|
+
class SessionListFilter(TypedDict, total=False):
|
|
1327
|
+
"""The `session/list` filter. Members are ANDed with each other and with the top-level `workspaceRoot` and `updatedAfter`; values inside each `anyOf` are ORed. The canonical form the server echoes deduplicates and sorts every set, spells session IDs as canonical UUIDs, lowercases text terms, and orders `text.fields` `name` then `title`."""
|
|
1328
|
+
|
|
1329
|
+
branch: SessionListBranchFilter
|
|
1330
|
+
sessionId: SessionListSessionIdFilter
|
|
1331
|
+
text: SessionListTextFilter
|
|
1332
|
+
|
|
1333
|
+
|
|
1225
1334
|
class SessionListParams(TypedDict, total=False):
|
|
1226
1335
|
"""`session/list` params. Read-only; never touches leases."""
|
|
1227
1336
|
|
|
1228
1337
|
cursor: str | None
|
|
1338
|
+
filter: SessionListFilter
|
|
1229
1339
|
limit: int
|
|
1230
1340
|
updatedAfter: str
|
|
1231
1341
|
workspaceRoot: str
|
|
1232
1342
|
|
|
1233
1343
|
|
|
1234
|
-
class
|
|
1235
|
-
"""`session/list` result. Ordering is `updatedAt` descending."""
|
|
1236
|
-
|
|
1344
|
+
class _SessionListResultBase(TypedDict):
|
|
1237
1345
|
nextCursor: str | None
|
|
1238
1346
|
sessions: list[Session]
|
|
1239
1347
|
|
|
1240
1348
|
|
|
1349
|
+
class SessionListResult(_SessionListResultBase, total=False):
|
|
1350
|
+
"""`session/list` result. Ordering is `updatedAt` descending."""
|
|
1351
|
+
|
|
1352
|
+
appliedFilter: SessionListFilter
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
class SessionListSessionIdFilter(TypedDict):
|
|
1356
|
+
"""Exact session-ID selection."""
|
|
1357
|
+
|
|
1358
|
+
anyOf: list[str]
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
class _SessionListTextFilterBase(TypedDict):
|
|
1362
|
+
fields: list[SessionListTextField]
|
|
1363
|
+
|
|
1364
|
+
|
|
1365
|
+
class SessionListTextFilter(_SessionListTextFilterBase, total=False):
|
|
1366
|
+
"""Name/title token-prefix search. Each term is trimmed, lowercased with ordinary Unicode lowercase, then NFC- normalized, and matches the beginning of an alphanumeric token, accent-sensitively (`check` matches `Checkout`; `eck` does not). NFC means a decomposed and a precomposed spelling of one term are the same term, and the echo returns the composed form. Matching never reorders rows."""
|
|
1367
|
+
|
|
1368
|
+
allOf: list[str]
|
|
1369
|
+
anyOf: list[str]
|
|
1370
|
+
|
|
1371
|
+
|
|
1241
1372
|
class _SessionModelChangedParamsBase(TypedDict):
|
|
1242
1373
|
modelId: str
|
|
1243
1374
|
sessionId: str
|
|
@@ -1407,6 +1538,7 @@ class SessionStartParams(_SessionStartParamsBase, total=False):
|
|
|
1407
1538
|
providerId: str | None
|
|
1408
1539
|
sessionId: str
|
|
1409
1540
|
workspaceRoot: str
|
|
1541
|
+
workspaceRoots: list[str]
|
|
1410
1542
|
|
|
1411
1543
|
|
|
1412
1544
|
class SessionStartResult(TypedDict):
|
|
@@ -1416,6 +1548,12 @@ class SessionStartResult(TypedDict):
|
|
|
1416
1548
|
viewCursor: str
|
|
1417
1549
|
|
|
1418
1550
|
|
|
1551
|
+
class SessionStartedParams(TypedDict):
|
|
1552
|
+
"""`session/started` params: a session became newly loaded on this host via `session/start` or `session/fork`, broadcast to every initialized connection. The one member is the same `$defs/Session` object the `session/start`/`session/fork` results carry, so the broadcast and the result describe one fact through one type — the host builds the broadcast payload as a `$defs/Session` — the fresh-start arm reuses the result's `session` member, the start-replay arm builds the live attach snapshot — and the emission is parity-gated against this type at the producer (`session-server` prod-assembly capture) and over the committed transcript corpus (conformance `session_lifecycle_enrollment`)."""
|
|
1553
|
+
|
|
1554
|
+
session: Session
|
|
1555
|
+
|
|
1556
|
+
|
|
1419
1557
|
class _SessionStatusChangedParamsBase(TypedDict):
|
|
1420
1558
|
sessionId: str
|
|
1421
1559
|
status: SessionStatus
|
|
@@ -1838,6 +1976,7 @@ class TurnStartParams(_TurnStartParamsBase, total=False):
|
|
|
1838
1976
|
displayText: str
|
|
1839
1977
|
ifBusy: IfBusy
|
|
1840
1978
|
reasoningEffort: ReasoningEffort
|
|
1979
|
+
workspaceRoots: list[str]
|
|
1841
1980
|
|
|
1842
1981
|
|
|
1843
1982
|
class TurnStartResult(TypedDict):
|
|
@@ -2239,6 +2378,7 @@ METHODS: Final[dict[str, MethodSpec]] = {
|
|
|
2239
2378
|
"account/read": {"description": "Reads the host's projected credential state: which credential lane is in effect, an optional display label, and whether the deployment needs a credential at all.", "params": None, "result": "AccountState"},
|
|
2240
2379
|
"approval/decide": {"description": "Decides a pending approval, guarded by the current requirement id against the multi-stage race.", "params": "ApprovalDecideParams", "result": "ApprovalDecideResult"},
|
|
2241
2380
|
"approval/listPending": {"description": "Reads the full pending approval and user-input payloads for a session; a lease-free fold read.", "params": "ApprovalListPendingParams", "result": "ApprovalListPendingResult"},
|
|
2381
|
+
"feedback/submit": {"description": "Submits a first-party feedback report through the host, reusing the TUI submitter seam (consent, bundle-first persistence, redaction), and answers the upload receipt.", "params": "FeedbackSubmitParams", "result": "FeedbackSubmitResult"},
|
|
2242
2382
|
"goal/clear": {"description": "Clears the session goal; never wakes and its ack never names a turn.", "params": "GoalClearParams", "result": "GoalCommandResult"},
|
|
2243
2383
|
"goal/edit": {"description": "Replaces the current goal's objective under the same wake gate as goal/set.", "params": "GoalEditParams", "result": "GoalCommandResult"},
|
|
2244
2384
|
"goal/pause": {"description": "Pauses the session goal; never wakes and its ack never names a turn.", "params": "GoalPauseParams", "result": "GoalCommandResult"},
|
|
@@ -2248,6 +2388,7 @@ METHODS: Final[dict[str, MethodSpec]] = {
|
|
|
2248
2388
|
"item/readOutput": {"description": "Byte-ranged read of stored full output the view truncated; works on loaded and unloaded sessions and takes no lease.", "params": "ItemReadOutputParams", "result": "ItemReadOutputResult"},
|
|
2249
2389
|
"model/list": {"description": "Reads the catalog of models the host will accept in `session/setModel`; a query, not a command.", "params": "ModelListParams", "result": "ModelListResult"},
|
|
2250
2390
|
"session/compact": {"description": "Compacts the session's conversation context; runs asynchronously, so the ack is admission only.", "params": "SessionCompactParams", "result": "SessionCompactResult"},
|
|
2391
|
+
"session/delete": {"description": "Admits durable session deletion; completion arrives separately.", "params": "SessionDeleteParams", "result": "CommandAcceptedResult"},
|
|
2251
2392
|
"session/fork": {"description": "Branches a session into a new id whose log copies the source through a cut point, with durable provenance.", "params": "SessionForkParams", "result": "SessionForkResult"},
|
|
2252
2393
|
"session/list": {"description": "Pages through stored sessions under the sessions root for history and picker UIs; read-only, never touches leases.", "params": "SessionListParams", "result": "SessionListResult"},
|
|
2253
2394
|
"session/read": {"description": "Reads one stored session without attaching: no lease, no load, no subscription, no resume record.", "params": "SessionReadParams", "result": "SessionReadResult"},
|
|
@@ -2297,15 +2438,19 @@ NOTIFICATIONS: Final[dict[str, NotificationSpec]] = {
|
|
|
2297
2438
|
"item/delta": {"description": "Streaming append to an open item's field path (ephemeral-sourced, no sourceRange; opt-out-able).", "params": "ItemDeltaParams"},
|
|
2298
2439
|
"item/started": {"description": "An item opened on the transcript.", "params": "ItemStartedParams"},
|
|
2299
2440
|
"item/updated": {"description": "An open item changed non-terminally: full re-emission at a higher revision.", "params": "ItemUpdatedParams"},
|
|
2441
|
+
"mcpServer/oauthLoginCompleted": {"description": "An MCP OAuth login flow reached a terminal outcome (granted, denied, expired, cancelled, or failed). Delivered to every experimental connection that has not opted the method out, initiator or not; never carries the authorization URL or any key material.", "params": "McpServerOAuthLoginCompletedParams"},
|
|
2300
2442
|
"session/approvalModeChanged": {"description": "The approval enforcement mode changed: the fold of the durable reconfigure audit fact.", "params": "SessionApprovalModeChangedParams"},
|
|
2301
2443
|
"session/branchChanged": {"description": "A durable workspace-branch observation landed; null branch is a detached-HEAD fact.", "params": "SessionBranchChangedParams"},
|
|
2444
|
+
"session/closed": {"description": "A loaded session was unloaded (idle | hostShutdown) with the final view cursor; broadcast to every initialized connection.", "params": "SessionClosedParams"},
|
|
2302
2445
|
"session/contextUsage": {"description": "A provider-reported context-occupancy fact folded to a changed (windowTokens, usedTokens, pressure) triple.", "params": "SessionContextUsageParams"},
|
|
2446
|
+
"session/deleteCompleted": {"description": "The persisted terminal result of an admitted session deletion.", "params": "SessionDeleteCompletedParams"},
|
|
2303
2447
|
"session/goalChanged": {"description": "The session's goal block changed value; replace wholesale, an explicit null clears.", "params": "SessionGoalChangedParams"},
|
|
2304
2448
|
"session/listChanged": {"description": "The changed session/list row, full-row replace; opt-in per connection via the sessionListStream capability, never subscription-gated.", "params": "SessionListChangedParams"},
|
|
2305
2449
|
"session/modelChanged": {"description": "A durable model selection took effect.", "params": "SessionModelChangedParams"},
|
|
2306
2450
|
"session/modelRouteUnserved": {"description": "An accepted login credential update installed a provider that cannot serve the session's standing model route; the standing selection is unchanged and a routable session/setModel repairs it.", "params": "SessionModelRouteUnservedParams"},
|
|
2307
2451
|
"session/nameChanged": {"description": "A durable session-name record landed (rename or first naming): the fold of the session_name record.", "params": "SessionNameChangedParams"},
|
|
2308
2452
|
"session/reasoningEffortChanged": {"description": "A durable session-default reasoning-effort change took effect.", "params": "SessionReasoningEffortChangedParams"},
|
|
2453
|
+
"session/started": {"description": "A session became newly loaded on this host via session/start or session/fork; broadcast to every initialized connection.", "params": "SessionStartedParams"},
|
|
2309
2454
|
"session/statusChanged": {"description": "A loaded session's (status, attention) flipped; command-plane broadcast, cursor-stamped, not subscription-gated.", "params": "SessionStatusChangedParams"},
|
|
2310
2455
|
"session/todoListChanged": {"description": "The todo list was replaced wholesale; empty items is a cleared list.", "params": "SessionTodoListChangedParams"},
|
|
2311
2456
|
"session/tokenUsage": {"description": "A model call completed with usage: raw counters plus counted-once derivations plus session cumulative.", "params": "SessionTokenUsageParams"},
|
|
@@ -2356,4 +2501,4 @@ ERRORS: Final[tuple[ErrorSpec, ...]] = (
|
|
|
2356
2501
|
{"code": -32057, "kind": "userInputAnswerInvalid", "retryable": False, "overrideKinds": ()},
|
|
2357
2502
|
)
|
|
2358
2503
|
|
|
2359
|
-
GRANTABLE_CAPABILITIES: Final[tuple[str, ...]] = ("userShell", "sessionMcp", "sessionListStream",)
|
|
2504
|
+
GRANTABLE_CAPABILITIES: Final[tuple[str, ...]] = ("userShell", "sessionMcp", "sessionListStream", "feedback",)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: muse-code-msp
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.2
|
|
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
|
|
File without changes
|
|
File without changes
|