|
718 | 718 | "$ref": "#/$defs/SetSessionConfigOptionRequest" |
719 | 719 | } |
720 | 720 | ], |
721 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSets the current value for a session configuration option.", |
| 721 | + "description": "Sets the current value for a session configuration option.", |
722 | 722 | "title": "SetSessionConfigOptionRequest" |
723 | 723 | }, |
724 | 724 | { |
|
867 | 867 | "x-docs-ignore": true |
868 | 868 | }, |
869 | 869 | "ConfigOptionUpdate": { |
870 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession configuration options have been updated.", |
| 870 | + "description": "Session configuration options have been updated.", |
871 | 871 | "properties": { |
872 | 872 | "_meta": { |
873 | 873 | "additionalProperties": true, |
|
1013 | 1013 | "required": ["content"], |
1014 | 1014 | "type": "object" |
1015 | 1015 | }, |
| 1016 | + "Cost": { |
| 1017 | + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCost information for a session.", |
| 1018 | + "properties": { |
| 1019 | + "amount": { |
| 1020 | + "description": "Total cumulative cost for session.", |
| 1021 | + "format": "double", |
| 1022 | + "type": "number" |
| 1023 | + }, |
| 1024 | + "currency": { |
| 1025 | + "description": "ISO 4217 currency code (e.g., \"USD\", \"EUR\").", |
| 1026 | + "type": "string" |
| 1027 | + } |
| 1028 | + }, |
| 1029 | + "required": ["amount", "currency"], |
| 1030 | + "type": "object" |
| 1031 | + }, |
1016 | 1032 | "CreateTerminalRequest": { |
1017 | 1033 | "description": "Request to create a new terminal and execute a command.", |
1018 | 1034 | "properties": { |
|
1352 | 1368 | "type": ["object", "null"] |
1353 | 1369 | }, |
1354 | 1370 | "configOptions": { |
1355 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial session configuration options if supported by the Agent.", |
| 1371 | + "description": "Initial session configuration options if supported by the Agent.", |
1356 | 1372 | "items": { |
1357 | 1373 | "$ref": "#/$defs/SessionConfigOption" |
1358 | 1374 | }, |
|
1706 | 1722 | "type": ["object", "null"] |
1707 | 1723 | }, |
1708 | 1724 | "configOptions": { |
1709 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial session configuration options if supported by the Agent.", |
| 1725 | + "description": "Initial session configuration options if supported by the Agent.", |
1710 | 1726 | "items": { |
1711 | 1727 | "$ref": "#/$defs/SessionConfigOption" |
1712 | 1728 | }, |
|
1960 | 1976 | "type": ["object", "null"] |
1961 | 1977 | }, |
1962 | 1978 | "configOptions": { |
1963 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial session configuration options if supported by the Agent.", |
| 1979 | + "description": "Initial session configuration options if supported by the Agent.", |
1964 | 1980 | "items": { |
1965 | 1981 | "$ref": "#/$defs/SessionConfigOption" |
1966 | 1982 | }, |
|
2224 | 2240 | } |
2225 | 2241 | ], |
2226 | 2242 | "description": "Indicates why the agent stopped processing the turn." |
| 2243 | + }, |
| 2244 | + "usage": { |
| 2245 | + "anyOf": [ |
| 2246 | + { |
| 2247 | + "$ref": "#/$defs/Usage" |
| 2248 | + }, |
| 2249 | + { |
| 2250 | + "type": "null" |
| 2251 | + } |
| 2252 | + ], |
| 2253 | + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nToken usage for this turn (optional)." |
2227 | 2254 | } |
2228 | 2255 | }, |
2229 | 2256 | "required": ["stopReason"], |
|
2527 | 2554 | "type": ["object", "null"] |
2528 | 2555 | }, |
2529 | 2556 | "configOptions": { |
2530 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial session configuration options if supported by the Agent.", |
| 2557 | + "description": "Initial session configuration options if supported by the Agent.", |
2531 | 2558 | "items": { |
2532 | 2559 | "$ref": "#/$defs/SessionConfigOption" |
2533 | 2560 | }, |
|
2630 | 2657 | "type": "object" |
2631 | 2658 | }, |
2632 | 2659 | "SessionConfigGroupId": { |
2633 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for a session configuration option value group.", |
| 2660 | + "description": "Unique identifier for a session configuration option value group.", |
2634 | 2661 | "type": "string" |
2635 | 2662 | }, |
2636 | 2663 | "SessionConfigId": { |
2637 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for a session configuration option.", |
| 2664 | + "description": "Unique identifier for a session configuration option.", |
2638 | 2665 | "type": "string" |
2639 | 2666 | }, |
2640 | 2667 | "SessionConfigOption": { |
2641 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA session configuration option selector and its current state.", |
| 2668 | + "description": "A session configuration option selector and its current state.", |
2642 | 2669 | "discriminator": { |
2643 | 2670 | "propertyName": "type" |
2644 | 2671 | }, |
|
2720 | 2747 | "type": "string" |
2721 | 2748 | } |
2722 | 2749 | ], |
2723 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSemantic category for a session configuration option.\n\nThis is intended to help Clients distinguish broadly common selectors (e.g. model selector vs\nsession mode selector vs thought/reasoning level) for UX purposes (keyboard shortcuts, icons,\nplacement). It MUST NOT be required for correctness. Clients MUST handle missing or unknown\ncategories gracefully.\n\nCategory names beginning with `_` are free for custom use, like other ACP extension methods.\nCategory names that do not begin with `_` are reserved for the ACP spec." |
| 2750 | + "description": "Semantic category for a session configuration option.\n\nThis is intended to help Clients distinguish broadly common selectors (e.g. model selector vs\nsession mode selector vs thought/reasoning level) for UX purposes (keyboard shortcuts, icons,\nplacement). It MUST NOT be required for correctness. Clients MUST handle missing or unknown\ncategories gracefully.\n\nCategory names beginning with `_` are free for custom use, like other ACP extension methods.\nCategory names that do not begin with `_` are reserved for the ACP spec." |
2724 | 2751 | }, |
2725 | 2752 | "SessionConfigSelect": { |
2726 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA single-value selector (dropdown) session configuration option payload.", |
| 2753 | + "description": "A single-value selector (dropdown) session configuration option payload.", |
2727 | 2754 | "properties": { |
2728 | 2755 | "currentValue": { |
2729 | 2756 | "allOf": [ |
|
2746 | 2773 | "type": "object" |
2747 | 2774 | }, |
2748 | 2775 | "SessionConfigSelectGroup": { |
2749 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA group of possible values for a session configuration option.", |
| 2776 | + "description": "A group of possible values for a session configuration option.", |
2750 | 2777 | "properties": { |
2751 | 2778 | "_meta": { |
2752 | 2779 | "additionalProperties": true, |
|
2777 | 2804 | "type": "object" |
2778 | 2805 | }, |
2779 | 2806 | "SessionConfigSelectOption": { |
2780 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA possible value for a session configuration option.", |
| 2807 | + "description": "A possible value for a session configuration option.", |
2781 | 2808 | "properties": { |
2782 | 2809 | "_meta": { |
2783 | 2810 | "additionalProperties": true, |
|
2823 | 2850 | "type": "array" |
2824 | 2851 | } |
2825 | 2852 | ], |
2826 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nPossible values for a session configuration option." |
| 2853 | + "description": "Possible values for a session configuration option." |
2827 | 2854 | }, |
2828 | 2855 | "SessionConfigValueId": { |
2829 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for a session configuration option value.", |
| 2856 | + "description": "Unique identifier for a session configuration option value.", |
2830 | 2857 | "type": "string" |
2831 | 2858 | }, |
2832 | 2859 | "SessionForkCapabilities": { |
|
3166 | 3193 | "$ref": "#/$defs/ConfigOptionUpdate" |
3167 | 3194 | } |
3168 | 3195 | ], |
3169 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession configuration options have been updated.", |
| 3196 | + "description": "Session configuration options have been updated.", |
3170 | 3197 | "properties": { |
3171 | 3198 | "sessionUpdate": { |
3172 | 3199 | "const": "config_option_update", |
|
3191 | 3218 | }, |
3192 | 3219 | "required": ["sessionUpdate"], |
3193 | 3220 | "type": "object" |
| 3221 | + }, |
| 3222 | + { |
| 3223 | + "allOf": [ |
| 3224 | + { |
| 3225 | + "$ref": "#/$defs/UsageUpdate" |
| 3226 | + } |
| 3227 | + ], |
| 3228 | + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nContext window and cost update for the session.", |
| 3229 | + "properties": { |
| 3230 | + "sessionUpdate": { |
| 3231 | + "const": "usage_update", |
| 3232 | + "type": "string" |
| 3233 | + } |
| 3234 | + }, |
| 3235 | + "required": ["sessionUpdate"], |
| 3236 | + "type": "object" |
3194 | 3237 | } |
3195 | 3238 | ] |
3196 | 3239 | }, |
3197 | 3240 | "SetSessionConfigOptionRequest": { |
3198 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for setting a session configuration option.", |
| 3241 | + "description": "Request parameters for setting a session configuration option.", |
3199 | 3242 | "properties": { |
3200 | 3243 | "_meta": { |
3201 | 3244 | "additionalProperties": true, |
|
3233 | 3276 | "x-side": "agent" |
3234 | 3277 | }, |
3235 | 3278 | "SetSessionConfigOptionResponse": { |
3236 | | - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `session/set_config_option` method.", |
| 3279 | + "description": "Response to `session/set_config_option` method.", |
3237 | 3280 | "properties": { |
3238 | 3281 | "_meta": { |
3239 | 3282 | "additionalProperties": true, |
|
3813 | 3856 | "required": ["hint"], |
3814 | 3857 | "type": "object" |
3815 | 3858 | }, |
| 3859 | + "Usage": { |
| 3860 | + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nToken usage information for a prompt turn.", |
| 3861 | + "properties": { |
| 3862 | + "cachedReadTokens": { |
| 3863 | + "description": "Total cache read tokens.", |
| 3864 | + "format": "uint64", |
| 3865 | + "minimum": 0, |
| 3866 | + "type": ["integer", "null"] |
| 3867 | + }, |
| 3868 | + "cachedWriteTokens": { |
| 3869 | + "description": "Total cache write tokens.", |
| 3870 | + "format": "uint64", |
| 3871 | + "minimum": 0, |
| 3872 | + "type": ["integer", "null"] |
| 3873 | + }, |
| 3874 | + "inputTokens": { |
| 3875 | + "description": "Total input tokens across all turns.", |
| 3876 | + "format": "uint64", |
| 3877 | + "minimum": 0, |
| 3878 | + "type": "integer" |
| 3879 | + }, |
| 3880 | + "outputTokens": { |
| 3881 | + "description": "Total output tokens across all turns.", |
| 3882 | + "format": "uint64", |
| 3883 | + "minimum": 0, |
| 3884 | + "type": "integer" |
| 3885 | + }, |
| 3886 | + "thoughtTokens": { |
| 3887 | + "description": "Total thought/reasoning tokens", |
| 3888 | + "format": "uint64", |
| 3889 | + "minimum": 0, |
| 3890 | + "type": ["integer", "null"] |
| 3891 | + }, |
| 3892 | + "totalTokens": { |
| 3893 | + "description": "Sum of all token types across session.", |
| 3894 | + "format": "uint64", |
| 3895 | + "minimum": 0, |
| 3896 | + "type": "integer" |
| 3897 | + } |
| 3898 | + }, |
| 3899 | + "required": ["totalTokens", "inputTokens", "outputTokens"], |
| 3900 | + "type": "object" |
| 3901 | + }, |
| 3902 | + "UsageUpdate": { |
| 3903 | + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nContext window and cost update for a session.", |
| 3904 | + "properties": { |
| 3905 | + "_meta": { |
| 3906 | + "additionalProperties": true, |
| 3907 | + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", |
| 3908 | + "type": ["object", "null"] |
| 3909 | + }, |
| 3910 | + "cost": { |
| 3911 | + "anyOf": [ |
| 3912 | + { |
| 3913 | + "$ref": "#/$defs/Cost" |
| 3914 | + }, |
| 3915 | + { |
| 3916 | + "type": "null" |
| 3917 | + } |
| 3918 | + ], |
| 3919 | + "description": "Cumulative session cost (optional)." |
| 3920 | + }, |
| 3921 | + "size": { |
| 3922 | + "description": "Total context window size in tokens.", |
| 3923 | + "format": "uint64", |
| 3924 | + "minimum": 0, |
| 3925 | + "type": "integer" |
| 3926 | + }, |
| 3927 | + "used": { |
| 3928 | + "description": "Tokens currently in context.", |
| 3929 | + "format": "uint64", |
| 3930 | + "minimum": 0, |
| 3931 | + "type": "integer" |
| 3932 | + } |
| 3933 | + }, |
| 3934 | + "required": ["used", "size"], |
| 3935 | + "type": "object" |
| 3936 | + }, |
3816 | 3937 | "WaitForTerminalExitRequest": { |
3817 | 3938 | "description": "Request to wait for a terminal command to exit.", |
3818 | 3939 | "properties": { |
|
0 commit comments