@hol-org/rb-client 0.1.175 → 0.1.176

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/dist/index.js CHANGED
@@ -1321,24 +1321,120 @@ var skillPublisherMetadataSchema = z2.object({
1321
1321
  }).passthrough();
1322
1322
  var skillTrustTierSchema = z2.enum([
1323
1323
  "unpublished",
1324
+ "unclaimed",
1325
+ "validated",
1324
1326
  "published",
1325
1327
  "verified",
1326
1328
  "hardened"
1327
1329
  ]);
1330
+ var skillStatusDefaultVerificationSignals = {
1331
+ publisherBound: false,
1332
+ domainProof: false,
1333
+ verifiedDomain: false,
1334
+ previewValidated: false
1335
+ };
1336
+ var skillStatusDefaultProvenanceSignals = {
1337
+ repoCommitIntegrity: false,
1338
+ manifestIntegrity: false,
1339
+ canonicalRelease: false,
1340
+ previewAvailable: false,
1341
+ previewAuthoritative: false
1342
+ };
1328
1343
  var skillStatusChecksSchema = z2.object({
1329
1344
  repoCommitIntegrity: z2.boolean(),
1330
1345
  manifestIntegrity: z2.boolean(),
1331
1346
  domainProof: z2.boolean()
1332
1347
  }).passthrough();
1333
1348
  var skillStatusNextStepSchema = z2.object({
1349
+ kind: z2.enum([
1350
+ "setup_validate",
1351
+ "publish_first_release",
1352
+ "verify_domain",
1353
+ "harden_workflow",
1354
+ "share_status"
1355
+ ]).optional(),
1356
+ priority: z2.number().int().optional(),
1334
1357
  id: z2.string(),
1335
1358
  label: z2.string(),
1336
1359
  description: z2.string(),
1360
+ url: z2.string().nullable().optional(),
1337
1361
  href: z2.string().nullable().optional(),
1338
1362
  command: z2.string().nullable().optional()
1339
1363
  }).passthrough();
