@github/copilot-sdk 1.0.14 → 1.0.15-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -11
- package/dist/cjs/cliVersion.js +1 -1
- package/dist/cjs/client.js +24 -17
- package/dist/cjs/copilotRequestHandler.js +156 -20
- package/dist/cjs/extension.js +12 -1
- package/dist/cjs/generated/rpc.js +349 -8
- package/dist/cjs/index.js +9 -2
- package/dist/cjs/schema.js +40 -0
- package/dist/cjs/session.js +625 -3
- package/dist/cjs/workflow.js +134 -0
- package/dist/cliVersion.d.ts +1 -1
- package/dist/cliVersion.js +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.js +22 -15
- package/dist/copilotRequestHandler.js +156 -20
- package/dist/extension.d.ts +22 -8
- package/dist/extension.js +13 -1
- package/dist/generated/rpc.d.ts +2824 -315
- package/dist/generated/rpc.js +349 -8
- package/dist/generated/session-events.d.ts +565 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -1
- package/dist/schema.d.ts +4 -0
- package/dist/schema.js +14 -0
- package/dist/session.d.ts +26 -3
- package/dist/session.js +630 -3
- package/dist/types.d.ts +37 -5
- package/dist/workflow.d.ts +364 -0
- package/dist/workflow.js +106 -0
- package/docs/extensions.md +1 -0
- package/docs/workflows.md +257 -0
- package/package.json +17 -14
package/dist/generated/rpc.js
CHANGED
|
@@ -197,7 +197,15 @@ function createServerRpc(connection) {
|
|
|
197
197
|
*
|
|
198
198
|
* @returns Outcome of a catalog.search call: either bounded inert candidates, or one typed refusal. Never a partial success.
|
|
199
199
|
*/
|
|
200
|
-
search: async (params) => connection.sendRequest("catalog.search", params)
|
|
200
|
+
search: async (params) => connection.sendRequest("catalog.search", params),
|
|
201
|
+
/**
|
|
202
|
+
* Terminates one retained catalog selection group. A selected outcome returns the native host a fresh single-use candidate handle plus the original searchId for a later explicit mcp.planInstall call; non-selected outcomes release the group without producing a planning input. Candidate state, cards, URLs, credentials and private identifiers remain inside the runtime. The model-facing catalog_select tool projects the result separately and never exposes the candidate handle or searchId.
|
|
203
|
+
*
|
|
204
|
+
* @param params Terminates one retained catalog selection group through an opaque reference previously returned by the model-safe search projection.
|
|
205
|
+
*
|
|
206
|
+
* @returns Typed outcome of catalog.select. Only the selected host result carries a fresh candidate handle; the model-facing projection removes both that handle and searchId.
|
|
207
|
+
*/
|
|
208
|
+
select: async (params) => connection.sendRequest("catalog.select", params)
|
|
201
209
|
},
|
|
202
210
|
/** @experimental */
|
|
203
211
|
plugins: {
|
|
@@ -428,7 +436,7 @@ function createServerRpc(connection) {
|
|
|
428
436
|
/**
|
|
429
437
|
* Registers an SDK client as the session filesystem provider.
|
|
430
438
|
*
|
|
431
|
-
* @param params Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider.
|
|
439
|
+
* @param params Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider. A registered provider is authoritative for path interpretation and filesystem facts used by workspace permission validation. Paths are interpreted lexically; home-relative paths (`~` and `~/...`) and Windows drive-relative paths such as `C:foo` are unsupported. Until provider-side canonicalization is supported, providers must not expose symlinks inside allowed roots that escape those roots.
|
|
432
440
|
*
|
|
433
441
|
* @returns Indicates whether the calling client was registered as the session filesystem provider.
|
|
434
442
|
*/
|
|
@@ -992,6 +1000,108 @@ function createSessionRpc(connection, sessionId) {
|
|
|
992
1000
|
}
|
|
993
1001
|
},
|
|
994
1002
|
/** @experimental */
|
|
1003
|
+
workflow: {
|
|
1004
|
+
/**
|
|
1005
|
+
* Runs a registered dynamic workflow by name at the top level.
|
|
1006
|
+
*
|
|
1007
|
+
* @param params Parameters for invoking a registered workflow.
|
|
1008
|
+
*
|
|
1009
|
+
* @returns Complete current or terminal workflow run envelope.
|
|
1010
|
+
*/
|
|
1011
|
+
run: async (params) => connection.sendRequest("session.workflow.run", { sessionId, ...params }),
|
|
1012
|
+
/**
|
|
1013
|
+
* Resumes a dynamic workflow run using its persisted name, arguments, journal, and accounting.
|
|
1014
|
+
*
|
|
1015
|
+
* @param params Parameters for resuming a workflow run from its persisted identity.
|
|
1016
|
+
*
|
|
1017
|
+
* @returns Resolved persisted workflow identity and resumed run envelope.
|
|
1018
|
+
*/
|
|
1019
|
+
resume: async (params) => connection.sendRequest("session.workflow.resume", { sessionId, ...params }),
|
|
1020
|
+
/**
|
|
1021
|
+
* Gets the current or settled envelope for a dynamic workflow run.
|
|
1022
|
+
*
|
|
1023
|
+
* @param params Parameters for retrieving a workflow run.
|
|
1024
|
+
*
|
|
1025
|
+
* @returns Complete current or terminal workflow run envelope.
|
|
1026
|
+
*/
|
|
1027
|
+
getRun: async (params) => connection.sendRequest("session.workflow.getRun", { sessionId, ...params }),
|
|
1028
|
+
/**
|
|
1029
|
+
* Lists durable dynamic workflow runs for this session in creation order.
|
|
1030
|
+
*
|
|
1031
|
+
* @param params Parameters for paging workflow runs.
|
|
1032
|
+
*
|
|
1033
|
+
* @returns A page of workflow runs in durable creation order.
|
|
1034
|
+
*/
|
|
1035
|
+
listRuns: async (params) => connection.sendRequest("session.workflow.listRuns", { sessionId, ...params }),
|
|
1036
|
+
/**
|
|
1037
|
+
* Gets durable and live observability detail for one dynamic workflow run.
|
|
1038
|
+
*
|
|
1039
|
+
* @param params Parameters for retrieving a workflow run.
|
|
1040
|
+
*
|
|
1041
|
+
* @returns Full workflow run observability detail.
|
|
1042
|
+
*/
|
|
1043
|
+
getRunDetail: async (params) => connection.sendRequest("session.workflow.getRunDetail", { sessionId, ...params }),
|
|
1044
|
+
/**
|
|
1045
|
+
* Pages durable progress for one dynamic workflow run.
|
|
1046
|
+
*
|
|
1047
|
+
* @param params Parameters for paging workflow progress.
|
|
1048
|
+
*
|
|
1049
|
+
* @returns A bidirectional page of workflow progress.
|
|
1050
|
+
*/
|
|
1051
|
+
getRunProgress: async (params) => connection.sendRequest("session.workflow.getRunProgress", { sessionId, ...params }),
|
|
1052
|
+
/**
|
|
1053
|
+
* Requests cancellation of a dynamic workflow run and returns its run envelope.
|
|
1054
|
+
*
|
|
1055
|
+
* @param params Parameters for cancelling a workflow run.
|
|
1056
|
+
*
|
|
1057
|
+
* @returns Complete current or terminal workflow run envelope.
|
|
1058
|
+
*/
|
|
1059
|
+
cancel: async (params) => connection.sendRequest("session.workflow.cancel", { sessionId, ...params }),
|
|
1060
|
+
/**
|
|
1061
|
+
* Pauses a running dynamic workflow and returns its settled run envelope.
|
|
1062
|
+
*
|
|
1063
|
+
* @param params Parameters for pausing a running workflow.
|
|
1064
|
+
*
|
|
1065
|
+
* @returns Complete current or terminal workflow run envelope.
|
|
1066
|
+
*/
|
|
1067
|
+
pause: async (params) => connection.sendRequest("session.workflow.pause", { sessionId, ...params }),
|
|
1068
|
+
/**
|
|
1069
|
+
* Records a batch of ordered dynamic workflow progress lines.
|
|
1070
|
+
*
|
|
1071
|
+
* @param params Parameters for recording workflow progress.
|
|
1072
|
+
*
|
|
1073
|
+
* @returns Acknowledgement that a workflow request was accepted.
|
|
1074
|
+
*/
|
|
1075
|
+
log: async (params) => connection.sendRequest("session.workflow.log", { sessionId, ...params }),
|
|
1076
|
+
/**
|
|
1077
|
+
* Runs one dynamic-workflow-scoped subagent and returns its result.
|
|
1078
|
+
*
|
|
1079
|
+
* @param params Parameters for one workflow-scoped subagent call.
|
|
1080
|
+
*
|
|
1081
|
+
* @returns Result of one workflow-scoped subagent call.
|
|
1082
|
+
*/
|
|
1083
|
+
agent: async (params) => connection.sendRequest("session.workflow.agent", { sessionId, ...params }),
|
|
1084
|
+
/** @experimental */
|
|
1085
|
+
journal: {
|
|
1086
|
+
/**
|
|
1087
|
+
* Reads a memoized dynamic workflow journal entry.
|
|
1088
|
+
*
|
|
1089
|
+
* @param params Parameters for reading a workflow journal entry.
|
|
1090
|
+
*
|
|
1091
|
+
* @returns Result of reading a workflow journal entry.
|
|
1092
|
+
*/
|
|
1093
|
+
get: async (params) => connection.sendRequest("session.workflow.journal.get", { sessionId, ...params }),
|
|
1094
|
+
/**
|
|
1095
|
+
* Stores a memoized dynamic workflow journal entry.
|
|
1096
|
+
*
|
|
1097
|
+
* @param params Parameters for storing a workflow journal entry.
|
|
1098
|
+
*
|
|
1099
|
+
* @returns Acknowledgement that a workflow request was accepted.
|
|
1100
|
+
*/
|
|
1101
|
+
put: async (params) => connection.sendRequest("session.workflow.journal.put", { sessionId, ...params })
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
1104
|
+
/** @experimental */
|
|
995
1105
|
model: {
|
|
996
1106
|
/**
|
|
997
1107
|
* Gets the session's authoritative model snapshot, including the committed Auto preference and any newer unclaimed Auto preference waiting for a future user turn.
|
|
@@ -1697,13 +1807,168 @@ function createSessionRpc(connection, sessionId) {
|
|
|
1697
1807
|
}
|
|
1698
1808
|
},
|
|
1699
1809
|
/** @experimental */
|
|
1810
|
+
connectors: {
|
|
1811
|
+
/**
|
|
1812
|
+
* Returns feature availability and bounded polling limits for the EXPERIMENTAL session connector API. This method never performs a Connector service request.
|
|
1813
|
+
*
|
|
1814
|
+
* @returns Feature detection and hard polling limits for the EXPERIMENTAL session connector API.
|
|
1815
|
+
*/
|
|
1816
|
+
getCapabilities: async () => connection.sendRequest("session.connectors.getCapabilities", { sessionId }),
|
|
1817
|
+
/**
|
|
1818
|
+
* Returns authoritative session Connector state from current availability, pinned account selection, cached catalog, and live MCP projection without performing a Connector service request.
|
|
1819
|
+
*
|
|
1820
|
+
* @returns Authoritative session connector state. Account IDs are opaque routing identifiers and credentials are never included.
|
|
1821
|
+
*/
|
|
1822
|
+
getStatus: async () => connection.sendRequest("session.connectors.getStatus", { sessionId }),
|
|
1823
|
+
/**
|
|
1824
|
+
* Returns the cached Connector catalog for the pinned opaque account selection, fetching it only when this session has no cached catalog.
|
|
1825
|
+
*
|
|
1826
|
+
* @param params Pins a Connector operation to one host-owned GitHub account through its opaque selection ID. Provider tokens are never accepted.
|
|
1827
|
+
*
|
|
1828
|
+
* @returns Validated Connector catalog snapshot cached by the session.
|
|
1829
|
+
*/
|
|
1830
|
+
list: async (params) => connection.sendRequest("session.connectors.list", { sessionId, ...params }),
|
|
1831
|
+
/**
|
|
1832
|
+
* Refreshes and validates the Connector catalog for the pinned opaque account selection.
|
|
1833
|
+
*
|
|
1834
|
+
* @param params Pins a Connector operation to one host-owned GitHub account through its opaque selection ID. Provider tokens are never accepted.
|
|
1835
|
+
*
|
|
1836
|
+
* @returns Validated Connector catalog snapshot cached by the session.
|
|
1837
|
+
*/
|
|
1838
|
+
refresh: async (params) => connection.sendRequest("session.connectors.refresh", { sessionId, ...params }),
|
|
1839
|
+
/**
|
|
1840
|
+
* Initiates an idempotent Connector connection request without opening a browser. Returns connected when the service is immediately authoritative, consent_required with a validated URL, or pending with an opaque continuation ID.
|
|
1841
|
+
*
|
|
1842
|
+
* @param params Selects one Connector and the pinned host-owned account used for its service and MCP authorization.
|
|
1843
|
+
*
|
|
1844
|
+
* @returns Typed result of initiating or continuing a Connector connection.
|
|
1845
|
+
*/
|
|
1846
|
+
connect: async (params) => connection.sendRequest("session.connectors.connect", { sessionId, ...params }),
|
|
1847
|
+
/**
|
|
1848
|
+
* Re-initiates an idempotent Connector connection request without browser or UI effects, with the same typed outcomes as connect.
|
|
1849
|
+
*
|
|
1850
|
+
* @param params Selects one Connector and the pinned host-owned account used for its service and MCP authorization.
|
|
1851
|
+
*
|
|
1852
|
+
* @returns Typed result of initiating or continuing a Connector connection.
|
|
1853
|
+
*/
|
|
1854
|
+
reconnect: async (params) => connection.sendRequest("session.connectors.reconnect", { sessionId, ...params }),
|
|
1855
|
+
/**
|
|
1856
|
+
* Continues a pending Connector connection with caller-supplied attempt, interval, and deadline bounds. The runtime never opens the returned consent URL.
|
|
1857
|
+
*
|
|
1858
|
+
* @param params Explicitly bounded continuation of a pending Connector connection.
|
|
1859
|
+
*
|
|
1860
|
+
* @returns Typed result of initiating or continuing a Connector connection.
|
|
1861
|
+
*/
|
|
1862
|
+
continueConnection: async (params) => connection.sendRequest("session.connectors.continueConnection", { sessionId, ...params }),
|
|
1863
|
+
/**
|
|
1864
|
+
* Disconnects one Connector for the pinned opaque account selection, refreshes the authoritative catalog, and removes its session-owned MCP projection.
|
|
1865
|
+
*
|
|
1866
|
+
* @param params Selects one Connector and the pinned host-owned account used for its service and MCP authorization.
|
|
1867
|
+
*
|
|
1868
|
+
* @returns Authoritative result after disconnect and MCP reconciliation.
|
|
1869
|
+
*/
|
|
1870
|
+
disconnect: async (params) => connection.sendRequest("session.connectors.disconnect", { sessionId, ...params }),
|
|
1871
|
+
/**
|
|
1872
|
+
* Reconciles the authoritative cached or freshly requested Connector catalog into the session Connector MCP projection and returns live status.
|
|
1873
|
+
*
|
|
1874
|
+
* @param params Requests authoritative Connector-to-MCP reconciliation for the pinned account.
|
|
1875
|
+
*
|
|
1876
|
+
* @returns Authoritative session connector state. Account IDs are opaque routing identifiers and credentials are never included.
|
|
1877
|
+
*/
|
|
1878
|
+
reconcile: async (params) => connection.sendRequest("session.connectors.reconcile", { sessionId, ...params })
|
|
1879
|
+
},
|
|
1880
|
+
/** @experimental */
|
|
1881
|
+
managedSettings: {
|
|
1882
|
+
/**
|
|
1883
|
+
* Waits for the live session's in-flight managed-settings application, then returns the retained effective snapshot used by runtime enforcement and by `session.managed_settings_resolved`. It does not perform another account, device, or server resolution, and rejects when resolution has not produced a snapshot.
|
|
1884
|
+
*
|
|
1885
|
+
* @returns Enterprise managed-settings resolution: the effective managed settings the session applied and which channels contributed, so SDK clients can show users what is enterprise-managed. Fires whenever managed policy is (re)applied — at session start, on resume, and on account switch. This is an ephemeral live snapshot (delivered to subscribers but not persisted to the session event log), because at session start it resolves before `session.start` is emitted. Device values take precedence over server values, then the policy helper, per ordinary key, while permissions compose restrictively across device, server, policy-helper, and SDK-client layers. The account-scoped `getManagedSettings()` API does not include session-local client injection. Marked experimental while the managed-settings surface stabilizes.
|
|
1886
|
+
*/
|
|
1887
|
+
get: async () => connection.sendRequest("session.managedSettings.get", { sessionId })
|
|
1888
|
+
},
|
|
1889
|
+
/** @experimental */
|
|
1700
1890
|
plugins: {
|
|
1701
1891
|
/**
|
|
1702
|
-
* Lists
|
|
1892
|
+
* Lists globally installed, live, built-in, and enterprise-managed desired plugins using the live session's authoritative account, working directory, and retained managed policy.
|
|
1703
1893
|
*
|
|
1704
1894
|
* @returns Plugins installed for the session, with their enabled state and version metadata.
|
|
1705
1895
|
*/
|
|
1706
1896
|
list: async () => connection.sendRequest("session.plugins.list", { sessionId }),
|
|
1897
|
+
/**
|
|
1898
|
+
* Installs a plugin using the live session's authoritative account, working directory, and retained managed policy.
|
|
1899
|
+
*
|
|
1900
|
+
* @param params Plugin source resolved relative to the session's authoritative working directory.
|
|
1901
|
+
*
|
|
1902
|
+
* @returns Result of installing a plugin.
|
|
1903
|
+
*/
|
|
1904
|
+
install: async (params) => connection.sendRequest("session.plugins.install", { sessionId, ...params }),
|
|
1905
|
+
/**
|
|
1906
|
+
* Uninstalls a plugin when permitted by the live session's retained managed policy.
|
|
1907
|
+
*
|
|
1908
|
+
* @param params Name (or spec) of the plugin to uninstall.
|
|
1909
|
+
*/
|
|
1910
|
+
uninstall: async (params) => connection.sendRequest("session.plugins.uninstall", { sessionId, ...params }),
|
|
1911
|
+
/**
|
|
1912
|
+
* Updates an installed plugin using the live session's authoritative account, working directory, and retained managed policy.
|
|
1913
|
+
*
|
|
1914
|
+
* @param params Name (or spec) of the plugin to update.
|
|
1915
|
+
*
|
|
1916
|
+
* @returns Result of updating a single plugin.
|
|
1917
|
+
*/
|
|
1918
|
+
update: async (params) => connection.sendRequest("session.plugins.update", { sessionId, ...params }),
|
|
1919
|
+
/**
|
|
1920
|
+
* Enables installed plugins when permitted by the live session's retained managed policy.
|
|
1921
|
+
*
|
|
1922
|
+
* @param params Plugin names (or specs) to enable in the session's authoritative working directory.
|
|
1923
|
+
*/
|
|
1924
|
+
enable: async (params) => connection.sendRequest("session.plugins.enable", { sessionId, ...params }),
|
|
1925
|
+
/**
|
|
1926
|
+
* Disables installed plugins when permitted by the live session's retained managed policy.
|
|
1927
|
+
*
|
|
1928
|
+
* @param params Plugin names (or specs) to disable in the session's authoritative working directory.
|
|
1929
|
+
*/
|
|
1930
|
+
disable: async (params) => connection.sendRequest("session.plugins.disable", { sessionId, ...params }),
|
|
1931
|
+
/** @experimental */
|
|
1932
|
+
marketplaces: {
|
|
1933
|
+
/**
|
|
1934
|
+
* Lists registered and enterprise-managed desired marketplaces using the live session's retained policy.
|
|
1935
|
+
*
|
|
1936
|
+
* @returns All registered marketplaces, including built-in defaults.
|
|
1937
|
+
*/
|
|
1938
|
+
list: async () => connection.sendRequest("session.plugins.marketplaces.list", { sessionId }),
|
|
1939
|
+
/**
|
|
1940
|
+
* Adds a marketplace when permitted by the live session's retained managed policy.
|
|
1941
|
+
*
|
|
1942
|
+
* @param params Marketplace source and optional working directory for relative-path resolution.
|
|
1943
|
+
*
|
|
1944
|
+
* @returns Result of registering a new marketplace.
|
|
1945
|
+
*/
|
|
1946
|
+
add: async (params) => connection.sendRequest("session.plugins.marketplaces.add", { sessionId, ...params }),
|
|
1947
|
+
/**
|
|
1948
|
+
* Removes a marketplace when permitted by the live session's retained managed policy.
|
|
1949
|
+
*
|
|
1950
|
+
* @param params Name of the marketplace to remove and an optional force flag.
|
|
1951
|
+
*
|
|
1952
|
+
* @returns Outcome of the remove attempt, including dependent-plugin info when applicable.
|
|
1953
|
+
*/
|
|
1954
|
+
remove: async (params) => connection.sendRequest("session.plugins.marketplaces.remove", { sessionId, ...params }),
|
|
1955
|
+
/**
|
|
1956
|
+
* Browses a marketplace resolved through the live session's working directory and retained managed policy.
|
|
1957
|
+
*
|
|
1958
|
+
* @param params Name of the marketplace whose plugin catalog to fetch.
|
|
1959
|
+
*
|
|
1960
|
+
* @returns Plugins advertised by the marketplace.
|
|
1961
|
+
*/
|
|
1962
|
+
browse: async (params) => connection.sendRequest("session.plugins.marketplaces.browse", { sessionId, ...params }),
|
|
1963
|
+
/**
|
|
1964
|
+
* Refreshes marketplaces resolved through the live session's working directory and retained managed policy.
|
|
1965
|
+
*
|
|
1966
|
+
* @param params Optional marketplace name; omit to refresh all.
|
|
1967
|
+
*
|
|
1968
|
+
* @returns Result of refreshing one or more marketplace catalogs.
|
|
1969
|
+
*/
|
|
1970
|
+
refresh: async (params) => connection.sendRequest("session.plugins.marketplaces.refresh", { sessionId, ...params })
|
|
1971
|
+
},
|
|
1707
1972
|
/**
|
|
1708
1973
|
* Reloads the session's plugin set, refreshing MCP servers, custom agents, hooks, and skills cache so SDK-driven changes via `server.plugins.*` take effect immediately.
|
|
1709
1974
|
*
|
|
@@ -1728,7 +1993,15 @@ function createSessionRpc(connection, sessionId) {
|
|
|
1728
1993
|
*
|
|
1729
1994
|
* @returns The selectable model entries synthesized for the models added by this call.
|
|
1730
1995
|
*/
|
|
1731
|
-
add: async (params) => connection.sendRequest("session.provider.add", { sessionId, ...params })
|
|
1996
|
+
add: async (params) => connection.sendRequest("session.provider.add", { sessionId, ...params }),
|
|
1997
|
+
/**
|
|
1998
|
+
* Atomically updates the session's BYOK provider and model registry by applying the supplied snapshot, replacing existing entries, updating models, or removing entries absent from the snapshot.
|
|
1999
|
+
*
|
|
2000
|
+
* @param params Authoritative BYOK provider and model registry snapshot to apply atomically to the session.
|
|
2001
|
+
*
|
|
2002
|
+
* @returns The selectable model entries and selection ids synthesized for the synchronized BYOK models.
|
|
2003
|
+
*/
|
|
2004
|
+
sync: async (params) => connection.sendRequest("session.provider.sync", { sessionId, ...params })
|
|
1732
2005
|
},
|
|
1733
2006
|
/** @experimental */
|
|
1734
2007
|
options: {
|
|
@@ -2054,9 +2327,9 @@ function createSessionRpc(connection, sessionId) {
|
|
|
2054
2327
|
*/
|
|
2055
2328
|
setRequired: async (params) => connection.sendRequest("session.permissions.setRequired", { sessionId, ...params }),
|
|
2056
2329
|
/**
|
|
2057
|
-
* Clears session-scoped tool
|
|
2330
|
+
* Clears session-scoped tool approvals and, for full resets, exact session-approved paths.
|
|
2058
2331
|
*
|
|
2059
|
-
* @param params Clears session-scoped tool
|
|
2332
|
+
* @param params Clears session-scoped tool approvals and optionally clears location-scoped approvals and exact session-approved paths.
|
|
2060
2333
|
*
|
|
2061
2334
|
* @returns Indicates whether the operation succeeded.
|
|
2062
2335
|
*/
|
|
@@ -2072,9 +2345,9 @@ function createSessionRpc(connection, sessionId) {
|
|
|
2072
2345
|
/** @experimental */
|
|
2073
2346
|
paths: {
|
|
2074
2347
|
/**
|
|
2075
|
-
* Returns the session's
|
|
2348
|
+
* Returns the session's recursive directory grants, exact session-approved paths, and primary working directory.
|
|
2076
2349
|
*
|
|
2077
|
-
* @returns Snapshot of the session's
|
|
2350
|
+
* @returns Snapshot of the session's recursive directory grants, exact session-approved paths, and primary working directory.
|
|
2078
2351
|
*/
|
|
2079
2352
|
list: async () => connection.sendRequest("session.permissions.paths.list", { sessionId }),
|
|
2080
2353
|
/**
|
|
@@ -2412,6 +2685,22 @@ function createSessionRpc(connection, sessionId) {
|
|
|
2412
2685
|
* @returns Result of editing a queued message.
|
|
2413
2686
|
*/
|
|
2414
2687
|
updateText: async (params) => connection.sendRequest("session.queue.updateText", { sessionId, ...params }),
|
|
2688
|
+
/**
|
|
2689
|
+
* Atomically withdraws an unchanged, unconsumed user message from the local queued or steering lane. A client retaining the original draft may restore it only when removed is true. Does not interrupt the running turn.
|
|
2690
|
+
*
|
|
2691
|
+
* @param params Conditional withdrawal of a single user message, before the runtime claims it for delivery.
|
|
2692
|
+
*
|
|
2693
|
+
* @returns Result of removing a queued item.
|
|
2694
|
+
*/
|
|
2695
|
+
withdrawMessage: async (params) => connection.sendRequest("session.queue.withdrawMessage", { sessionId, ...params }),
|
|
2696
|
+
/**
|
|
2697
|
+
* Atomically appends text and attachments to an unchanged, unconsumed local steering message. Returns updated=false if delivery or withdrawal already claimed the message.
|
|
2698
|
+
*
|
|
2699
|
+
* @param params Append to one pending steering message without changing its identity or delivery position.
|
|
2700
|
+
*
|
|
2701
|
+
* @returns Result of editing a queued message.
|
|
2702
|
+
*/
|
|
2703
|
+
appendSteering: async (params) => connection.sendRequest("session.queue.appendSteering", { sessionId, ...params }),
|
|
2415
2704
|
/**
|
|
2416
2705
|
* Duplicates an addressable queued item immediately after its source.
|
|
2417
2706
|
*
|
|
@@ -2666,6 +2955,31 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
2666
2955
|
pauseAtCheckpoint: async (params) => connection.sendRequest("session.factory.pauseAtCheckpoint", { sessionId, ...params })
|
|
2667
2956
|
},
|
|
2668
2957
|
/** @experimental */
|
|
2958
|
+
workflow: {
|
|
2959
|
+
/**
|
|
2960
|
+
* Internal tool-originated dynamic workflow invocation.
|
|
2961
|
+
*
|
|
2962
|
+
* @param params Internal parameters for invoking a registered workflow from a tool.
|
|
2963
|
+
*
|
|
2964
|
+
* @returns Complete current or terminal workflow run envelope.
|
|
2965
|
+
*/
|
|
2966
|
+
runFromTool: async (params) => connection.sendRequest("session.workflow.runFromTool", { sessionId, ...params }),
|
|
2967
|
+
/**
|
|
2968
|
+
* Internal tool-originated dynamic workflow resume.
|
|
2969
|
+
*
|
|
2970
|
+
* @param params Internal parameters for resuming a workflow run from a tool.
|
|
2971
|
+
*
|
|
2972
|
+
* @returns Resolved persisted workflow identity and resumed run envelope.
|
|
2973
|
+
*/
|
|
2974
|
+
resumeFromTool: async (params) => connection.sendRequest("session.workflow.resumeFromTool", { sessionId, ...params }),
|
|
2975
|
+
/**
|
|
2976
|
+
* Atomically pauses an owned dynamic workflow attempt at a durable checkpoint.
|
|
2977
|
+
*
|
|
2978
|
+
* @param params Parameters for an owned durable pause checkpoint.
|
|
2979
|
+
*/
|
|
2980
|
+
pauseAtCheckpoint: async (params) => connection.sendRequest("session.workflow.pauseAtCheckpoint", { sessionId, ...params })
|
|
2981
|
+
},
|
|
2982
|
+
/** @experimental */
|
|
2669
2983
|
model: {
|
|
2670
2984
|
/**
|
|
2671
2985
|
* Resolves and applies organization-managed and repository model overlays.
|
|
@@ -2708,6 +3022,23 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
2708
3022
|
unregisterExternalClient: async (params) => connection.sendRequest("session.mcp.unregisterExternalClient", { sessionId, ...params })
|
|
2709
3023
|
},
|
|
2710
3024
|
/** @experimental */
|
|
3025
|
+
connectors: {
|
|
3026
|
+
/**
|
|
3027
|
+
* Reconciles the authoritative Connector catalog into the session MCP projection during startup with a bounded deadline and fail-closed cleanup.
|
|
3028
|
+
*
|
|
3029
|
+
* @param params Pins a Connector operation to one host-owned GitHub account through its opaque selection ID. Provider tokens are never accepted.
|
|
3030
|
+
*
|
|
3031
|
+
* @returns Authoritative session connector state. Account IDs are opaque routing identifiers and credentials are never included.
|
|
3032
|
+
*/
|
|
3033
|
+
reconcileForStartup: async (params) => connection.sendRequest("session.connectors.reconcileForStartup", { sessionId, ...params }),
|
|
3034
|
+
/**
|
|
3035
|
+
* Removes the runtime-owned Connector MCP projection without changing service-side connections.
|
|
3036
|
+
*
|
|
3037
|
+
* @returns Authoritative session connector state. Account IDs are opaque routing identifiers and credentials are never included.
|
|
3038
|
+
*/
|
|
3039
|
+
withdrawProjection: async () => connection.sendRequest("session.connectors.withdrawProjection", { sessionId })
|
|
3040
|
+
},
|
|
3041
|
+
/** @experimental */
|
|
2711
3042
|
commands: {
|
|
2712
3043
|
/**
|
|
2713
3044
|
* Finalizes persistence associated with a client-applied slash-command effect.
|
|
@@ -2861,6 +3192,16 @@ function registerClientSessionApiHandlers(connection, getHandlers) {
|
|
|
2861
3192
|
if (!handler) throw new Error(`No factory handler registered for session: ${params.sessionId}`);
|
|
2862
3193
|
return handler.abort(params);
|
|
2863
3194
|
});
|
|
3195
|
+
connection.onRequest("workflow.execute", async (params) => {
|
|
3196
|
+
const handler = getHandlers(params.sessionId).workflow;
|
|
3197
|
+
if (!handler) throw new Error(`No workflow handler registered for session: ${params.sessionId}`);
|
|
3198
|
+
return handler.execute(params);
|
|
3199
|
+
});
|
|
3200
|
+
connection.onRequest("workflow.abort", async (params) => {
|
|
3201
|
+
const handler = getHandlers(params.sessionId).workflow;
|
|
3202
|
+
if (!handler) throw new Error(`No workflow handler registered for session: ${params.sessionId}`);
|
|
3203
|
+
return handler.abort(params);
|
|
3204
|
+
});
|
|
2864
3205
|
connection.onRequest("tasks.cancel", async (params) => {
|
|
2865
3206
|
const handler = getHandlers(params.sessionId).tasks;
|
|
2866
3207
|
if (!handler) throw new Error(`No tasks handler registered for session: ${params.sessionId}`);
|