@github/copilot-sdk 1.0.0-beta.5 → 1.0.0-beta.7

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/dist/types.js CHANGED
@@ -1,4 +1,32 @@
1
1
  import { createSessionFsAdapter } from "./sessionFsProvider.js";
2
+ const RuntimeConnection = {
3
+ /**
4
+ * Spawn a runtime child process and communicate over its stdin/stdout.
5
+ * This is the default if no {@link CopilotClientOptions.connection} is set.
6
+ */
7
+ forStdio(opts = {}) {
8
+ return { kind: "stdio", path: opts.path, args: opts.args };
9
+ },
10
+ /**
11
+ * Spawn a runtime child process that listens on a TCP socket and connect to it.
12
+ */
13
+ forTcp(opts = {}) {
14
+ return {
15
+ kind: "tcp",
16
+ port: opts.port,
17
+ connectionToken: opts.connectionToken,
18
+ path: opts.path,
19
+ args: opts.args
20
+ };
21
+ },
22
+ /**
23
+ * Connect to an already-running runtime at the given URL. The SDK does not
24
+ * spawn a process in this mode.
25
+ */
26
+ forUri(url, opts = {}) {
27
+ return { kind: "uri", url, connectionToken: opts.connectionToken };
28
+ }
29
+ };
2
30
  function convertMcpCallToolResult(callResult) {
3
31
  const textParts = [];
4
32
  const binaryResults = [];
@@ -44,7 +72,7 @@ function convertMcpCallToolResult(callResult) {
44
72
  function defineTool(name, config) {
45
73
  return { name, ...config };
46
74
  }
47
- const SYSTEM_PROMPT_SECTIONS = {
75
+ const SYSTEM_MESSAGE_SECTIONS = {
48
76
  identity: { description: "Agent identity preamble and mode statement" },
49
77
  tone: { description: "Response style, conciseness rules, output formatting preferences" },
50
78
  tool_efficiency: { description: "Tool usage patterns, parallel calling, batching guidelines" },
@@ -54,6 +82,9 @@ const SYSTEM_PROMPT_SECTIONS = {
54
82
  safety: { description: "Environment limitations, prohibited actions, security policies" },
55
83
  tool_instructions: { description: "Per-tool usage instructions" },
56
84
  custom_instructions: { description: "Repository and organization custom instructions" },
85
+ runtime_instructions: {
86
+ description: "Runtime-provided context and instructions (e.g. system notifications, memories, workspace context, mode-specific instructions, content-exclusion policy)"
87
+ },
57
88
  last_instructions: {
58
89
  description: "End-of-prompt instructions: parallel tool calling, persistence, task completion"
59
90
  }
@@ -63,7 +94,8 @@ const defaultJoinSessionPermissionHandler = () => ({
63
94
  kind: "no-result"
64
95
  });
65
96
  export {
66
- SYSTEM_PROMPT_SECTIONS,
97
+ RuntimeConnection,
98
+ SYSTEM_MESSAGE_SECTIONS,
67
99
  approveAll,
68
100
  convertMcpCallToolResult,
69
101
  createSessionFsAdapter,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/github/copilot-sdk.git"
6
6
  },
7
- "version": "1.0.0-beta.5",
7
+ "version": "1.0.0-beta.7",
8
8
  "description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
9
9
  "main": "./dist/cjs/index.js",
10
10
  "types": "./dist/index.d.ts",
@@ -56,7 +56,7 @@
56
56
  "author": "GitHub",
57
57
  "license": "MIT",
58
58
  "dependencies": {
59
- "@github/copilot": "^1.0.51",
59
+ "@github/copilot": "^1.0.53-2",
60
60
  "vscode-jsonrpc": "^8.2.1",
61
61
  "zod": "^4.3.6"
62
62
  },