1364
+ var skillPreviewSuggestedNextStepSchema = z2.object({
1365
+ id: z2.string(),
1366
+ label: z2.string(),
1367
+ description: z2.string(),
1368
+ command: z2.string().optional(),
1369
+ href: z2.string().optional()
1370
+ }).passthrough();
1371
+ var skillPreviewReportSchema = z2.object({
1372
+ schema_version: z2.literal("skill-preview.v1"),
1373
+ tool_version: z2.string(),
1374
+ preview_id: z2.string(),
1375
+ repo_url: z2.string(),
1376
+ repo_owner: z2.string(),
1377
+ repo_name: z2.string(),
1378
+ default_branch: z2.string(),
1379
+ commit_sha: z2.string(),
1380
+ ref: z2.string(),
1381
+ event_name: z2.string(),
1382
+ workflow_run_url: z2.string(),
1383
+ skill_dir: z2.string(),
1384
+ name: z2.string(),
1385
+ version: z2.string(),
1386
+ validation_status: z2.literal("passed"),
1387
+ findings: z2.array(z2.unknown()),
1388
+ package_summary: z2.record(z2.string(), z2.unknown()),
1389
+ suggested_next_steps: z2.array(skillPreviewSuggestedNextStepSchema),
1390
+ generated_at: z2.string()
1391
+ }).passthrough();
1392
+ var skillPreviewRecordSchema = z2.object({
1393
+ id: z2.string(),
1394
+ previewId: z2.string(),
1395
+ source: z2.literal("github-oidc"),
1396
+ report: skillPreviewReportSchema,
1397
+ generatedAt: z2.string(),
1398
+ expiresAt: z2.string(),
1399
+ statusUrl: z2.string(),
1400
+ authoritative: z2.boolean()
1401
+ }).passthrough();
1402
+ var skillPreviewLookupResponseSchema = z2.object({
1403
+ found: z2.boolean(),
1404
+ authoritative: z2.boolean(),
1405
+ preview: skillPreviewRecordSchema.nullable(),
1406
+ statusUrl: z2.string().nullable(),
1407
+ expiresAt: z2.string().nullable()
1408
+ }).passthrough();
1409
+ var skillStatusPreviewMetadataSchema = z2.object({
1410
+ previewId: z2.string(),
1411
+ repoUrl: z2.string(),
1412
+ repoOwner: z2.string(),
1413
+ repoName: z2.string(),
1414
+ commitSha: z2.string(),
1415
+ ref: z2.string(),
1416
+ eventName: z2.string(),
1417
+ skillDir: z2.string(),
1418
+ generatedAt: z2.string(),
1419
+ expiresAt: z2.string(),
1420
+ statusUrl: z2.string()
1421
+ }).passthrough();
1422
+ var skillStatusVerificationSignalsSchema = z2.object({
1423
+ publisherBound: z2.boolean(),
1424
+ domainProof: z2.boolean(),
1425
+ verifiedDomain: z2.boolean(),
1426
+ previewValidated: z2.boolean()
1427
+ }).passthrough();
1428
+ var skillStatusProvenanceSignalsSchema = z2.object({
1429
+ repoCommitIntegrity: z2.boolean(),
1430
+ manifestIntegrity: z2.boolean(),
1431
+ canonicalRelease: z2.boolean(),
1432
+ previewAvailable: z2.boolean(),
1433
+ previewAuthoritative: z2.boolean()
1434
+ }).passthrough();
1340
1435
  var skillBadgeMetricSchema = z2.enum([
1341
1436
  "version",
1437
+ "version_verification",
1342
1438
  "status",
1343
1439
  "verification",
1344
1440
  "repo_commit",
@@ -1359,7 +1455,65 @@ var skillStatusResponseSchema = z2.object({
1359
1455
  badgeMetric: skillBadgeMetricSchema,
1360
1456
  checks: skillStatusChecksSchema,
1361
1457
  nextSteps: z2.array(skillStatusNextStepSchema),
1362
- publisher: skillPublisherMetadataSchema.nullable().optional()
1458
+ verificationSignals: skillStatusVerificationSignalsSchema.default(
1459
+ skillStatusDefaultVerificationSignals
1460
+ ),
1461
+ provenanceSignals: skillStatusProvenanceSignalsSchema.default(
1462
+ skillStatusDefaultProvenanceSignals
1463
+ ),
1464
+ publisher: skillPublisherMetadataSchema.nullable().optional(),
1465
+ preview: skillStatusPreviewMetadataSchema.nullable().optional(),
1466
+ statusUrl: z2.string().nullable().optional()
1467
+ }).passthrough();
1468
+ var skillInstallArtifactDescriptorSchema = z2.object({
1469
+ url: z2.string(),
1470
+ pointer: z2.string().nullable(),
1471
+ sha256: z2.string().nullable()
1472
+ }).passthrough();
1473
+ var skillInstallResolverDescriptorSchema = z2.object({
1474
+ skillRef: z2.string(),
1475
+ skillMdUrl: z2.string(),
1476
+ manifestUrl: z2.string()
1477
+ }).passthrough();
1478
+ var skillInstallBadgeDescriptorSchema = z2.object({
1479
+ apiUrl: z2.string(),
1480
+ imageUrl: z2.string(),
1481
+ markdown: z2.string(),
1482
+ html: z2.string()
1483
+ }).passthrough();
1484
+ var skillInstallShareDescriptorSchema = z2.object({
1485
+ canonicalUrl: z2.string().nullable(),
1486
+ latestUrl: z2.string().nullable(),
1487
+ markdownLink: z2.string().nullable(),
1488
+ htmlLink: z2.string().nullable(),
1489
+ badge: skillInstallBadgeDescriptorSchema.nullable()
1490
+ }).passthrough();
1491
+ var skillInstallSnippetSetSchema = z2.object({
1492
+ cli: z2.string(),
1493
+ claude: z2.string(),
1494
+ cursor: z2.string(),
1495
+ codex: z2.string(),
1496
+ openclaw: z2.string()
1497
+ }).passthrough();
1498
+ var skillInstallResponseSchema = z2.object({
1499
+ name: z2.string(),
1500
+ version: z2.string(),
1501
+ skillRef: z2.string(),
1502
+ network: z2.union([z2.literal("mainnet"), z2.literal("testnet")]),
1503
+ detailUrl: z2.string().nullable(),
1504
+ artifacts: z2.object({
1505
+ skillMd: skillInstallArtifactDescriptorSchema,
1506
+ manifest: skillInstallArtifactDescriptorSchema
1507
+ }).passthrough(),
1508
+ resolvers: z2.object({
1509
+ pinned: skillInstallResolverDescriptorSchema,
1510
+ latest: skillInstallResolverDescriptorSchema
1511
+ }).passthrough(),
1512
+ share: skillInstallShareDescriptorSchema,
1513
+ snippets: skillInstallSnippetSetSchema
1514
+ }).passthrough();
1515
+ var skillInstallCopyTelemetryResponseSchema = z2.object({
1516
+ accepted: z2.boolean()
1363
1517
  }).passthrough();
1364
1518
  var skillBadgeStyleSchema = z2.enum([
1365
1519
  "flat",
@@ -4116,6 +4270,35 @@ async function getSkillStatus(client, params) {
4116
4270
  "skill status response"
4117
4271
  );
4118
4272
  }
4273
+ function buildRepoPreviewQuery(params) {
4274
+ const repo = params.repo.trim();
4275
+ const skillDir = params.skillDir.trim();
4276
+ if (!repo) {
4277
+ throw new Error("repo is required");
4278
+ }
4279
+ if (!skillDir) {
4280
+ throw new Error("skillDir is required");
4281
+ }
4282
+ const query = new URLSearchParams();
4283
+ query.set("repo", repo);
4284
+ query.set("skillDir", skillDir);
4285
+ if (params.ref?.trim()) {
4286
+ query.set("ref", params.ref.trim());
4287
+ }
4288
+ return query.toString();
4289
+ }
4290
+ async function getSkillStatusByRepo(client, params) {
4291
+ const query = buildRepoPreviewQuery(params);
4292
+ const raw = await client.requestJson(
4293
+ `/skills/status/by-repo?${query}`,
4294
+ { method: "GET" }
4295
+ );
4296
+ return client.parseWithSchema(
4297
+ raw,
4298
+ skillStatusResponseSchema,
4299
+ "skill status response"
4300
+ );
4301
+ }
4119
4302
  async function listSkills(client, params = {}) {
4120
4303
  const query = new URLSearchParams();
4121
4304
  if (params.name) {
@@ -4449,6 +4632,109 @@ async function getSkillBadge(client, params) {
4449
4632
  "skill badge response"
4450
4633
  );
4451
4634
  }
4635
+ async function uploadSkillPreviewFromGithubOidc(client, payload) {
4636
+ const token = payload.token.trim();
4637
+ if (!token) {
4638
+ throw new Error("token is required");
4639
+ }
4640
+ const raw = await client.requestJson(
4641
+ "/skills/preview/github-oidc",
4642
+ {
4643
+ method: "POST",
4644
+ body: payload.report,
4645
+ headers: {
4646
+ "content-type": "application/json",
4647
+ authorization: `Bearer ${token}`
4648
+ }
4649
+ }
4650
+ );
4651
+ return client.parseWithSchema(
4652
+ raw,
4653
+ skillPreviewRecordSchema,
4654
+ "skill preview record response"
4655
+ );
4656
+ }
4657
+ async function getSkillPreview(client, params) {
4658
+ const normalizedName = params.name.trim();
4659
+ if (!normalizedName) {
4660
+ throw new Error("name is required");
4661
+ }
4662
+ const query = new URLSearchParams();
4663
+ query.set("name", normalizedName);
4664
+ if (params.version?.trim()) {
4665
+ query.set("version", params.version.trim());
4666
+ }
4667
+ const raw = await client.requestJson(
4668
+ `/skills/preview?${query.toString()}`,
4669
+ { method: "GET" }
4670
+ );
4671
+ return client.parseWithSchema(
4672
+ raw,
4673
+ skillPreviewLookupResponseSchema,
4674
+ "skill preview response"
4675
+ );
4676
+ }
4677
+ async function getSkillPreviewByRepo(client, params) {
4678
+ const query = buildRepoPreviewQuery(params);
4679
+ const raw = await client.requestJson(
4680
+ `/skills/preview/by-repo?${query}`,
4681
+ { method: "GET" }
4682
+ );
4683
+ return client.parseWithSchema(
4684
+ raw,
4685
+ skillPreviewLookupResponseSchema,
4686
+ "skill preview by repo response"
4687
+ );
4688
+ }
4689
+ async function getSkillPreviewById(client, previewId) {
4690
+ const normalizedPreviewId = previewId.trim();
4691
+ if (!normalizedPreviewId) {
4692
+ throw new Error("previewId is required");
4693
+ }
4694
+ const raw = await client.requestJson(
4695
+ `/skills/preview/${encodeURIComponent(normalizedPreviewId)}`,
4696
+ { method: "GET" }
4697
+ );
4698
+ return client.parseWithSchema(
4699
+ raw,
4700
+ skillPreviewLookupResponseSchema,
4701
+ "skill preview by id response"
4702
+ );
4703
+ }
4704
+ async function getSkillInstall(client, skillRef) {
4705
+ const normalizedSkillRef = skillRef.trim();
4706
+ if (!normalizedSkillRef) {
4707
+ throw new Error("skillRef is required");
4708
+ }
4709
+ const raw = await client.requestJson(
4710
+ `/skills/${encodeURIComponent(normalizedSkillRef)}/install`,
4711
+ { method: "GET" }
4712
+ );
4713
+ return client.parseWithSchema(
4714
+ raw,
4715
+ skillInstallResponseSchema,
4716
+ "skill install response"
4717
+ );
4718
+ }
4719
+ async function recordSkillInstallCopy(client, skillRef, payload = {}) {
4720
+ const normalizedSkillRef = skillRef.trim();
4721
+ if (!normalizedSkillRef) {
4722
+ throw new Error("skillRef is required");
4723
+ }
4724
+ const raw = await client.requestJson(
4725
+ `/skills/${encodeURIComponent(normalizedSkillRef)}/telemetry/install-copy`,
4726
+ {
4727
+ method: "POST",
4728
+ body: payload,
4729
+ headers: { "content-type": "application/json" }
4730
+ }
4731
+ );
4732
+ return client.parseWithSchema(
4733
+ raw,
4734
+ skillInstallCopyTelemetryResponseSchema,
4735
+ "skill install copy telemetry response"
4736
+ );
4737
+ }
4452
4738
  async function listSkillTags(client) {
4453
4739
  const raw = await client.requestJson("/skills/tags", {
4454
4740
  method: "GET"
@@ -5016,6 +5302,27 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
5016
5302
  async getSkillBadge(params) {
5017
5303
  return getSkillBadge(this, params);
5018
5304
  }
5305
+ async getSkillStatusByRepo(params) {
5306
+ return getSkillStatusByRepo(this, params);
5307
+ }
5308
+ async uploadSkillPreviewFromGithubOidc(payload) {
5309
+ return uploadSkillPreviewFromGithubOidc(this, payload);
5310
+ }
5311
+ async getSkillPreview(params) {
5312
+ return getSkillPreview(this, params);
5313
+ }
5314
+ async getSkillPreviewByRepo(params) {
5315
+ return getSkillPreviewByRepo(this, params);
5316
+ }
5317
+ async getSkillPreviewById(previewId) {
5318
+ return getSkillPreviewById(this, previewId);
5319
+ }
5320
+ async getSkillInstall(skillRef) {
5321
+ return getSkillInstall(this, skillRef);
5322
+ }
5323
+ async recordSkillInstallCopy(skillRef, payload) {
5324
+ return recordSkillInstallCopy(this, skillRef, payload);
5325
+ }
5019
5326
  async listSkillTags() {
5020
5327
  return listSkillTags(this);
5021
5328
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hol-org/rb-client",
3
- "version": "0.1.175",
3
+ "version": "0.1.176",
4
4
  "description": "Lightweight Registry Broker client for HOL registries.",
5
5
  "type": "module",
6
6
  "files": [