@github/copilot-sdk 1.0.18-preview.1 → 1.0.18-preview.3
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/cjs/cliVersion.js +1 -1
- package/dist/cjs/session.js +5 -5
- package/dist/cliVersion.d.ts +1 -1
- package/dist/cliVersion.js +1 -1
- package/dist/generated/rpc.d.ts +22 -0
- package/dist/generated/session-events.d.ts +32 -0
- package/dist/session.js +5 -5
- package/package.json +12 -12
package/dist/cjs/cliVersion.js
CHANGED
|
@@ -22,7 +22,7 @@ __export(cliVersion_exports, {
|
|
|
22
22
|
COPILOT_CLI_VERSION: () => COPILOT_CLI_VERSION
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(cliVersion_exports);
|
|
25
|
-
const COPILOT_CLI_VERSION = "1.0.94-
|
|
25
|
+
const COPILOT_CLI_VERSION = "1.0.94-3";
|
|
26
26
|
const COPILOT_CLI_USE_NPM_PACKAGE = false;
|
|
27
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
28
28
|
0 && (module.exports = {
|
package/dist/cjs/session.js
CHANGED
|
@@ -82,12 +82,12 @@ function isOpenCanvasInstance(value) {
|
|
|
82
82
|
const instance = value;
|
|
83
83
|
return typeof instance.instanceId === "string" && instance.instanceId.length > 0 && typeof instance.extensionId === "string" && instance.extensionId.length > 0 && typeof instance.canvasId === "string" && instance.canvasId.length > 0;
|
|
84
84
|
}
|
|
85
|
-
const
|
|
86
|
-
const
|
|
85
|
+
const WORKFLOW_LOG_FLUSH_DELAY_MS = 10;
|
|
86
|
+
const MAX_WORKFLOW_FANOUT_ITEMS = 4096;
|
|
87
87
|
function assertWorkflowFanoutSize(kind, size) {
|
|
88
|
-
if (size >
|
|
88
|
+
if (size > MAX_WORKFLOW_FANOUT_ITEMS) {
|
|
89
89
|
throw new Error(
|
|
90
|
-
`${kind}() accepts at most ${
|
|
90
|
+
`${kind}() accepts at most ${MAX_WORKFLOW_FANOUT_ITEMS} items; got ${size}.`
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -208,7 +208,7 @@ class WorkflowProgressBuffer {
|
|
|
208
208
|
this.flushTimer = void 0;
|
|
209
209
|
void this.flush().catch(() => {
|
|
210
210
|
});
|
|
211
|
-
},
|
|
211
|
+
}, WORKFLOW_LOG_FLUSH_DELAY_MS);
|
|
212
212
|
this.flushTimer.unref?.();
|
|
213
213
|
}
|
|
214
214
|
clearFlushTimer() {
|
package/dist/cliVersion.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const COPILOT_CLI_VERSION = "1.0.94-
|
|
1
|
+
export declare const COPILOT_CLI_VERSION = "1.0.94-3";
|
|
2
2
|
export declare const COPILOT_CLI_USE_NPM_PACKAGE = false;
|
package/dist/cliVersion.js
CHANGED
package/dist/generated/rpc.d.ts
CHANGED
|
@@ -29138,6 +29138,23 @@ export interface WorkflowRunRequest {
|
|
|
29138
29138
|
args: JsonValue;
|
|
29139
29139
|
options?: WorkflowRunOptions;
|
|
29140
29140
|
}
|
|
29141
|
+
/**
|
|
29142
|
+
* Complete text used to generate one session diff. These are display contents, with the same text decoding as the patch, not a file-restore contract.
|
|
29143
|
+
*
|
|
29144
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
29145
|
+
* via the `definition` "WorkspaceDiffContents".
|
|
29146
|
+
*/
|
|
29147
|
+
/** @experimental */
|
|
29148
|
+
export interface WorkspaceDiffContents {
|
|
29149
|
+
/**
|
|
29150
|
+
* Complete text before the session first changed the file. Omitted when the file did not exist; an empty string represents an existing empty file.
|
|
29151
|
+
*/
|
|
29152
|
+
before?: string;
|
|
29153
|
+
/**
|
|
29154
|
+
* Complete current text read when computing the diff. Omitted for a deleted file; an empty string represents an existing empty file.
|
|
29155
|
+
*/
|
|
29156
|
+
after?: string;
|
|
29157
|
+
}
|
|
29141
29158
|
/**
|
|
29142
29159
|
* A single changed file and its unified diff.
|
|
29143
29160
|
*
|
|
@@ -29163,6 +29180,7 @@ export interface WorkspaceDiffFileChange {
|
|
|
29163
29180
|
* Whether the diff content was omitted because it exceeded the per-file size limit.
|
|
29164
29181
|
*/
|
|
29165
29182
|
isTruncated?: boolean;
|
|
29183
|
+
contents?: WorkspaceDiffContents;
|
|
29166
29184
|
}
|
|
29167
29185
|
/**
|
|
29168
29186
|
* Workspace diff result for the requested mode.
|
|
@@ -29317,6 +29335,10 @@ export interface WorkspacesDiffRequest {
|
|
|
29317
29335
|
* When true, ignore whitespace-only changes (git `--ignore-all-space`). Defaults to false.
|
|
29318
29336
|
*/
|
|
29319
29337
|
ignoreWhitespace?: boolean;
|
|
29338
|
+
/**
|
|
29339
|
+
* Include the full before/after text used to compute each session diff. Defaults to false; true is accepted only for session mode. Existing capture/read limits still apply, and binary or unavailable contents are not returned. This can substantially increase response size.
|
|
29340
|
+
*/
|
|
29341
|
+
includeContents?: boolean;
|
|
29320
29342
|
}
|
|
29321
29343
|
/**
|
|
29322
29344
|
* Optional session context used when creating a local workspace.
|
|
@@ -8661,6 +8661,12 @@ export interface PermissionRequestWrite {
|
|
|
8661
8661
|
* Unified diff showing the proposed changes
|
|
8662
8662
|
*/
|
|
8663
8663
|
diff: string;
|
|
8664
|
+
/**
|
|
8665
|
+
* Complete before/after text previews captured while planning this request. Omitted when a complete preview is unavailable, including pre-read sandbox requests and non-UTF-8 files. Missing sides mean creation or deletion, not unavailable content.
|
|
8666
|
+
*
|
|
8667
|
+
* @minItems 1
|
|
8668
|
+
*/
|
|
8669
|
+
fileEdits?: [PermissionWriteFileEdit, ...PermissionWriteFileEdit[]];
|
|
8664
8670
|
/**
|
|
8665
8671
|
* Path of the file being written to
|
|
8666
8672
|
*/
|
|
@@ -8706,6 +8712,26 @@ export interface PermissionRequestWrite {
|
|
|
8706
8712
|
*/
|
|
8707
8713
|
toolCallId?: string;
|
|
8708
8714
|
}
|
|
8715
|
+
/**
|
|
8716
|
+
* Complete text snapshots for one proposed file change. At least one side is present. Different before and after paths describe a move.
|
|
8717
|
+
*/
|
|
8718
|
+
export interface PermissionWriteFileEdit {
|
|
8719
|
+
after?: PermissionWriteFileContent;
|
|
8720
|
+
before?: PermissionWriteFileContent;
|
|
8721
|
+
}
|
|
8722
|
+
/**
|
|
8723
|
+
* A named, complete UTF-8 text snapshot for a pending file operation.
|
|
8724
|
+
*/
|
|
8725
|
+
export interface PermissionWriteFileContent {
|
|
8726
|
+
/**
|
|
8727
|
+
* Complete file contents, including an empty string for an empty file.
|
|
8728
|
+
*/
|
|
8729
|
+
content: string;
|
|
8730
|
+
/**
|
|
8731
|
+
* Absolute path in the session filesystem namespace.
|
|
8732
|
+
*/
|
|
8733
|
+
path: string;
|
|
8734
|
+
}
|
|
8709
8735
|
/**
|
|
8710
8736
|
* File or directory read permission request
|
|
8711
8737
|
*/
|
|
@@ -9270,6 +9296,12 @@ export interface PermissionPromptRequestWrite {
|
|
|
9270
9296
|
* Unified diff showing the proposed changes
|
|
9271
9297
|
*/
|
|
9272
9298
|
diff: string;
|
|
9299
|
+
/**
|
|
9300
|
+
* Complete before/after text previews captured while planning this request. Omitted when a complete preview is unavailable, including pre-read sandbox requests and non-UTF-8 files. Missing sides mean creation or deletion, not unavailable content.
|
|
9301
|
+
*
|
|
9302
|
+
* @minItems 1
|
|
9303
|
+
*/
|
|
9304
|
+
fileEdits?: [PermissionWriteFileEdit, ...PermissionWriteFileEdit[]];
|
|
9273
9305
|
/**
|
|
9274
9306
|
* Path of the file being written to
|
|
9275
9307
|
*/
|
package/dist/session.js
CHANGED
|
@@ -64,12 +64,12 @@ function isOpenCanvasInstance(value) {
|
|
|
64
64
|
const instance = value;
|
|
65
65
|
return typeof instance.instanceId === "string" && instance.instanceId.length > 0 && typeof instance.extensionId === "string" && instance.extensionId.length > 0 && typeof instance.canvasId === "string" && instance.canvasId.length > 0;
|
|
66
66
|
}
|
|
67
|
-
const
|
|
68
|
-
const
|
|
67
|
+
const WORKFLOW_LOG_FLUSH_DELAY_MS = 10;
|
|
68
|
+
const MAX_WORKFLOW_FANOUT_ITEMS = 4096;
|
|
69
69
|
function assertWorkflowFanoutSize(kind, size) {
|
|
70
|
-
if (size >
|
|
70
|
+
if (size > MAX_WORKFLOW_FANOUT_ITEMS) {
|
|
71
71
|
throw new Error(
|
|
72
|
-
`${kind}() accepts at most ${
|
|
72
|
+
`${kind}() accepts at most ${MAX_WORKFLOW_FANOUT_ITEMS} items; got ${size}.`
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -190,7 +190,7 @@ class WorkflowProgressBuffer {
|
|
|
190
190
|
this.flushTimer = void 0;
|
|
191
191
|
void this.flush().catch(() => {
|
|
192
192
|
});
|
|
193
|
-
},
|
|
193
|
+
}, WORKFLOW_LOG_FLUSH_DELAY_MS);
|
|
194
194
|
this.flushTimer.unref?.();
|
|
195
195
|
}
|
|
196
196
|
clearFlushTimer() {
|
package/package.json
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"url": "https://github.com/github/copilot-agent-runtime.git",
|
|
6
6
|
"directory": "src/sdk/nodejs"
|
|
7
7
|
},
|
|
8
|
-
"version": "1.0.18-preview.
|
|
9
|
-
"copilotCliVersion": "1.0.94-
|
|
8
|
+
"version": "1.0.18-preview.3",
|
|
9
|
+
"copilotCliVersion": "1.0.94-3",
|
|
10
10
|
"description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
|
|
11
11
|
"main": "./dist/cjs/index.js",
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
@@ -103,18 +103,18 @@
|
|
|
103
103
|
"README.md"
|
|
104
104
|
],
|
|
105
105
|
"copilotRuntime": {
|
|
106
|
-
"sourceSha": "
|
|
107
|
-
"version": "1.0.94-
|
|
106
|
+
"sourceSha": "d8cd60bc89ed3ae60cc37d7877021ac49bd52492",
|
|
107
|
+
"version": "1.0.94-3",
|
|
108
108
|
"visibility": "public"
|
|
109
109
|
},
|
|
110
110
|
"optionalDependencies": {
|
|
111
|
-
"@github/copilot-sdk-darwin-arm64": "1.0.18-preview.
|
|
112
|
-
"@github/copilot-sdk-darwin-x64": "1.0.18-preview.
|
|
113
|
-
"@github/copilot-sdk-linux-arm64": "1.0.18-preview.
|
|
114
|
-
"@github/copilot-sdk-linux-x64": "1.0.18-preview.
|
|
115
|
-
"@github/copilot-sdk-linuxmusl-arm64": "1.0.18-preview.
|
|
116
|
-
"@github/copilot-sdk-linuxmusl-x64": "1.0.18-preview.
|
|
117
|
-
"@github/copilot-sdk-win32-arm64": "1.0.18-preview.
|
|
118
|
-
"@github/copilot-sdk-win32-x64": "1.0.18-preview.
|
|
111
|
+
"@github/copilot-sdk-darwin-arm64": "1.0.18-preview.3",
|
|
112
|
+
"@github/copilot-sdk-darwin-x64": "1.0.18-preview.3",
|
|
113
|
+
"@github/copilot-sdk-linux-arm64": "1.0.18-preview.3",
|
|
114
|
+
"@github/copilot-sdk-linux-x64": "1.0.18-preview.3",
|
|
115
|
+
"@github/copilot-sdk-linuxmusl-arm64": "1.0.18-preview.3",
|
|
116
|
+
"@github/copilot-sdk-linuxmusl-x64": "1.0.18-preview.3",
|
|
117
|
+
"@github/copilot-sdk-win32-arm64": "1.0.18-preview.3",
|
|
118
|
+
"@github/copilot-sdk-win32-x64": "1.0.18-preview.3"
|
|
119
119
|
}
|
|
120
120
|
}
|