@anytio/pspm 0.9.2 → 0.10.0

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/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ All notable changes to the PSPM CLI will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.10.0] - 2026-03-14
9
+
10
+ ### Added
11
+
12
+ - **Organization publishing**: Publish skills under an org namespace with `pspm publish --org <orgname>`
13
+ - `pspm publish --access team --org myorg` — publish as team-visible under `@org/myorg/skill-name`
14
+ - `pspm publish --access public --org myorg` — publish as public under org namespace
15
+ - **Team visibility**: New `--access team` option restricts package access to org members only
16
+ - **Org namespace resolution**: `@org/` namespace fully supported in dependency resolution
17
+ - Install org-scoped packages: `pspm add @org/myorg/skill-name`
18
+ - Recursive dependency resolution for org packages
19
+
8
20
  ## [0.9.2] - 2026-03-10
9
21
 
10
22
  ### Changed
package/README.md CHANGED
@@ -9,7 +9,7 @@ Supports **Claude Code**, **Cursor**, **Codex**, **Gemini CLI**, **Windsurf**, a
9
9
  ## Install a Skill
10
10
 
11
11
  ```bash
12
- npx @anytio/pspm add vercel-labs/agent-skills
12
+ npx @anytio/pspm add @user/anyt/youtube-downloader
13
13
  ```
14
14
 
15
15
  ### Source Formats
@@ -351,10 +351,11 @@ pspm version patch --dry-run # Preview without writing
351
351
  ```bash
352
352
  pspm publish --access public # Publish as public (irreversible)
353
353
  pspm publish --access private # Publish as private (requires Pro)
354
+ pspm publish --access team --org myorg # Publish under org (team-only)
354
355
  pspm publish --access private --bump patch # Bump and publish
355
356
  ```
356
357
 
357
- `--access` is required. Before uploading, `pspm publish` shows a preview of included files and package size. Max package size is **10MB**.
358
+ `--access` is required (`public`, `private`, or `team`). Use `--org <orgname>` to publish under an organization namespace. `--access team` requires `--org`. Before uploading, `pspm publish` shows a preview of included files and package size. Max package size is **10MB**.
358
359
 
359
360
  ### Managing Published Skills
360
361
 
package/dist/index.js CHANGED
@@ -74,7 +74,7 @@ var init_fetcher = __esm({
74
74
  });
75
75
 
76
76
  // src/sdk/generated/index.ts
77
- var getMeUrl, me, getExplorePublicSkillsUrl, explorePublicSkills, getDeleteSkillUrl, deleteSkill, getListSkillVersionsUrl, listSkillVersions, getGetSkillVersionUrl, getSkillVersion, getDeleteSkillVersionUrl, deleteSkillVersion, getPublishSkillUrl, publishSkill;
77
+ var getMeUrl, me, getExplorePublicSkillsUrl, explorePublicSkills, getDeleteSkillUrl, deleteSkill, getListSkillVersionsUrl, listSkillVersions, getGetSkillVersionUrl, getSkillVersion, getDeleteSkillVersionUrl, deleteSkillVersion, getPublishSkillUrl, publishSkill, getListOrgSkillVersionsUrl, listOrgSkillVersions, getGetOrgSkillVersionUrl, getOrgSkillVersion, getPublishOrgSkillUrl, publishOrgSkill;
78
78
  var init_generated = __esm({
79
79
  "src/sdk/generated/index.ts"() {
80
80
  init_fetcher();
@@ -173,6 +173,46 @@ var init_generated = __esm({
173
173
  }
174
174
  );
175
175
  };
176
+ getListOrgSkillVersionsUrl = (orgname, name) => {
177
+ return `/api/skills/@org/${orgname}/${name}/versions`;
178
+ };
179
+ listOrgSkillVersions = async (orgname, name, options) => {
180
+ return customFetch(
181
+ getListOrgSkillVersionsUrl(orgname, name),
182
+ {
183
+ ...options,
184
+ method: "GET"
185
+ }
186
+ );
187
+ };
188
+ getGetOrgSkillVersionUrl = (orgname, name, version3) => {
189
+ return `/api/skills/@org/${orgname}/${name}/versions/${version3}`;
190
+ };
191
+ getOrgSkillVersion = async (orgname, name, version3, options) => {
192
+ return customFetch(
193
+ getGetOrgSkillVersionUrl(orgname, name, version3),
194
+ {
195
+ ...options,
196
+ method: "GET"
197
+ }
198
+ );
199
+ };
200
+ getPublishOrgSkillUrl = (orgname) => {
201
+ return `/api/skills/@org/${orgname}/publish`;
202
+ };
203
+ publishOrgSkill = async (orgname, publishSkillInput, options) => {
204
+ return customFetch(
205
+ getPublishOrgSkillUrl(orgname),
206
+ {
207
+ ...options,
208
+ method: "POST",
209
+ headers: { "Content-Type": "application/json", ...options?.headers },
210
+ body: JSON.stringify(
211
+ publishSkillInput
212
+ )
213
+ }
214
+ );
215
+ };
176
216
  }
177
217
  });
