CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-libnpmorg

tessl install tessl/npm-libnpmorg@8.0.0

Programmatic API for managing npm organization memberships and roles

Agent Success

Agent success rate when using this tile

74%

Improvement

Agent success rate improvement when using this tile compared to baseline

0.97x

Baseline

Agent success rate without this tile

76%

task.mdevals/scenario-3/

Registry Access Governance

Implement utilities to enforce consistent access controls for a scoped package within an npm organization.

Capabilities

Apply access plan

  • When a plan marks the package public with no grants, the utility sets visibility to public and removes any existing team or user grants. @test
  • When a plan specifies restricted visibility, explicit team/user grants (read-only or read-write), and owners, the utility applies the permissions, removes grants not in the plan, and makes the owner list match exactly. @test
  • When the registry requires a one-time password during changes, the operation retries once using the provided otp value and surfaces the error if it still fails. @test

Inspect org membership

  • Returns an organization roster grouped by owner, admin, and developer roles. @test
  • Streams roster entries as [user, role] pairs without loading the full list at once. @test

Implementation

@generates

API

/**
 * Applies desired access and ownership rules for a package.
 * @param plan Object with packageName, visibility ('public'|'restricted'), optional teamGrants [{ team, permission }], userGrants [{ user, permission }], and owners [string]. Permissions are read-only or read-write. Team names may include org prefixes.
 * @param auth Registry auth options including token, optional otp, and registry URL overrides.
 * @returns Summary object with resulting visibility, grants, and owners after reconciliation.
 */
export async function applyAccessPlan(plan, auth);

/**
 * Returns organization roster grouped by role names.
 * @param org Organization name (with or without @ prefix)
 * @param auth Registry auth options including token, optional otp, and registry URL overrides.
 * @returns { owner: string[], admin: string[], developer: string[] }
 */
export async function getOrgRoster(org, auth);

/**
 * Streams organization roster as [user, role] pairs.
 * @param org Organization name (with or without @ prefix)
 * @param auth Registry auth options including token, optional otp, and registry URL overrides.
 * @returns Async iterable yielding [user, role]
 */
export async function streamOrgRoster(org, auth);

Dependencies { .dependencies }

npm { .dependency }

Provides CLI commands for registry package access control, ownership, organizations, and teams.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/libnpmorg@8.0.x
tile.json