dsh-github-copilot 0.4.0-alpha.100 → 0.4.0-alpha.101

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/lib/index.js CHANGED
@@ -2989,7 +2989,7 @@ function createAccountProvider(descriptors, guard, baseURL) {
2989
2989
  var package_default = {
2990
2990
  name: "dsh-github-copilot",
2991
2991
  description: "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
2992
- version: "0.4.0-alpha.100",
2992
+ version: "0.4.0-alpha.101",
2993
2993
  publishConfig: {
2994
2994
  "access": "public",
2995
2995
  "registry": "https://registry.npmjs.org/",
@@ -3372,6 +3372,7 @@ function migrationStatus(ctx) {
3372
3372
  //#endregion
3373
3373
  //#region lib/types/copilot-accounts-types.js
3374
3374
  const COPILOT_ACCOUNT_ID_PATTERN = /^(?:canonical|[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$/u;
3375
+ const GITHUB_ACCOUNT_LOGIN_PATTERN = /^[a-zA-Z0-9](?:[a-zA-Z0-9_-]*[a-zA-Z0-9])?$/u;
3375
3376
  //#endregion
3376
3377
  //#region lib/types/copilot-accounts-host.js
3377
3378
  var __runInitializers$4 = function(thisArg, initializers, value) {
@@ -3723,7 +3724,7 @@ var CopilotAccountsHost = class {
3723
3724
  } catch {
3724
3725
  fail("COPILOT_ACCOUNTS_IDENTITY_INVALID");
3725
3726
  }
3726
- if (!object$4(value) || typeof value.login !== "string" || value.login.length > 39 || !/^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/u.test(value.login) || typeof value.id !== "number" || !Number.isSafeInteger(value.id) || value.id <= 0) fail("COPILOT_ACCOUNTS_IDENTITY_INVALID");
3727
+ if (!object$4(value) || typeof value.login !== "string" || value.login.length > 39 || !GITHUB_ACCOUNT_LOGIN_PATTERN.test(value.login) || typeof value.id !== "number" || !Number.isSafeInteger(value.id) || value.id <= 0) fail("COPILOT_ACCOUNTS_IDENTITY_INVALID");
3727
3728
  return Object.freeze({
3728
3729
  login: value.login,
3729
3730
  userId: value.id
package/lib/remote.js CHANGED
@@ -130,6 +130,7 @@ const COPILOT_USAGE_DIAGNOSTICS = [
130
130
  //#endregion
131
131
  //#region lib/types/copilot-accounts-types.js
132
132
  const COPILOT_ACCOUNT_ID_PATTERN = /^(?:canonical|[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$/u;
133
+ const GITHUB_ACCOUNT_LOGIN_PATTERN = /^[a-zA-Z0-9](?:[a-zA-Z0-9_-]*[a-zA-Z0-9])?$/u;
133
134
  const COPILOT_ACCOUNTS_DIAGNOSTICS = [
134
135
  "COPILOT_ACCOUNTS_SELECTOR_INVALID",
135
136
  "COPILOT_ACCOUNTS_SETTINGS_UNAVAILABLE",
@@ -458,7 +459,7 @@ const CopilotAccountsViewSchema = z.object({
458
459
  "unknown"
459
460
  ]),
460
461
  identity: z.object({
461
- login: z.string().min(1).max(39).regex(/^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/u),
462
+ login: z.string().min(1).max(39).regex(GITHUB_ACCOUNT_LOGIN_PATTERN),
462
463
  userId: z.number().int().positive().max(Number.MAX_SAFE_INTEGER)
463
464
  }).strict().optional()
464
465
  }).strict()).max(32),
@@ -1,5 +1,6 @@
1
1
  export declare const COPILOT_ACCOUNT_ID_PATTERN: RegExp;
2
2
  export declare const COPILOT_ACCOUNTS_MAX = 32;
3
+ export declare const GITHUB_ACCOUNT_LOGIN_PATTERN: RegExp;
3
4
  export declare const COPILOT_ACCOUNTS_DIAGNOSTICS: readonly ["COPILOT_ACCOUNTS_SELECTOR_INVALID", "COPILOT_ACCOUNTS_SETTINGS_UNAVAILABLE", "COPILOT_ACCOUNTS_SELECTED_MISSING", "COPILOT_ACCOUNTS_CREDENTIALS_UNAVAILABLE", "COPILOT_ACCOUNTS_CHANGED", "COPILOT_ACCOUNTS_BUSY", "COPILOT_ACCOUNTS_CONFLICT", "COPILOT_ACCOUNTS_COMMIT_UNCERTAIN", "COPILOT_ACCOUNTS_MODELS_FAILED", "COPILOT_ACCOUNTS_IDENTITY_UNAVAILABLE", "COPILOT_ACCOUNTS_IDENTITY_INVALID", "COPILOT_ACCOUNTS_IDENTITY_CHANGED", "COPILOT_ACCOUNTS_DUPLICATE", "COPILOT_ACCOUNTS_ENTERPRISE_UNSUPPORTED", "COPILOT_ACCOUNTS_ROUTE_BLOCKED", "COPILOT_ACCOUNTS_EVIDENCE_INCOMPLETE", "COPILOT_ACCOUNTS_LIMIT", "COPILOT_ACCOUNTS_AUTH_FAILED", "COPILOT_ACCOUNTS_AUTH_UNAVAILABLE", "COPILOT_ACCOUNTS_ACTIVE_REMOVE_BLOCKED", "COPILOT_ACCOUNTS_REMOVE_FAILED", "COPILOT_ACCOUNTS_DISPOSED"];
4
5
  export type CopilotAccountsDiagnostic = typeof COPILOT_ACCOUNTS_DIAGNOSTICS[number];
5
6
  export interface CopilotAccountIdentity {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-github-copilot",
3
3
  "description": "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
4
- "version": "0.4.0-alpha.100",
4
+ "version": "0.4.0-alpha.101",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "registry": "https://registry.npmjs.org/",