178
218
 
@@ -1020,6 +1060,10 @@ async function resolveRecursive(rootDeps, config2) {
1020
1060
  );
1021
1061
  versionsStatus = resp.status;
1022
1062
  versionsData = resp.data;
1063
+ } else if (parsed.namespace === "org") {
1064
+ const resp = await listOrgSkillVersions(parsed.owner, parsed.name);
1065
+ versionsStatus = resp.status;
1066
+ versionsData = resp.status === 200 ? resp.data : void 0;
1023
1067
  } else {
1024
1068
  const resp = await listSkillVersions(parsed.owner, parsed.name);
1025
1069
  versionsStatus = resp.status;
@@ -1065,6 +1109,15 @@ async function resolveRecursive(rootDeps, config2) {
1065
1109
  if (resp.status === 200 && resp.data) {
1066
1110
  versionData = resp.data;
1067
1111
  }
1112
+ } else if (parsed.namespace === "org") {
1113
+ const resp = await getOrgSkillVersion(
1114
+ parsed.owner,
1115
+ parsed.name,
1116
+ resolvedVersion
1117
+ );
1118
+ if (resp.status === 200 && resp.data) {
1119
+ versionData = resp.data;
1120
+ }
1068
1121
  } else {
1069
1122
  const resp = await getSkillVersion(
1070
1123
  parsed.owner,
@@ -1133,6 +1186,9 @@ async function resolveRecursive(rootDeps, config2) {
1133
1186
  p2Parsed.subname
1134
1187
  );
1135
1188
  p2Versions = resp.status === 200 ? resp.data : void 0;
1189
+ } else if (p2Parsed.namespace === "org") {
1190
+ const resp = await listOrgSkillVersions(p2Parsed.owner, p2Parsed.name);
1191
+ p2Versions = resp.status === 200 ? resp.data : void 0;
1136
1192
  } else {
1137
1193
  const resp = await listSkillVersions(p2Parsed.owner, p2Parsed.name);
1138
1194
  p2Versions = resp.status === 200 ? resp.data : void 0;
@@ -1168,6 +1224,15 @@ async function resolveRecursive(rootDeps, config2) {
1168
1224
  if (resp.status === 200 && resp.data) {
1169
1225
  p2VersionData = resp.data;
1170
1226
  }
1227
+ } else if (p2Parsed.namespace === "org") {
1228
+ const resp = await getOrgSkillVersion(
1229
+ p2Parsed.owner,
1230
+ p2Parsed.name,
1231
+ finalVersion
1232
+ );
1233
+ if (resp.status === 200 && resp.data) {
1234
+ p2VersionData = resp.data;
1235
+ }
1171
1236
  } else {
1172
1237
  const resp = await getSkillVersion(
1173
1238
  p2Parsed.owner,
@@ -5348,13 +5413,25 @@ async function publishCommand(options) {
5348
5413
  console.log("");
5349
5414
  console.log(`pspm notice Publishing to ${registryUrl} with tag latest`);
5350
5415
  configure2({ registryUrl, apiKey });
5351
- const response = await publishSkill({
5352
- manifest: packageJson2,
5353
- tarballBase64,
5354
- visibility: options.access
5355
- });
5416
+ let response;
5417
+ if (options.org) {
5418
+ response = await publishOrgSkill(options.org, {
5419
+ manifest: packageJson2,
5420
+ tarballBase64,
5421
+ visibility: options.access
5422
+ });
5423
+ } else {
5424
+ response = await publishSkill({
5425
+ manifest: packageJson2,
5426
+ tarballBase64,
5427
+ visibility: options.access
5428
+ });
5429
+ }
5356
5430
  if (response.status !== 200) {
5357
- const errorMessage = extractApiErrorMessage(response, "Publish failed");
5431
+ const errorMessage = extractApiErrorMessage(
5432
+ { status: response.status, data: response.data },
5433
+ "Publish failed"
5434
+ );
5358
5435
  if (errorMessage.includes("must be greater than") || errorMessage.includes("already exists")) {
5359
5436
  console.error("pspm error code E403");
5360
5437
  console.error(
@@ -5365,9 +5442,11 @@ async function publishCommand(options) {
5365
5442
  }
5366
5443
  const result = response.data;
5367
5444
  const visibility = result.skill.visibility;
5368
- const visibilityIcon = visibility === "public" ? "\u{1F310}" : "\u{1F512}";
5445
+ const visibilityIcon = visibility === "public" ? "\u{1F310}" : visibility === "team" ? "\u{1F465}" : "\u{1F512}";
5446
+ const namespace = options.org ? "org" : result.skill.namespace ?? "user";
5447
+ const owner = options.org ?? result.skill.username;
5369
5448
  console.log(
5370
- `+ @${result.skill.namespace ?? "user"}/${result.skill.username}/${result.skill.name}@${result.version.version}`
5449
+ `+ @${namespace}/${owner}/${result.skill.name}@${result.version.version}`
5371
5450
  );
5372
5451
  console.log(`Checksum: ${result.version.checksum}`);
5373
5452
  console.log(`Visibility: ${visibilityIcon} ${visibility}`);
@@ -6070,19 +6149,24 @@ program.command("version <bump>").description("Bump package version (major, mino
6070
6149
  dryRun: options.dryRun
6071
6150
  });
6072
6151
  });
6073
- program.command("publish").description("Publish current directory as a skill").option("--bump <level>", "Bump version (major, minor, patch)").option("--tag <tag>", "Tag for the release").requiredOption(
6152
+ program.command("publish").description("Publish current directory as a skill").option("--bump <level>", "Bump version (major, minor, patch)").option("--tag <tag>", "Tag for the release").option("--org <orgname>", "Publish under an organization namespace").requiredOption(
6074
6153
  "--access <level>",
6075
- "Set package visibility (public or private)"
6154
+ "Set package visibility (public, private, or team)"
6076
6155
  ).action(async (options) => {
6077
6156
  const access3 = options.access;
6078
- if (access3 !== "public" && access3 !== "private") {
6079
- console.error('Error: --access must be "public" or "private"');
6157
+ if (access3 !== "public" && access3 !== "private" && access3 !== "team") {
6158
+ console.error('Error: --access must be "public", "private", or "team"');
6159
+ process.exit(1);
6160
+ }
6161
+ if (access3 === "team" && !options.org) {
6162
+ console.error("Error: --access team requires --org <orgname>");
6080
6163
  process.exit(1);
6081
6164
  }
6082
6165
  await publishCommand({
6083
6166
  bump: options.bump,
6084
6167
  tag: options.tag,
6085
- access: access3
6168
+ access: access3,
6169
+ org: options.org
6086
6170
  });
6087
6171
  });
6088
6172
  program.command("unpublish <specifier>").description(