@github/copilot-sdk 0.2.2 → 0.3.0-preview.0

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.
@@ -16,7 +16,14 @@ function createServerRpc(connection) {
16
16
  add: async (params) => connection.sendRequest("mcp.config.add", params),
17
17
  update: async (params) => connection.sendRequest("mcp.config.update", params),
18
18
  remove: async (params) => connection.sendRequest("mcp.config.remove", params)
19
- }
19
+ },
20
+ discover: async (params) => connection.sendRequest("mcp.discover", params)
21
+ },
22
+ skills: {
23
+ config: {
24
+ setDisabledSkills: async (params) => connection.sendRequest("skills.config.setDisabledSkills", params)
25
+ },
26
+ discover: async (params) => connection.sendRequest("skills.discover", params)
20
27
  },
21
28
  sessionFs: {
22
29
  setProvider: async (params) => connection.sendRequest("sessionFs.setProvider", params)
@@ -37,15 +44,23 @@ function createSessionRpc(connection, sessionId) {
37
44
  get: async () => connection.sendRequest("session.mode.get", { sessionId }),
38
45
  set: async (params) => connection.sendRequest("session.mode.set", { sessionId, ...params })
39
46
  },
47
+ name: {
48
+ get: async () => connection.sendRequest("session.name.get", { sessionId }),
49
+ set: async (params) => connection.sendRequest("session.name.set", { sessionId, ...params })
50
+ },
40
51
  plan: {
41
52
  read: async () => connection.sendRequest("session.plan.read", { sessionId }),
42
53
  update: async (params) => connection.sendRequest("session.plan.update", { sessionId, ...params }),
43
54
  delete: async () => connection.sendRequest("session.plan.delete", { sessionId })
44
55
  },
45
- workspace: {
46
- listFiles: async () => connection.sendRequest("session.workspace.listFiles", { sessionId }),
47
- readFile: async (params) => connection.sendRequest("session.workspace.readFile", { sessionId, ...params }),
48
- createFile: async (params) => connection.sendRequest("session.workspace.createFile", { sessionId, ...params })
56
+ workspaces: {
57
+ getWorkspace: async () => connection.sendRequest("session.workspaces.getWorkspace", { sessionId }),
58
+ listFiles: async () => connection.sendRequest("session.workspaces.listFiles", { sessionId }),
59
+ readFile: async (params) => connection.sendRequest("session.workspaces.readFile", { sessionId, ...params }),
60
+ createFile: async (params) => connection.sendRequest("session.workspaces.createFile", { sessionId, ...params })
61
+ },
62
+ instructions: {
63
+ getSources: async () => connection.sendRequest("session.instructions.getSources", { sessionId })
49
64
  },
50
65
  /** @experimental */
51
66
  fleet: {
@@ -106,6 +121,10 @@ function createSessionRpc(connection, sessionId) {
106
121
  history: {
107
122
  compact: async () => connection.sendRequest("session.history.compact", { sessionId }),
108
123
  truncate: async (params) => connection.sendRequest("session.history.truncate", { sessionId, ...params })
124
+ },
125
+ /** @experimental */
126
+ usage: {
127
+ getMetrics: async () => connection.sendRequest("session.usage.getMetrics", { sessionId })
109
128
  }
110
129
  };
111
130
  }