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

推荐订阅源

博客园_首页
H
Help Net Security
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
P
Proofpoint News Feed
A
About on SuperTechFans
V
V2EX
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
宝玉的分享
宝玉的分享
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
Martin Fowler
Martin Fowler
I
InfoQ
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
U
Unit 42
The Cloudflare Blog
Y
Y Combinator Blog

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
feat(plugins): support npm pack installs · openclaw/openc...
steipete · 2026-05-06 · via Recent Commits to openclaw:main

@@ -14,6 +14,7 @@ import { resolveDefaultPluginExtensionsDir } from "../plugins/install-paths.js";

1414

import type { InstallSafetyOverrides } from "../plugins/install-security-scan.js";

1515

import {

1616

PLUGIN_INSTALL_ERROR_CODE,

17+

installPluginFromNpmPackArchive,

1718

installPluginFromNpmSpec,

1819

installPluginFromPath,

1920

} from "../plugins/install.js";

@@ -49,6 +50,7 @@ import {

4950

createHookPackInstallLogger,

5051

createPluginInstallLogger,

5152

formatPluginInstallWithHookFallbackError,

53+

parseNpmPackPrefixPath,

5254

parseNpmPrefixSpec,

5355

} from "./plugins-command-helpers.js";

5456

import { persistHookPackInstall, persistPluginInstall } from "./plugins-install-persist.js";

@@ -379,6 +381,54 @@ async function tryInstallPluginOrHookPackFromNpmSpec(params: {

379381

return { ok: true };

380382

}

381383384+

async function tryInstallPluginFromNpmPackArchive(params: {

385+

snapshot: ConfigSnapshotForInstallPersist;

386+

installMode: "install" | "update";

387+

archivePath: string;

388+

safetyOverrides: InstallSafetyOverrides;

389+

extensionsDir: string;

390+

runtime?: RuntimeEnv;

391+

}): Promise<{ ok: true } | { ok: false }> {

392+

const result = await installPluginFromNpmPackArchive({

393+

...params.safetyOverrides,

394+

mode: params.installMode,

395+

archivePath: params.archivePath,

396+

extensionsDir: params.extensionsDir,

397+

logger: createPluginInstallLogger(params.runtime),

398+

});

399+

if (!result.ok) {

400+

(params.runtime ?? defaultRuntime).error(result.error);

401+

return { ok: false };

402+

}

403+404+

await persistPluginInstall({

405+

snapshot: params.snapshot,

406+

pluginId: result.pluginId,

407+

install: {

408+

source: "npm",

409+

spec: result.npmResolution?.resolvedSpec ?? result.manifestName ?? result.pluginId,

410+

sourcePath: params.archivePath,

411+

installPath: result.targetDir,

412+

...(result.version ? { version: result.version } : {}),

413+

...(result.npmResolution?.name ? { resolvedName: result.npmResolution.name } : {}),

414+

...(result.npmResolution?.version ? { resolvedVersion: result.npmResolution.version } : {}),

415+

...(result.npmResolution?.resolvedSpec

416+

? { resolvedSpec: result.npmResolution.resolvedSpec }

417+

: {}),

418+

...(result.npmResolution?.integrity ? { integrity: result.npmResolution.integrity } : {}),

419+

...(result.npmResolution?.shasum ? { shasum: result.npmResolution.shasum } : {}),

420+

...(result.npmResolution?.resolvedAt ? { resolvedAt: result.npmResolution.resolvedAt } : {}),

421+

artifactKind: "npm-pack",

422+

artifactFormat: "tgz",

423+

...(result.npmResolution?.integrity ? { npmIntegrity: result.npmResolution.integrity } : {}),

424+

...(result.npmResolution?.shasum ? { npmShasum: result.npmResolution.shasum } : {}),

425+

...(result.npmTarballName ? { npmTarballName: result.npmTarballName } : {}),

426+

},

427+

runtime: params.runtime,

428+

});

429+

return { ok: true };

430+

}

431+382432

async function tryInstallPluginFromGitSpec(params: {

383433

snapshot: ConfigSnapshotForInstallPersist;

384434

installMode: "install" | "update";

@@ -753,6 +803,26 @@ export async function runPluginInstallCommand(params: {

753803

return;

754804

}

755805806+

const npmPackPath = parseNpmPackPrefixPath(raw);

807+

if (npmPackPath !== null) {

808+

if (!npmPackPath) {

809+

runtime.error("unsupported npm-pack: spec: missing pack archive path");

810+

return runtime.exit(1);

811+

}

812+

const npmPackResult = await tryInstallPluginFromNpmPackArchive({

813+

snapshot,

814+

installMode,

815+

archivePath: npmPackPath,

816+

safetyOverrides,

817+

extensionsDir,

818+

runtime,

819+

});

820+

if (!npmPackResult.ok) {

821+

return runtime.exit(1);

822+

}

823+

return;

824+

}

825+756826

if (gitSpec) {

757827

const gitResult = await tryInstallPluginFromGitSpec({

758828

snapshot,