@siglume/api-sdk 3.0.0 → 3.1.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/README.md CHANGED
@@ -66,6 +66,7 @@ siglume validate .
66
66
  siglume score . --remote
67
67
  siglume preflight . # checks blockers without creating a draft
68
68
  siglume register . # preflight + auto-register + confirm/publish
69
+ siglume register . --private-confirm # confirm release, keep listing hidden for production testing
69
70
  siglume register . --draft-only # review-only draft staging
70
71
  ```
71
72
 
@@ -75,12 +76,18 @@ Git-ignored because they hold the runtime auth header shared secret. SDK / HTTP
75
76
  `source_url`, `source_context`, and `input_form_spec` directly to
76
77
  `auto-register`. The CLI runs preflight by default, then calls the same
77
78
  `auto-register` route used by SDK / automation clients and confirms publication
78
- unless `--draft-only` is set. Re-run the same `capability_key` to publish a
79
- non-material upgrade when checks pass. The server-side publish gate
79
+ unless `--draft-only` is set. Use `--private-confirm` to create the executable
80
+ release while keeping the listing hidden for seller-owned production testing.
81
+ Re-run the same `capability_key` to publish a non-material upgrade when checks pass. The server-side publish gate
80
82
  includes runtime checks, contract checks, external OAuth declaration checks, pricing / payout
81
83
  rules, and a mandatory fail-closed LLM legal review for law compliance plus
82
84
  public-order / morals compliance.
83
85
 
86
+ At production runtime, verify your configured runtime auth header first
87
+ (commonly `X-Siglume-Auth`). Then map `X-Siglume-Platform-User-Id` to the
88
+ buyer / agent-owner tenant or token record and use `X-Siglume-Agent-Id` for
89
+ agent-scoped audit. `X-Siglume-Owner-Id` is not a supported runtime header.
90
+
84
91
  ## Usage-Based And Per-Action Billing
85
92
 
86
93
  For the canonical pricing reference, see
@@ -2565,8 +2565,12 @@ var init_client = __esm({
2565
2565
  };
2566
2566
  }
2567
2567
  async confirm_registration(listing_id, options = {}) {
2568
- const { version_bump: versionBump } = options;
2568
+ const { version_bump: versionBump, visibility = "public" } = options;
2569
2569
  const payload = { approved: true };
2570
+ if (visibility !== "public" && visibility !== "private") {
2571
+ throw new Error(`visibility must be one of ["public","private"], got ${JSON.stringify(visibility)}`);
2572
+ }
2573
+ payload.visibility = visibility;
2570
2574
  if (versionBump !== void 0) {
2571
2575
  const allowed = ["patch", "minor", "major"];
2572
2576
  if (!allowed.includes(versionBump)) {
@@ -2584,6 +2588,7 @@ var init_client = __esm({
2584
2588
  return {
2585
2589
  listing_id: String(data.listing_id ?? listing_id),
2586
2590
  status: String(data.status ?? ""),
2591
+ visibility: stringOrNull(data.visibility),
2587
2592
  message: stringOrNull(data.message),
2588
2593
  checklist,
2589
2594
  release: toRecord(data.release),
@@ -7079,7 +7084,9 @@ async function runRegistration(path = ".", options = {}, deps = {}) {
7079
7084
  }
7080
7085
  const shouldConfirm = Boolean(options.confirm) || options.confirm === void 0 && !options.draft_only && !options.submit_review;
7081
7086
  if (shouldConfirm) {
7082
- result.confirmation = toJsonable(await client.confirm_registration(receipt.listing_id));
7087
+ result.confirmation = toJsonable(await client.confirm_registration(receipt.listing_id, {
7088
+ visibility: options.confirm_visibility ?? "public"
7089
+ }));
7083
7090
  if (options.submit_review) {
7084
7091
  result.submit_review_skipped = true;
7085
7092
  }
@@ -8356,26 +8363,44 @@ async function runCli(argv, deps = {}) {
8356
8363
  }
8357
8364
  if (report.runtime_validation_path) emit(stdout, `runtime_validation_path: ${String(report.runtime_validation_path)}`);
8358
8365
  });
8359
- program.command("register").option("--confirm", "explicitly confirm the registration; this is the default unless --draft-only is set", false).option("--draft-only", "create or refresh the draft without confirming publication", false).option("--submit-review", "legacy alias: publish immediately if your environment still routes through submit-review", false).option("--json", "emit machine-readable JSON", false).argument("[path]", ".", "project path").action(async (path, options) => {
8366
+ program.command("register").option("--confirm", "explicitly confirm the registration; this is the default unless --draft-only is set", false).option("--private-confirm", "confirm the registration for private production testing without publishing it", false).option("--draft-only", "create or refresh the draft without confirming publication", false).option("--submit-review", "legacy alias: publish immediately if your environment still routes through submit-review", false).option("--json", "emit machine-readable JSON", false).argument("[path]", ".", "project path").action(async (path, options) => {
8360
8367
  const draftOnly = Boolean(options.draftOnly);
8368
+ const privateConfirm = Boolean(options.privateConfirm);
8361
8369
  if (draftOnly && options.confirm) {
8362
8370
  throw new SiglumeProjectError("--draft-only cannot be combined with --confirm.");
8363
8371
  }
8372
+ if (draftOnly && privateConfirm) {
8373
+ throw new SiglumeProjectError("--draft-only cannot be combined with --private-confirm.");
8374
+ }
8375
+ if (options.confirm && privateConfirm) {
8376
+ throw new SiglumeProjectError("--confirm cannot be combined with --private-confirm.");
8377
+ }
8364
8378
  if (draftOnly && options.submitReview) {
8365
8379
  throw new SiglumeProjectError("--draft-only cannot be combined with --submit-review.");
8366
8380
  }
8367
- const shouldConfirm = Boolean(options.confirm) || !draftOnly && !options.submitReview;
8381
+ if (privateConfirm && options.submitReview) {
8382
+ throw new SiglumeProjectError("--private-confirm cannot be combined with --submit-review.");
8383
+ }
8384
+ const shouldConfirm = Boolean(options.confirm) || privateConfirm || !draftOnly && !options.submitReview;
8368
8385
  const report = await runRegistration(path, {
8369
8386
  confirm: shouldConfirm,
8387
+ confirm_visibility: privateConfirm ? "private" : "public",
8370
8388
  draft_only: draftOnly,
8371
8389
  submit_review: options.submitReview
8372
8390
  }, deps);
8391
+ if (privateConfirm && report.confirmation && !report.confirmation.visibility) {
8392
+ report.confirmation.visibility = "private";
8393
+ }
8373
8394
  if (options.json) {
8374
8395
  emit(stdout, renderJson(report));
8375
8396
  } else {
8376
8397
  const receipt = report.receipt;
8377
- const published = Boolean(report.confirmation || report.review);
8378
- if (published && receipt.registration_mode === "upgrade") {
8398
+ const confirmationSummary = report.confirmation;
8399
+ const privatelyConfirmed = confirmationSummary?.visibility === "private";
8400
+ const published = !privatelyConfirmed && Boolean(report.confirmation || report.review);
8401
+ if (privatelyConfirmed) {
8402
+ emit(stdout, "Registration privately confirmed.");
8403
+ } else if (published && receipt.registration_mode === "upgrade") {
8379
8404
  emit(stdout, "Upgrade registered.");
8380
8405
  } else if (published) {
8381
8406
  emit(stdout, "Registration accepted.");
@@ -8394,8 +8419,9 @@ async function runCli(argv, deps = {}) {
8394
8419
  if (receipt.request_id) emit(stdout, `request_id: ${receipt.request_id}`);
8395
8420
  if (report.confirmation) {
8396
8421
  const confirmation = report.confirmation;
8397
- emit(stdout, "Listing published.");
8422
+ emit(stdout, confirmation.visibility === "private" ? "Listing confirmed privately for production testing." : "Listing published.");
8398
8423
  if (confirmation.status) emit(stdout, `confirmation_status: ${confirmation.status}`);
8424
+ if (confirmation.visibility) emit(stdout, `confirmation_visibility: ${confirmation.visibility}`);
8399
8425
  if (confirmation.release?.release_status) emit(stdout, `release_status: ${confirmation.release.release_status}`);
8400
8426
  } else if (report.review) {
8401
8427
  const review = report.review;