@github/copilot-sdk 1.0.17-preview.7 → 1.0.17-preview.9
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/generated/rpc.js +26 -9
- package/dist/cliVersion.d.ts +1 -1
- package/dist/cliVersion.js +1 -1
- package/dist/generated/rpc.d.ts +152 -158
- package/dist/generated/rpc.js +26 -9
- package/dist/generated/session-events.d.ts +4 -2
- package/dist/types.d.ts +7 -0
- 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.93-
|
|
25
|
+
const COPILOT_CLI_VERSION = "1.0.93-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 = {
|
|
@@ -666,21 +666,15 @@ function createServerRpc(connection) {
|
|
|
666
666
|
/** @experimental */
|
|
667
667
|
settings: {
|
|
668
668
|
/**
|
|
669
|
-
*
|
|
670
|
-
*/
|
|
671
|
-
reload: async () => connection.sendRequest("user.settings.reload", {}),
|
|
672
|
-
/**
|
|
673
|
-
* Lists every known user setting (settings.json overlaid with the legacy config.json, config.json wins), each with its effective value, its default, and whether it is at the default — so settings the user has never set still appear with their default value. Does not include repository- or enterprise-managed overrides that the runtime layers on top at session time.
|
|
669
|
+
* Lists every known user setting from settings.json, each with its effective value, its default, and whether it is at the default — so settings the user has never set still appear with their default value. Does not include repository- or enterprise-managed overrides that the runtime layers on top at session time.
|
|
674
670
|
*
|
|
675
|
-
* @returns Per-key metadata for every known user setting
|
|
671
|
+
* @returns Per-key metadata for every known user setting in settings.json, including settings left at their default. Excludes repository- and enterprise-managed overrides.
|
|
676
672
|
*/
|
|
677
673
|
get: async () => connection.sendRequest("user.settings.get", {}),
|
|
678
674
|
/**
|
|
679
|
-
* Writes one or more user settings to settings.json, replacing each provided top-level key. A key whose value is null is removed.
|
|
675
|
+
* Writes one or more user settings to settings.json, replacing each provided top-level key. A key whose value is null is removed.
|
|
680
676
|
*
|
|
681
677
|
* @param params Partial user settings to write to settings.json. Each top-level key is written individually, replacing the existing value; a key whose value is null is removed.
|
|
682
|
-
*
|
|
683
|
-
* @returns Outcome of writing user settings.
|
|
684
678
|
*/
|
|
685
679
|
set: async (params) => connection.sendRequest("user.settings.set", params)
|
|
686
680
|
}
|
|
@@ -1107,6 +1101,29 @@ function createInternalServerRpc(connection) {
|
|
|
1107
1101
|
customAgentInitialModelDecision: async (params) => connection.sendRequest("agents.customAgentInitialModelDecision", params)
|
|
1108
1102
|
},
|
|
1109
1103
|
/** @experimental */
|
|
1104
|
+
globalState: {
|
|
1105
|
+
/**
|
|
1106
|
+
* Reads the host's machine-wide state: which plugins are installed and the one-off flags and timestamps that record what the user has already been shown or migrated. This is the state that outlives a single session and a single workspace, so a host reads it to decide whether to run a first-launch step, offer an onboarding prompt, or skip one it has already completed. The stored credentials are deliberately not part of this result; a caller that needs an authenticated identity asks the account methods for it instead. Reading is non-destructive and every field is optional, because a fresh install has recorded nothing yet.
|
|
1107
|
+
*
|
|
1108
|
+
* @returns The host's machine-wide state. Every field is optional because a fresh install has recorded nothing yet, so a reader must treat an absent field as `not yet`, never as a negative answer. Stored credentials are deliberately absent from this shape.
|
|
1109
|
+
*/
|
|
1110
|
+
load: async () => connection.sendRequest("globalState.load", {}),
|
|
1111
|
+
/**
|
|
1112
|
+
* Reads the host's machine-wide state exactly as `globalState.load` does, but from a caller-supplied configuration directory instead of the one the server resolved for itself. Use this when a consumer scopes a session to its own Copilot home — the SDK's per-session `configDir` override — so the state read matches the directory that session actually uses. An absent or empty `configDir` resolves the server's own home, making this identical to `globalState.load`. The stored credentials are omitted here for the same reason they are omitted from `globalState.load`: a caller that needs an authenticated identity asks the account methods instead, so pointing this at another directory cannot be used to read the credentials kept in it.
|
|
1113
|
+
*
|
|
1114
|
+
* @param params Selects the configuration directory whose machine-wide state to read.
|
|
1115
|
+
*
|
|
1116
|
+
* @returns The host's machine-wide state. Every field is optional because a fresh install has recorded nothing yet, so a reader must treat an absent field as `not yet`, never as a negative answer. Stored credentials are deliberately absent from this shape.
|
|
1117
|
+
*/
|
|
1118
|
+
loadForConfigDir: async (params) => connection.sendRequest("globalState.loadForConfigDir", params),
|
|
1119
|
+
/**
|
|
1120
|
+
* Records one top-level key in the host's machine-wide state, the counterpart to `globalState.load`. A host calls this to remember that it has shown an onboarding step, asked a one-off question, or completed a migration, so the next run can skip it. Only the named key is replaced and the rest of the document is preserved, which lets two writers record different flags without overwriting each other; passing no value removes the key instead. Only the keys a host records itself are writable: `appInstallNudgeResponded`, `appTipShown`, `askedSetupTerminals`, `autoFeedbackLastPromptedAt`, `firstLaunchAt`, `recentModelIds`, `sandboxCredentialProxyCaDeclined` and `sandboxOnboardingShown`. Every other key is refused, including `installedPlugins`, the stored credentials, `trustedFolders`, the staff flags and the signed-in accounts. Plugin enablement must use the plugin APIs, which apply repository and managed-policy checks.
|
|
1121
|
+
*
|
|
1122
|
+
* @param params A single top-level key to record in the host's machine-wide state. The write replaces only that key and leaves the rest of the document untouched, so two writers recording different one-off flags do not overwrite each other. The stored credential keys cannot be written through this method.
|
|
1123
|
+
*/
|
|
1124
|
+
writeKey: async (params) => connection.sendRequest("globalState.writeKey", params)
|
|
1125
|
+
},
|
|
1126
|
+
/** @experimental */
|
|
1110
1127
|
gitHubRepository: {
|
|
1111
1128
|
/**
|
|
1112
1129
|
* Resolves the GitHub repository that owns a working-tree path by reading the selected git remote configured for it, preferring `origin`. Returns a null `repository` when the path is inside a git working tree but that selected remote does not resolve to a GitHub host. Fails when the path is not inside a git working tree at all, so a caller can tell 'not a repository' apart from 'a repository with no GitHub remote'.
|
package/dist/cliVersion.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const COPILOT_CLI_VERSION = "1.0.93-
|
|
1
|
+
export declare const COPILOT_CLI_VERSION = "1.0.93-3";
|
|
2
2
|
export declare const COPILOT_CLI_USE_NPM_PACKAGE = false;
|
package/dist/cliVersion.js
CHANGED
package/dist/generated/rpc.d.ts
CHANGED
|
@@ -471,6 +471,7 @@ export type AuthLoginResultStatus =
|
|
|
471
471
|
/** @experimental */
|
|
472
472
|
export type AuthReadValue = {
|
|
473
473
|
account?: AccountStatus;
|
|
474
|
+
authInfo?: AuthIdentity;
|
|
474
475
|
/**
|
|
475
476
|
* Account read-datum variant discriminator.
|
|
476
477
|
*/
|
|
@@ -1989,6 +1990,14 @@ export type GitHubTokenAcquireResult = {
|
|
|
1989
1990
|
*/
|
|
1990
1991
|
kind: "cancelled";
|
|
1991
1992
|
};
|
|
1993
|
+
/**
|
|
1994
|
+
* Source for direct repo installs (when marketplace is empty)
|
|
1995
|
+
*
|
|
1996
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1997
|
+
* via the `definition` "InstalledPluginSource".
|
|
1998
|
+
*/
|
|
1999
|
+
/** @experimental */
|
|
2000
|
+
export type InstalledPluginSource = string | InstalledPluginSourceGitHub | InstalledPluginSourceUrl | InstalledPluginSourceLocal;
|
|
1992
2001
|
/**
|
|
1993
2002
|
* Optional compaction parameters.
|
|
1994
2003
|
*
|
|
@@ -2456,14 +2465,6 @@ export type InstallationDecision =
|
|
|
2456
2465
|
| "decline"
|
|
2457
2466
|
/** The user cancelled the pending decision without granting consent. */
|
|
2458
2467
|
| "cancel";
|
|
2459
|
-
/**
|
|
2460
|
-
* Source for direct repo installs (when marketplace is empty)
|
|
2461
|
-
*
|
|
2462
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2463
|
-
* via the `definition` "InstalledPluginSource".
|
|
2464
|
-
*/
|
|
2465
|
-
/** @experimental */
|
|
2466
|
-
export type InstalledPluginSource = string | InstalledPluginSourceGitHub | InstalledPluginSourceUrl | InstalledPluginSourceLocal;
|
|
2467
2468
|
/**
|
|
2468
2469
|
* Which tier this target belongs to
|
|
2469
2470
|
*
|
|
@@ -3400,15 +3401,15 @@ export type SessionContextAttribution = {
|
|
|
3400
3401
|
*/
|
|
3401
3402
|
modelSource: string;
|
|
3402
3403
|
/**
|
|
3403
|
-
*
|
|
3404
|
+
* Effective input budget after reserving requested output against the combined context ceiling. Mirrors `SessionContextInfo.promptTokenLimit`.
|
|
3404
3405
|
*/
|
|
3405
3406
|
promptTokenLimit: number;
|
|
3406
3407
|
/**
|
|
3407
|
-
*
|
|
3408
|
+
* Advertised prompt allowance for the selected context tier: the denominator for context-usage displays and capacity for `categories.freeSpace` and `categories.buffer`. Mirrors `SessionContextInfo.limit`.
|
|
3408
3409
|
*/
|
|
3409
3410
|
limit: number;
|
|
3410
3411
|
/**
|
|
3411
|
-
* Output
|
|
3412
|
+
* Output reservation overlapping the displayed prompt allowance plus the tokens past the effective input budget's buffer-exhaustion blocking threshold. Mirrors `SessionContextInfo.bufferTokens`.
|
|
3412
3413
|
*/
|
|
3413
3414
|
bufferTokens: number;
|
|
3414
3415
|
/**
|
|
@@ -3444,7 +3445,7 @@ export type SessionContextAttribution = {
|
|
|
3444
3445
|
*/
|
|
3445
3446
|
freeSpace: number;
|
|
3446
3447
|
/**
|
|
3447
|
-
*
|
|
3448
|
+
* Overlapping output reservation plus post-blocking-threshold buffer.
|
|
3448
3449
|
*/
|
|
3449
3450
|
buffer: number;
|
|
3450
3451
|
};
|
|
@@ -3522,7 +3523,7 @@ export type SessionContextInfo = {
|
|
|
3522
3523
|
*/
|
|
3523
3524
|
totalTokens: number;
|
|
3524
3525
|
/**
|
|
3525
|
-
*
|
|
3526
|
+
* Effective input budget: the selected tier's prompt allowance bounded by the combined context ceiling minus the requested output allowance. Uses DEFAULT_TOKEN_LIMIT when limits are unspecified.
|
|
3526
3527
|
*/
|
|
3527
3528
|
promptTokenLimit: number;
|
|
3528
3529
|
/**
|
|
@@ -3530,11 +3531,11 @@ export type SessionContextInfo = {
|
|
|
3530
3531
|
*/
|
|
3531
3532
|
compactionThreshold: number;
|
|
3532
3533
|
/**
|
|
3533
|
-
*
|
|
3534
|
+
* Advertised prompt allowance for the selected context tier, without adding output tokens. The denominator for context-usage displays.
|
|
3534
3535
|
*/
|
|
3535
3536
|
limit: number;
|
|
3536
3537
|
/**
|
|
3537
|
-
* Output
|
|
3538
|
+
* Output reservation overlapping the displayed prompt allowance plus tokens after the effective input budget's buffer-exhaustion blocking threshold (default 95%).
|
|
3538
3539
|
*/
|
|
3539
3540
|
bufferTokens: number;
|
|
3540
3541
|
} | null;
|
|
@@ -11445,6 +11446,123 @@ export interface GitHubTokenAcquireRequest {
|
|
|
11445
11446
|
sessionId?: string;
|
|
11446
11447
|
reason: GitHubTokenAcquireReason;
|
|
11447
11448
|
}
|
|
11449
|
+
/**
|
|
11450
|
+
* Installed plugin record from global state, with marketplace, version, install time, enabled state, cache path, and source.
|
|
11451
|
+
*
|
|
11452
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
11453
|
+
* via the `definition` "InstalledPlugin".
|
|
11454
|
+
*/
|
|
11455
|
+
/** @experimental */
|
|
11456
|
+
export interface InstalledPlugin {
|
|
11457
|
+
/**
|
|
11458
|
+
* Plugin name
|
|
11459
|
+
*/
|
|
11460
|
+
name: string;
|
|
11461
|
+
/**
|
|
11462
|
+
* Marketplace the plugin came from (empty string for direct repo installs)
|
|
11463
|
+
*/
|
|
11464
|
+
marketplace: string;
|
|
11465
|
+
/**
|
|
11466
|
+
* Version installed (if available)
|
|
11467
|
+
*/
|
|
11468
|
+
version?: string;
|
|
11469
|
+
/**
|
|
11470
|
+
* Installation timestamp
|
|
11471
|
+
*/
|
|
11472
|
+
installed_at: string;
|
|
11473
|
+
/**
|
|
11474
|
+
* Whether the plugin is currently enabled
|
|
11475
|
+
*/
|
|
11476
|
+
enabled: boolean;
|
|
11477
|
+
/**
|
|
11478
|
+
* Path where the plugin is cached locally
|
|
11479
|
+
*/
|
|
11480
|
+
cache_path?: string;
|
|
11481
|
+
source?: InstalledPluginSource;
|
|
11482
|
+
/**
|
|
11483
|
+
* Per-plugin source fingerprint (a SHA-256 hash of the plugin's catalog source spec plus its resolved source subtree — NOT a Git commit SHA) captured at marketplace install/update time. Auto-update compares it against the freshly recomputed fingerprint to detect a content change that does not bump the version. Absent for pre-existing installs and for direct (non-marketplace) installs.
|
|
11484
|
+
*/
|
|
11485
|
+
source_sha?: string;
|
|
11486
|
+
/**
|
|
11487
|
+
* Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key.
|
|
11488
|
+
*/
|
|
11489
|
+
installed_from?: string;
|
|
11490
|
+
}
|
|
11491
|
+
/**
|
|
11492
|
+
* Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or full commit SHA, and optional subpath.
|
|
11493
|
+
*
|
|
11494
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
11495
|
+
* via the `definition` "InstalledPluginSourceGitHub".
|
|
11496
|
+
*/
|
|
11497
|
+
/** @experimental */
|
|
11498
|
+
export interface InstalledPluginSourceGitHub {
|
|
11499
|
+
/**
|
|
11500
|
+
* Constant value. Always "github".
|
|
11501
|
+
*/
|
|
11502
|
+
source: "github";
|
|
11503
|
+
/**
|
|
11504
|
+
* GitHub repository in `owner/repo` form.
|
|
11505
|
+
*/
|
|
11506
|
+
repo: string;
|
|
11507
|
+
/**
|
|
11508
|
+
* Optional Git ref to resolve.
|
|
11509
|
+
*/
|
|
11510
|
+
ref?: string;
|
|
11511
|
+
/**
|
|
11512
|
+
* Optional full 40-character hexadecimal commit SHA.
|
|
11513
|
+
*/
|
|
11514
|
+
sha?: string;
|
|
11515
|
+
/**
|
|
11516
|
+
* Optional repository-relative path to the plugin.
|
|
11517
|
+
*/
|
|
11518
|
+
path?: string;
|
|
11519
|
+
}
|
|
11520
|
+
/**
|
|
11521
|
+
* Source descriptor for a direct URL plugin install, with URL, optional ref or full commit SHA, and optional subpath.
|
|
11522
|
+
*
|
|
11523
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
11524
|
+
* via the `definition` "InstalledPluginSourceUrl".
|
|
11525
|
+
*/
|
|
11526
|
+
/** @experimental */
|
|
11527
|
+
export interface InstalledPluginSourceUrl {
|
|
11528
|
+
/**
|
|
11529
|
+
* Constant value. Always "url".
|
|
11530
|
+
*/
|
|
11531
|
+
source: "url";
|
|
11532
|
+
/**
|
|
11533
|
+
* URL of the plugin source.
|
|
11534
|
+
*/
|
|
11535
|
+
url: string;
|
|
11536
|
+
/**
|
|
11537
|
+
* Optional Git ref to resolve.
|
|
11538
|
+
*/
|
|
11539
|
+
ref?: string;
|
|
11540
|
+
/**
|
|
11541
|
+
* Optional full 40-character hexadecimal commit SHA.
|
|
11542
|
+
*/
|
|
11543
|
+
sha?: string;
|
|
11544
|
+
/**
|
|
11545
|
+
* Optional source-relative path to the plugin.
|
|
11546
|
+
*/
|
|
11547
|
+
path?: string;
|
|
11548
|
+
}
|
|
11549
|
+
/**
|
|
11550
|
+
* Source descriptor for a direct local plugin install, with a local filesystem path.
|
|
11551
|
+
*
|
|
11552
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
11553
|
+
* via the `definition` "InstalledPluginSourceLocal".
|
|
11554
|
+
*/
|
|
11555
|
+
/** @experimental */
|
|
11556
|
+
export interface InstalledPluginSourceLocal {
|
|
11557
|
+
/**
|
|
11558
|
+
* Constant value. Always "local".
|
|
11559
|
+
*/
|
|
11560
|
+
source: "local";
|
|
11561
|
+
/**
|
|
11562
|
+
* Local filesystem path to the plugin.
|
|
11563
|
+
*/
|
|
11564
|
+
path: string;
|
|
11565
|
+
}
|
|
11448
11566
|
/**
|
|
11449
11567
|
* Pending external tool call request ID, with the tool result or an error describing why it failed.
|
|
11450
11568
|
*
|
|
@@ -12743,123 +12861,6 @@ export interface InstallationConfirmationResponse {
|
|
|
12743
12861
|
reviewFingerprint: string;
|
|
12744
12862
|
decision: InstallationDecision;
|
|
12745
12863
|
}
|
|
12746
|
-
/**
|
|
12747
|
-
* Installed plugin record from global state, with marketplace, version, install time, enabled state, cache path, and source.
|
|
12748
|
-
*
|
|
12749
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
12750
|
-
* via the `definition` "InstalledPlugin".
|
|
12751
|
-
*/
|
|
12752
|
-
/** @experimental */
|
|
12753
|
-
export interface InstalledPlugin {
|
|
12754
|
-
/**
|
|
12755
|
-
* Plugin name
|
|
12756
|
-
*/
|
|
12757
|
-
name: string;
|
|
12758
|
-
/**
|
|
12759
|
-
* Marketplace the plugin came from (empty string for direct repo installs)
|
|
12760
|
-
*/
|
|
12761
|
-
marketplace: string;
|
|
12762
|
-
/**
|
|
12763
|
-
* Version installed (if available)
|
|
12764
|
-
*/
|
|
12765
|
-
version?: string;
|
|
12766
|
-
/**
|
|
12767
|
-
* Installation timestamp
|
|
12768
|
-
*/
|
|
12769
|
-
installed_at: string;
|
|
12770
|
-
/**
|
|
12771
|
-
* Whether the plugin is currently enabled
|
|
12772
|
-
*/
|
|
12773
|
-
enabled: boolean;
|
|
12774
|
-
/**
|
|
12775
|
-
* Path where the plugin is cached locally
|
|
12776
|
-
*/
|
|
12777
|
-
cache_path?: string;
|
|
12778
|
-
source?: InstalledPluginSource;
|
|
12779
|
-
/**
|
|
12780
|
-
* Per-plugin source fingerprint (a SHA-256 hash of the plugin's catalog source spec plus its resolved source subtree — NOT a Git commit SHA) captured at marketplace install/update time. Auto-update compares it against the freshly recomputed fingerprint to detect a content change that does not bump the version. Absent for pre-existing installs and for direct (non-marketplace) installs.
|
|
12781
|
-
*/
|
|
12782
|
-
source_sha?: string;
|
|
12783
|
-
/**
|
|
12784
|
-
* Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key.
|
|
12785
|
-
*/
|
|
12786
|
-
installed_from?: string;
|
|
12787
|
-
}
|
|
12788
|
-
/**
|
|
12789
|
-
* Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or full commit SHA, and optional subpath.
|
|
12790
|
-
*
|
|
12791
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
12792
|
-
* via the `definition` "InstalledPluginSourceGitHub".
|
|
12793
|
-
*/
|
|
12794
|
-
/** @experimental */
|
|
12795
|
-
export interface InstalledPluginSourceGitHub {
|
|
12796
|
-
/**
|
|
12797
|
-
* Constant value. Always "github".
|
|
12798
|
-
*/
|
|
12799
|
-
source: "github";
|
|
12800
|
-
/**
|
|
12801
|
-
* GitHub repository in `owner/repo` form.
|
|
12802
|
-
*/
|
|
12803
|
-
repo: string;
|
|
12804
|
-
/**
|
|
12805
|
-
* Optional Git ref to resolve.
|
|
12806
|
-
*/
|
|
12807
|
-
ref?: string;
|
|
12808
|
-
/**
|
|
12809
|
-
* Optional full 40-character hexadecimal commit SHA.
|
|
12810
|
-
*/
|
|
12811
|
-
sha?: string;
|
|
12812
|
-
/**
|
|
12813
|
-
* Optional repository-relative path to the plugin.
|
|
12814
|
-
*/
|
|
12815
|
-
path?: string;
|
|
12816
|
-
}
|
|
12817
|
-
/**
|
|
12818
|
-
* Source descriptor for a direct URL plugin install, with URL, optional ref or full commit SHA, and optional subpath.
|
|
12819
|
-
*
|
|
12820
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
12821
|
-
* via the `definition` "InstalledPluginSourceUrl".
|
|
12822
|
-
*/
|
|
12823
|
-
/** @experimental */
|
|
12824
|
-
export interface InstalledPluginSourceUrl {
|
|
12825
|
-
/**
|
|
12826
|
-
* Constant value. Always "url".
|
|
12827
|
-
*/
|
|
12828
|
-
source: "url";
|
|
12829
|
-
/**
|
|
12830
|
-
* URL of the plugin source.
|
|
12831
|
-
*/
|
|
12832
|
-
url: string;
|
|
12833
|
-
/**
|
|
12834
|
-
* Optional Git ref to resolve.
|
|
12835
|
-
*/
|
|
12836
|
-
ref?: string;
|
|
12837
|
-
/**
|
|
12838
|
-
* Optional full 40-character hexadecimal commit SHA.
|
|
12839
|
-
*/
|
|
12840
|
-
sha?: string;
|
|
12841
|
-
/**
|
|
12842
|
-
* Optional source-relative path to the plugin.
|
|
12843
|
-
*/
|
|
12844
|
-
path?: string;
|
|
12845
|
-
}
|
|
12846
|
-
/**
|
|
12847
|
-
* Source descriptor for a direct local plugin install, with a local filesystem path.
|
|
12848
|
-
*
|
|
12849
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
12850
|
-
* via the `definition` "InstalledPluginSourceLocal".
|
|
12851
|
-
*/
|
|
12852
|
-
/** @experimental */
|
|
12853
|
-
export interface InstalledPluginSourceLocal {
|
|
12854
|
-
/**
|
|
12855
|
-
* Constant value. Always "local".
|
|
12856
|
-
*/
|
|
12857
|
-
source: "local";
|
|
12858
|
-
/**
|
|
12859
|
-
* Local filesystem path to the plugin.
|
|
12860
|
-
*/
|
|
12861
|
-
path: string;
|
|
12862
|
-
}
|
|
12863
12864
|
/**
|
|
12864
12865
|
* Information about an installed plugin tracked in global state.
|
|
12865
12866
|
*
|
|
@@ -16031,6 +16032,10 @@ export interface McpServer {
|
|
|
16031
16032
|
name: string;
|
|
16032
16033
|
status: McpServerStatus;
|
|
16033
16034
|
source?: McpServerSource;
|
|
16035
|
+
/**
|
|
16036
|
+
* Configured URL for an HTTP/SSE server, regardless of configuration source. Omitted for local and in-memory servers.
|
|
16037
|
+
*/
|
|
16038
|
+
url?: string;
|
|
16034
16039
|
/**
|
|
16035
16040
|
* Plugin name that provided this server, when source is plugin.
|
|
16036
16041
|
*/
|
|
@@ -16231,11 +16236,11 @@ export interface MetadataContextHeaviestMessagesResult {
|
|
|
16231
16236
|
/** @experimental */
|
|
16232
16237
|
export interface MetadataContextInfoRequest {
|
|
16233
16238
|
/**
|
|
16234
|
-
*
|
|
16239
|
+
* Advertised prompt allowance. Pass 0 to resolve the selected model and context tier from the session.
|
|
16235
16240
|
*/
|
|
16236
16241
|
promptTokenLimit: number;
|
|
16237
16242
|
/**
|
|
16238
|
-
*
|
|
16243
|
+
* Requested output allowance to reserve against the combined context ceiling. Pass 0 to resolve the session's request cap, falling back to the model's advertised output limit.
|
|
16239
16244
|
*/
|
|
16240
16245
|
outputTokenLimit: number;
|
|
16241
16246
|
/**
|
|
@@ -16474,6 +16479,10 @@ export interface Model {
|
|
|
16474
16479
|
metadata?: {
|
|
16475
16480
|
[k: string]: JsonValue | undefined;
|
|
16476
16481
|
};
|
|
16482
|
+
/**
|
|
16483
|
+
* Model vendor as the Copilot API reports it, for example "Anthropic" or "Azure OpenAI". Open vocabulary, passed through unchanged. It can name the vendor that serves the model instead of the one that built it, or a label that is not a vendor, such as "Experimental". Absent when the Copilot API reports no vendor.
|
|
16484
|
+
*/
|
|
16485
|
+
vendor?: string;
|
|
16477
16486
|
policy?: ModelPolicy;
|
|
16478
16487
|
billing?: ModelBilling;
|
|
16479
16488
|
/**
|
|
@@ -23177,6 +23186,10 @@ export interface SessionManagedPermissions {
|
|
|
23177
23186
|
* Permission rules that allow matching operations unless another managed source, deny, or ask rule restricts them.
|
|
23178
23187
|
*/
|
|
23179
23188
|
allow?: string[];
|
|
23189
|
+
/**
|
|
23190
|
+
* Closed-world host boundary expressed as `Domain(hostname)`, `Domain(IP)`, or `Domain(*.example.com)` rules. Schemes, ports, paths, queries, and fragments are rejected because every network request must be enforceable at host-level egress. Multiple managed sources intersect their lists; an empty list denies all hosts.
|
|
23191
|
+
*/
|
|
23192
|
+
limitTo?: string[];
|
|
23180
23193
|
}
|
|
23181
23194
|
/**
|
|
23182
23195
|
* Managed settings an SDK host may inject at session startup. Only permissions are accepted in this initial contract.
|
|
@@ -27997,7 +28010,7 @@ export interface UserSettingMetadata {
|
|
|
27997
28010
|
isDefault: boolean;
|
|
27998
28011
|
}
|
|
27999
28012
|
/**
|
|
28000
|
-
* Per-key metadata for every known user setting
|
|
28013
|
+
* Per-key metadata for every known user setting in settings.json, including settings left at their default. Excludes repository- and enterprise-managed overrides.
|
|
28001
28014
|
*
|
|
28002
28015
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
28003
28016
|
* via the `definition` "UserSettingsGetResult".
|
|
@@ -28024,19 +28037,6 @@ export interface UserSettingsSetRequest {
|
|
|
28024
28037
|
*/
|
|
28025
28038
|
settings: JsonValue;
|
|
28026
28039
|
}
|
|
28027
|
-
/**
|
|
28028
|
-
* Outcome of writing user settings.
|
|
28029
|
-
*
|
|
28030
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
28031
|
-
* via the `definition` "UserSettingsSetResult".
|
|
28032
|
-
*/
|
|
28033
|
-
/** @experimental */
|
|
28034
|
-
export interface UserSettingsSetResult {
|
|
28035
|
-
/**
|
|
28036
|
-
* Top-level keys whose write landed in settings.json but is shadowed by a value still present in the legacy config.json (config.json wins on read). The write does not take effect until the legacy value is removed.
|
|
28037
|
-
*/
|
|
28038
|
-
shadowedKeys: string[];
|
|
28039
|
-
}
|
|
28040
28040
|
/**
|
|
28041
28041
|
* Current sharing status and shareable GitHub URL for a session.
|
|
28042
28042
|
*
|
|
@@ -30713,23 +30713,17 @@ export declare function createServerRpc(connection: MessageConnection): {
|
|
|
30713
30713
|
/** @experimental */
|
|
30714
30714
|
settings: {
|
|
30715
30715
|
/**
|
|
30716
|
-
*
|
|
30717
|
-
*/
|
|
30718
|
-
reload: () => Promise<void>;
|
|
30719
|
-
/**
|
|
30720
|
-
* Lists every known user setting (settings.json overlaid with the legacy config.json, config.json wins), each with its effective value, its default, and whether it is at the default — so settings the user has never set still appear with their default value. Does not include repository- or enterprise-managed overrides that the runtime layers on top at session time.
|
|
30716
|
+
* Lists every known user setting from settings.json, each with its effective value, its default, and whether it is at the default — so settings the user has never set still appear with their default value. Does not include repository- or enterprise-managed overrides that the runtime layers on top at session time.
|
|
30721
30717
|
*
|
|
30722
|
-
* @returns Per-key metadata for every known user setting
|
|
30718
|
+
* @returns Per-key metadata for every known user setting in settings.json, including settings left at their default. Excludes repository- and enterprise-managed overrides.
|
|
30723
30719
|
*/
|
|
30724
30720
|
get: () => Promise<UserSettingsGetResult>;
|
|
30725
30721
|
/**
|
|
30726
|
-
* Writes one or more user settings to settings.json, replacing each provided top-level key. A key whose value is null is removed.
|
|
30722
|
+
* Writes one or more user settings to settings.json, replacing each provided top-level key. A key whose value is null is removed.
|
|
30727
30723
|
*
|
|
30728
30724
|
* @param params Partial user settings to write to settings.json. Each top-level key is written individually, replacing the existing value; a key whose value is null is removed.
|
|
30729
|
-
*
|
|
30730
|
-
* @returns Outcome of writing user settings.
|
|
30731
30725
|
*/
|
|
30732
|
-
set: (params: UserSettingsSetRequest) => Promise<
|
|
30726
|
+
set: (params: UserSettingsSetRequest) => Promise<void>;
|
|
30733
30727
|
};
|
|
30734
30728
|
};
|
|
30735
30729
|
/** @experimental */
|
package/dist/generated/rpc.js
CHANGED
|
@@ -638,21 +638,15 @@ function createServerRpc(connection) {
|
|
|
638
638
|
/** @experimental */
|
|
639
639
|
settings: {
|
|
640
640
|
/**
|
|
641
|
-
*
|
|
642
|
-
*/
|
|
643
|
-
reload: async () => connection.sendRequest("user.settings.reload", {}),
|
|
644
|
-
/**
|
|
645
|
-
* Lists every known user setting (settings.json overlaid with the legacy config.json, config.json wins), each with its effective value, its default, and whether it is at the default — so settings the user has never set still appear with their default value. Does not include repository- or enterprise-managed overrides that the runtime layers on top at session time.
|
|
641
|
+
* Lists every known user setting from settings.json, each with its effective value, its default, and whether it is at the default — so settings the user has never set still appear with their default value. Does not include repository- or enterprise-managed overrides that the runtime layers on top at session time.
|
|
646
642
|
*
|
|
647
|
-
* @returns Per-key metadata for every known user setting
|
|
643
|
+
* @returns Per-key metadata for every known user setting in settings.json, including settings left at their default. Excludes repository- and enterprise-managed overrides.
|
|
648
644
|
*/
|
|
649
645
|
get: async () => connection.sendRequest("user.settings.get", {}),
|
|
650
646
|
/**
|
|
651
|
-
* Writes one or more user settings to settings.json, replacing each provided top-level key. A key whose value is null is removed.
|
|
647
|
+
* Writes one or more user settings to settings.json, replacing each provided top-level key. A key whose value is null is removed.
|
|
652
648
|
*
|
|
653
649
|
* @param params Partial user settings to write to settings.json. Each top-level key is written individually, replacing the existing value; a key whose value is null is removed.
|
|
654
|
-
*
|
|
655
|
-
* @returns Outcome of writing user settings.
|
|
656
650
|
*/
|
|
657
651
|
set: async (params) => connection.sendRequest("user.settings.set", params)
|
|
658
652
|
}
|
|
@@ -1079,6 +1073,29 @@ function createInternalServerRpc(connection) {
|
|
|
1079
1073
|
customAgentInitialModelDecision: async (params) => connection.sendRequest("agents.customAgentInitialModelDecision", params)
|
|
1080
1074
|
},
|
|
1081
1075
|
/** @experimental */
|
|
1076
|
+
globalState: {
|
|
1077
|
+
/**
|
|
1078
|
+
* Reads the host's machine-wide state: which plugins are installed and the one-off flags and timestamps that record what the user has already been shown or migrated. This is the state that outlives a single session and a single workspace, so a host reads it to decide whether to run a first-launch step, offer an onboarding prompt, or skip one it has already completed. The stored credentials are deliberately not part of this result; a caller that needs an authenticated identity asks the account methods for it instead. Reading is non-destructive and every field is optional, because a fresh install has recorded nothing yet.
|
|
1079
|
+
*
|
|
1080
|
+
* @returns The host's machine-wide state. Every field is optional because a fresh install has recorded nothing yet, so a reader must treat an absent field as `not yet`, never as a negative answer. Stored credentials are deliberately absent from this shape.
|
|
1081
|
+
*/
|
|
1082
|
+
load: async () => connection.sendRequest("globalState.load", {}),
|
|
1083
|
+
/**
|
|
1084
|
+
* Reads the host's machine-wide state exactly as `globalState.load` does, but from a caller-supplied configuration directory instead of the one the server resolved for itself. Use this when a consumer scopes a session to its own Copilot home — the SDK's per-session `configDir` override — so the state read matches the directory that session actually uses. An absent or empty `configDir` resolves the server's own home, making this identical to `globalState.load`. The stored credentials are omitted here for the same reason they are omitted from `globalState.load`: a caller that needs an authenticated identity asks the account methods instead, so pointing this at another directory cannot be used to read the credentials kept in it.
|
|
1085
|
+
*
|
|
1086
|
+
* @param params Selects the configuration directory whose machine-wide state to read.
|
|
1087
|
+
*
|
|
1088
|
+
* @returns The host's machine-wide state. Every field is optional because a fresh install has recorded nothing yet, so a reader must treat an absent field as `not yet`, never as a negative answer. Stored credentials are deliberately absent from this shape.
|
|
1089
|
+
*/
|
|
1090
|
+
loadForConfigDir: async (params) => connection.sendRequest("globalState.loadForConfigDir", params),
|
|
1091
|
+
/**
|
|
1092
|
+
* Records one top-level key in the host's machine-wide state, the counterpart to `globalState.load`. A host calls this to remember that it has shown an onboarding step, asked a one-off question, or completed a migration, so the next run can skip it. Only the named key is replaced and the rest of the document is preserved, which lets two writers record different flags without overwriting each other; passing no value removes the key instead. Only the keys a host records itself are writable: `appInstallNudgeResponded`, `appTipShown`, `askedSetupTerminals`, `autoFeedbackLastPromptedAt`, `firstLaunchAt`, `recentModelIds`, `sandboxCredentialProxyCaDeclined` and `sandboxOnboardingShown`. Every other key is refused, including `installedPlugins`, the stored credentials, `trustedFolders`, the staff flags and the signed-in accounts. Plugin enablement must use the plugin APIs, which apply repository and managed-policy checks.
|
|
1093
|
+
*
|
|
1094
|
+
* @param params A single top-level key to record in the host's machine-wide state. The write replaces only that key and leaves the rest of the document untouched, so two writers recording different one-off flags do not overwrite each other. The stored credential keys cannot be written through this method.
|
|
1095
|
+
*/
|
|
1096
|
+
writeKey: async (params) => connection.sendRequest("globalState.writeKey", params)
|
|
1097
|
+
},
|
|
1098
|
+
/** @experimental */
|
|
1082
1099
|
gitHubRepository: {
|
|
1083
1100
|
/**
|
|
1084
1101
|
* Resolves the GitHub repository that owns a working-tree path by reading the selected git remote configured for it, preferring `origin`. Returns a null `repository` when the path is inside a git working tree but that selected remote does not resolve to a GitHub host. Fails when the path is not inside a git working tree at all, so a caller can tell 'not a repository' apart from 'a repository with no GitHub remote'.
|
|
@@ -740,7 +740,7 @@ export type AbortReason =
|
|
|
740
740
|
/** Autopilot stopped the run because the active objective reached its user-set --max-ai-credits limit. */
|
|
741
741
|
| "autopilot_credit_limit";
|
|
742
742
|
/**
|
|
743
|
-
* Configuration source: user, workspace, plugin, builtin, or
|
|
743
|
+
* Configuration source: user, workspace, plugin, builtin, managed, or account
|
|
744
744
|
*/
|
|
745
745
|
export type McpServerSource =
|
|
746
746
|
/** Server configured in the user's global MCP configuration. */
|
|
@@ -752,7 +752,9 @@ export type McpServerSource =
|
|
|
752
752
|
/** Server bundled with the runtime. */
|
|
753
753
|
| "builtin"
|
|
754
754
|
/** Server supplied by a trusted host-managed catalog. */
|
|
755
|
-
| "managed"
|
|
755
|
+
| "managed"
|
|
756
|
+
/** Server contributed by a signed-in account; enablement and organization policy still apply. */
|
|
757
|
+
| "account";
|
|
756
758
|
/**
|
|
757
759
|
* Transport mechanism: stdio, http, sse (deprecated), or memory (in-process MCP server)
|
|
758
760
|
*/
|
package/dist/types.d.ts
CHANGED
|
@@ -1882,6 +1882,13 @@ export interface ManagedSettingsPermissions {
|
|
|
1882
1882
|
* (across managed layers) must admit an operation for it to be allowed.
|
|
1883
1883
|
*/
|
|
1884
1884
|
allow?: string[];
|
|
1885
|
+
/**
|
|
1886
|
+
* Closed-world host boundary expressed as `Domain(hostname)`, `Domain(IP)`,
|
|
1887
|
+
* or `Domain(*.example.com)` rules. Schemes, ports, paths, queries, and
|
|
1888
|
+
* fragments are rejected. Multiple managed layers intersect their lists;
|
|
1889
|
+
* an empty list denies all hosts.
|
|
1890
|
+
*/
|
|
1891
|
+
limitTo?: string[];
|
|
1885
1892
|
}
|
|
1886
1893
|
/**
|
|
1887
1894
|
* Host-injected enterprise managed settings. The first supported contract is
|
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.17-preview.
|
|
9
|
-
"copilotCliVersion": "1.0.93-
|
|
8
|
+
"version": "1.0.17-preview.9",
|
|
9
|
+
"copilotCliVersion": "1.0.93-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.93-
|
|
106
|
+
"sourceSha": "f66028ab790e3fb4189bfca9b28d93919132b4cc",
|
|
107
|
+
"version": "1.0.93-3",
|
|
108
108
|
"visibility": "public"
|
|
109
109
|
},
|
|
110
110
|
"optionalDependencies": {
|
|
111
|
-
"@github/copilot-sdk-darwin-arm64": "1.0.17-preview.
|
|
112
|
-
"@github/copilot-sdk-darwin-x64": "1.0.17-preview.
|
|
113
|
-
"@github/copilot-sdk-linux-arm64": "1.0.17-preview.
|
|
114
|
-
"@github/copilot-sdk-linux-x64": "1.0.17-preview.
|
|
115
|
-
"@github/copilot-sdk-linuxmusl-arm64": "1.0.17-preview.
|
|
116
|
-
"@github/copilot-sdk-linuxmusl-x64": "1.0.17-preview.
|
|
117
|
-
"@github/copilot-sdk-win32-arm64": "1.0.17-preview.
|
|
118
|
-
"@github/copilot-sdk-win32-x64": "1.0.17-preview.
|
|
111
|
+
"@github/copilot-sdk-darwin-arm64": "1.0.17-preview.9",
|
|
112
|
+
"@github/copilot-sdk-darwin-x64": "1.0.17-preview.9",
|
|
113
|
+
"@github/copilot-sdk-linux-arm64": "1.0.17-preview.9",
|
|
114
|
+
"@github/copilot-sdk-linux-x64": "1.0.17-preview.9",
|
|
115
|
+
"@github/copilot-sdk-linuxmusl-arm64": "1.0.17-preview.9",
|
|
116
|
+
"@github/copilot-sdk-linuxmusl-x64": "1.0.17-preview.9",
|
|
117
|
+
"@github/copilot-sdk-win32-arm64": "1.0.17-preview.9",
|
|
118
|
+
"@github/copilot-sdk-win32-x64": "1.0.17-preview.9"
|
|
119
119
|
}
|
|
120
120
|
}
|