惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
D
Docker
J
Java Code Geeks
腾讯CDC
Blog — PlanetScale
Blog — PlanetScale
G
Google Developers Blog
M
MIT News - Artificial intelligence
L
LangChain Blog
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
博客园 - Franky
GbyAI
GbyAI
Hugging Face - Blog
Hugging Face - Blog
aimingoo的专栏
aimingoo的专栏
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
N
Netflix TechBlog - Medium
B
Blog RSS Feed
Y
Y Combinator Blog
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
refactor(copilot): drop unused exported helpers · opencla...
vincentkoc · 2026-06-19 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -5,7 +5,6 @@ import { afterEach, beforeEach, describe, expect, it } from "vitest";

55

import {

66

COPILOT_DEFAULT_AGENT_ID,

77

COPILOT_TOKEN_PROFILE_ERROR,

8-

normalizeCopilotHomePath,

98

resolveCopilotAuth,

109

sanitizeAgentId,

1110

tokenFingerprint,

@@ -508,18 +507,3 @@ describe("resolveCopilotAuth - defaults wiring", () => {

508507

);

509508

});

510509

});

511-
512-

describe("normalizeCopilotHomePath", () => {

513-

it("resolves to absolute and strips trailing separators", () => {

514-

const normalized = normalizeCopilotHomePath("./foo/bar/");

515-

expect(normalized).toBe(resolve("./foo/bar"));

516-

expect(normalized.endsWith("/")).toBe(false);

517-

expect(normalized.endsWith("\\")).toBe(false);

518-

});

519-
520-

it("is idempotent", () => {

521-

const once = normalizeCopilotHomePath("/some/path/");

522-

const twice = normalizeCopilotHomePath(once);

523-

expect(twice).toBe(once);

524-

});

525-

});

Original file line numberDiff line numberDiff line change

@@ -1,7 +1,7 @@

11

// Copilot plugin module implements auth bridge behavior.

22

import { createHash } from "node:crypto";

33

import { homedir as osHomedir } from "node:os";

4-

import { join, normalize, resolve, sep } from "node:path";

4+

import { join, resolve } from "node:path";

55
66

/**

77

* Pure functional auth resolver for the copilot agent runtime.

@@ -307,16 +307,3 @@ export function tokenFingerprint(token: string): string {

307307

function readString(value: unknown): string | undefined {

308308

return typeof value === "string" && value.length > 0 ? value : undefined;

309309

}

310-
311-

/**

312-

* Normalize a copilotHome path for cross-platform pool keying.

313-

* Re-exported so attempt.ts / runtime.ts can share the same

314-

* normalization without re-implementing.

315-

*/

316-

export function normalizeCopilotHomePath(value: string): string {

317-

return normalize(resolve(value)).replace(new RegExp(`${escapeForRegex(sep)}+$`), "");

318-

}

319-
320-

function escapeForRegex(value: string): string {

321-

return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");

322-

}

Original file line numberDiff line numberDiff line change

@@ -4,7 +4,6 @@ import { tmpdir } from "node:os";

44

import path from "node:path";

55

import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

66

import {

7-

COPILOT_SDK_FALLBACK_DIR,

87

COPILOT_SDK_SPEC,

98

resetCopilotSdkCacheForTests,

109

loadCopilotSdk,

@@ -201,10 +200,6 @@ describe("sdk-loader", () => {

201200

expect(primaryImport).toHaveBeenCalledTimes(2);

202201

});

203202
204-

it("default fallback dir points at ~/.openclaw/npm-runtime/copilot", () => {

205-

expect(COPILOT_SDK_FALLBACK_DIR).toMatch(/\.openclaw[\\/]+npm-runtime[\\/]+copilot$/);

206-

});

207-
208203

it("resolves the fallback dir from OPENCLAW_STATE_DIR for relocated profiles", () => {

209204

expect(

210205

resolveCopilotSdkFallbackDir({

@@ -220,9 +215,6 @@ describe("sdk-loader", () => {

220215

});

221216
222217

describe("sdk dependency constants", () => {

223-

it("COPILOT_SDK_FALLBACK_DIR keeps the legacy fallback path stable", () => {

224-

expect(COPILOT_SDK_FALLBACK_DIR).toMatch(/\.openclaw[\\/]+npm-runtime[\\/]+copilot$/);

225-

});

226218

it("COPILOT_SDK_SPEC pins the canonical SDK spec", () => {

227219

expect(COPILOT_SDK_SPEC).toBe("@github/copilot-sdk@1.0.0-beta.9");

228220

});

Original file line numberDiff line numberDiff line change

@@ -10,8 +10,6 @@ export function resolveCopilotSdkFallbackDir(env: NodeJS.ProcessEnv = process.en

1010

return path.join(resolveStateDir(env), "npm-runtime", "copilot");

1111

}

1212
13-

export const COPILOT_SDK_FALLBACK_DIR = resolveCopilotSdkFallbackDir();

14-
1513

export const COPILOT_SDK_SPEC = "@github/copilot-sdk@1.0.0-beta.9";

1614
1715

let cached: Promise<typeof Sdk> | undefined;