extension.js 475 B

123456789101112
  1. // E2E 扩展 fixture(docs/plugins/extension-host.md §17.3):清单没有声明 grants,调用会话能力应报 not-declared。
  2. const PLUGIN = "e2e-ext-sessions-nogrant@inline";
  3. export function activate(ctx) {
  4. ctx.sessions.listSessions({}).then(
  5. () => ctx.log.info(`E2E_SESSIONS_NOGRANT plugin=${PLUGIN} ok`),
  6. (error) =>
  7. ctx.log.info(`E2E_SESSIONS_NOGRANT plugin=${PLUGIN} error=${error?.code ?? "unknown"}`),
  8. );
  9. }
  10. export function deactivate() {}