@siglume/api-sdk 2.0.5 → 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.
@@ -196,9 +196,6 @@ interface AppManifest {
196
196
  support_contact?: string;
197
197
  seller_homepage_url?: string;
198
198
  seller_social_url?: string;
199
- publisher_type?: "user" | "company";
200
- company_id?: string;
201
- publisher_company_id?: string;
202
199
  store_vertical: StoreVertical;
203
200
  compatibility_tags?: string[];
204
201
  example_prompts?: string[];
@@ -329,12 +326,6 @@ interface AppListingRecord {
329
326
  seller_display_name?: string | null;
330
327
  seller_homepage_url?: string | null;
331
328
  seller_social_url?: string | null;
332
- publisher_type?: string | null;
333
- publisher_company_id?: string | null;
334
- company_id?: string | null;
335
- company_name?: string | null;
336
- company_publish_status?: string | null;
337
- company_terms_version?: string | null;
338
329
  review_status?: string | null;
339
330
  review_note?: string | null;
340
331
  submission_blockers: string[];
@@ -343,26 +334,6 @@ interface AppListingRecord {
343
334
  updated_at?: string | null;
344
335
  raw: Record<string, unknown>;
345
336
  }
346
- interface CompanyPublisherRecord {
347
- company_id: string;
348
- name: string;
349
- status: string;
350
- description?: string | null;
351
- is_founder: boolean;
352
- membership_role?: string | null;
353
- membership_status?: string | null;
354
- can_publish: boolean;
355
- can_approve: boolean;
356
- approval_required: boolean;
357
- paid_listing_allowed: boolean;
358
- disabled_reasons: string[];
359
- company_terms_version?: string | null;
360
- active_listing_count: number;
361
- pending_approval_count: number;
362
- settlement_wallet_ready: boolean;
363
- settlement_wallets: Array<Record<string, unknown>>;
364
- raw: Record<string, unknown>;
365
- }
366
337
  interface CapabilitySaveStateRecord {
367
338
  capability_key: string;
368
339
  save_key: string;
@@ -425,6 +396,7 @@ interface RegistrationQuality {
425
396
  interface RegistrationConfirmation {
426
397
  listing_id: string;
427
398
  status: string;
399
+ visibility?: string | null;
428
400
  message?: string | null;
429
401
  checklist?: Record<string, boolean>;
430
402
  release: Record<string, unknown>;
@@ -1244,6 +1216,8 @@ interface SiglumeClientShape {
1244
1216
  confirm_registration(listing_id: string, options?: {
1245
1217
  manifest?: AppManifest | Record<string, unknown>;
1246
1218
  tool_manual?: ToolManual | Record<string, unknown>;
1219
+ version_bump?: "patch" | "minor" | "major";
1220
+ visibility?: "public" | "private";
1247
1221
  }): Promise<RegistrationConfirmation>;
1248
1222
  preview_quality_score(tool_manual: ToolManual | Record<string, unknown>): Promise<ToolManualQualityReport>;
1249
1223
  submit_review(listing_id: string): Promise<AppListingRecord>;
@@ -1253,12 +1227,6 @@ interface SiglumeClientShape {
1253
1227
  cursor?: string;
1254
1228
  }): Promise<CursorPage<AppListingRecord>>;
1255
1229
  get_listing(listing_id: string): Promise<AppListingRecord>;
1256
- list_company_publishers(): Promise<CompanyPublisherRecord[]>;
1257
- request_company_publish_approval(listing_id: string, note?: string): Promise<AppListingRecord>;
1258
- decide_company_publish_approval(listing_id: string, options: {
1259
- decision: "approve" | "reject";
1260
- reason?: string;
1261
- }): Promise<AppListingRecord>;
1262
1230
  get_capability_state(capability_key: string, save_key?: string): Promise<CapabilitySaveStateRecord>;
1263
1231
  put_capability_state(capability_key: string, save_key?: string, payload?: Record<string, unknown>, options?: {
1264
1232
  schema_version?: string;
@@ -196,9 +196,6 @@ interface AppManifest {
196
196
  support_contact?: string;
197
197
  seller_homepage_url?: string;
198
198
  seller_social_url?: string;
199
- publisher_type?: "user" | "company";
200
- company_id?: string;
201
- publisher_company_id?: string;
202
199
  store_vertical: StoreVertical;
203
200
  compatibility_tags?: string[];
204
201
  example_prompts?: string[];
@@ -329,12 +326,6 @@ interface AppListingRecord {
329
326
  seller_display_name?: string | null;
330
327
  seller_homepage_url?: string | null;
331
328
  seller_social_url?: string | null;
332
- publisher_type?: string | null;
333
- publisher_company_id?: string | null;
334
- company_id?: string | null;
335
- company_name?: string | null;
336
- company_publish_status?: string | null;
337
- company_terms_version?: string | null;
338
329
  review_status?: string | null;
339
330
  review_note?: string | null;
340
331
  submission_blockers: string[];
@@ -343,26 +334,6 @@ interface AppListingRecord {
343
334
  updated_at?: string | null;
344
335
  raw: Record<string, unknown>;
345
336
  }
346
- interface CompanyPublisherRecord {
347
- company_id: string;
348
- name: string;
349
- status: string;
350
- description?: string | null;
351
- is_founder: boolean;
352
- membership_role?: string | null;
353
- membership_status?: string | null;
354
- can_publish: boolean;
355
- can_approve: boolean;
356
- approval_required: boolean;
357
- paid_listing_allowed: boolean;
358
- disabled_reasons: string[];
359
- company_terms_version?: string | null;
360
- active_listing_count: number;
361
- pending_approval_count: number;
362
- settlement_wallet_ready: boolean;
363
- settlement_wallets: Array<Record<string, unknown>>;
364
- raw: Record<string, unknown>;
365
- }
366
337
  interface CapabilitySaveStateRecord {
367
338
  capability_key: string;
368
339
  save_key: string;
@@ -425,6 +396,7 @@ interface RegistrationQuality {
425
396
  interface RegistrationConfirmation {
426
397
  listing_id: string;
427
398
  status: string;
399
+ visibility?: string | null;
428
400
  message?: string | null;
429
401
  checklist?: Record<string, boolean>;
430
402
  release: Record<string, unknown>;
@@ -1244,6 +1216,8 @@ interface SiglumeClientShape {
1244
1216
  confirm_registration(listing_id: string, options?: {
1245
1217
  manifest?: AppManifest | Record<string, unknown>;
1246
1218
  tool_manual?: ToolManual | Record<string, unknown>;
1219
+ version_bump?: "patch" | "minor" | "major";
1220
+ visibility?: "public" | "private";
1247
1221
  }): Promise<RegistrationConfirmation>;
1248
1222
  preview_quality_score(tool_manual: ToolManual | Record<string, unknown>): Promise<ToolManualQualityReport>;
1249
1223
  submit_review(listing_id: string): Promise<AppListingRecord>;
@@ -1253,12 +1227,6 @@ interface SiglumeClientShape {
1253
1227
  cursor?: string;
1254
1228
  }): Promise<CursorPage<AppListingRecord>>;
1255
1229
  get_listing(listing_id: string): Promise<AppListingRecord>;
1256
- list_company_publishers(): Promise<CompanyPublisherRecord[]>;
1257
- request_company_publish_approval(listing_id: string, note?: string): Promise<AppListingRecord>;
1258
- decide_company_publish_approval(listing_id: string, options: {
1259
- decision: "approve" | "reject";
1260
- reason?: string;
1261
- }): Promise<AppListingRecord>;
1262
1230
  get_capability_state(capability_key: string, save_key?: string): Promise<CapabilitySaveStateRecord>;
1263
1231
  put_capability_state(capability_key: string, save_key?: string, payload?: Record<string, unknown>, options?: {
1264
1232
  schema_version?: string;
package/dist/cli/index.js CHANGED
@@ -1506,12 +1506,6 @@ function parseListing(data) {
1506
1506
  seller_display_name: stringOrNull(data.seller_display_name),
1507
1507
  seller_homepage_url: stringOrNull(data.seller_homepage_url),
1508
1508
  seller_social_url: stringOrNull(data.seller_social_url),
1509
- publisher_type: stringOrNull(data.publisher_type),
1510
- publisher_company_id: stringOrNull(data.publisher_company_id),
1511
- company_id: stringOrNull(data.company_id),
1512
- company_name: stringOrNull(data.company_name),
1513
- company_publish_status: stringOrNull(data.company_publish_status),
1514
- company_terms_version: stringOrNull(data.company_terms_version),
1515
1509
  review_status: stringOrNull(data.review_status),
1516
1510
  review_note: stringOrNull(data.review_note),
1517
1511
  submission_blockers: Array.isArray(data.submission_blockers) ? data.submission_blockers.filter((item) => typeof item === "string") : [],
@@ -1521,29 +1515,6 @@ function parseListing(data) {
1521
1515
  raw: { ...data }
1522
1516
  };
1523
1517
  }
1524
- function parseCompanyPublisher(data) {
1525
- const wallets = Array.isArray(data.settlement_wallets) ? data.settlement_wallets.filter((item) => isRecord(item)) : [];
1526
- return {
1527
- company_id: String(data.company_id ?? data.id ?? ""),
1528
- name: String(data.name ?? ""),
1529
- status: String(data.status ?? ""),
1530
- description: stringOrNull(data.description),
1531
- is_founder: Boolean(data.is_founder ?? false),
1532
- membership_role: stringOrNull(data.membership_role),
1533
- membership_status: stringOrNull(data.membership_status),
1534
- can_publish: Boolean(data.can_publish ?? true),
1535
- can_approve: Boolean(data.can_approve ?? false),
1536
- approval_required: Boolean(data.approval_required ?? false),
1537
- paid_listing_allowed: Boolean(data.paid_listing_allowed ?? false),
1538
- disabled_reasons: Array.isArray(data.disabled_reasons) ? data.disabled_reasons.filter((item) => typeof item === "string") : [],
1539
- company_terms_version: stringOrNull(data.company_terms_version),
1540
- active_listing_count: Number(data.active_listing_count ?? 0),
1541
- pending_approval_count: Number(data.pending_approval_count ?? 0),
1542
- settlement_wallet_ready: Boolean(data.settlement_wallet_ready ?? false),
1543
- settlement_wallets: wallets.map((item) => ({ ...item })),
1544
- raw: { ...data }
1545
- };
1546
- }
1547
1518
  function parseCapabilitySaveState(data) {
1548
1519
  return {
1549
1520
  capability_key: String(data.capability_key ?? ""),
@@ -2458,9 +2429,6 @@ var init_client = __esm({
2458
2429
  "support_contact",
2459
2430
  "seller_homepage_url",
2460
2431
  "seller_social_url",
2461
- "publisher_type",
2462
- "company_id",
2463
- "publisher_company_id",
2464
2432
  "store_vertical",
2465
2433
  "jurisdiction",
2466
2434
  "price_model",
@@ -2534,25 +2502,6 @@ var init_client = __esm({
2534
2502
  );
2535
2503
  }
2536
2504
  }
2537
- const explicitPublisherType = payload.publisher_type !== void 0 && payload.publisher_type !== null;
2538
- const companyId = String(payload.company_id ?? "").trim() || String(payload.publisher_company_id ?? "").trim();
2539
- const publisherType = String(payload.publisher_type ?? "user").trim().toLowerCase();
2540
- if (publisherType !== "user" && publisherType !== "company") {
2541
- throw new SiglumeClientError("AppManifest.publisher_type must be 'user' or 'company'.");
2542
- }
2543
- if (publisherType === "company" && !companyId) {
2544
- throw new SiglumeClientError("AppManifest.company_id is required when publisher_type='company'.");
2545
- }
2546
- if (publisherType === "user" && companyId) {
2547
- throw new SiglumeClientError("AppManifest.company_id cannot be combined with publisher_type='user'.");
2548
- }
2549
- if (explicitPublisherType || companyId) {
2550
- payload.publisher_type = publisherType;
2551
- }
2552
- if (companyId) {
2553
- payload.company_id = companyId;
2554
- payload.publisher_company_id = companyId;
2555
- }
2556
2505
  validateManifestPersistenceContract(payload);
2557
2506
  if (payload.manifest && typeof payload.manifest === "object") {
2558
2507
  delete payload.manifest.version;
@@ -2595,8 +2544,12 @@ var init_client = __esm({
2595
2544
  };
2596
2545
  }
2597
2546
  async confirm_registration(listing_id, options = {}) {
2598
- const { version_bump: versionBump } = options;
2547
+ const { version_bump: versionBump, visibility = "public" } = options;
2599
2548
  const payload = { approved: true };
2549
+ if (visibility !== "public" && visibility !== "private") {
2550
+ throw new Error(`visibility must be one of ["public","private"], got ${JSON.stringify(visibility)}`);
2551
+ }
2552
+ payload.visibility = visibility;
2600
2553
  if (versionBump !== void 0) {
2601
2554
  const allowed = ["patch", "minor", "major"];
2602
2555
  if (!allowed.includes(versionBump)) {
@@ -2614,6 +2567,7 @@ var init_client = __esm({
2614
2567
  return {
2615
2568
  listing_id: String(data.listing_id ?? listing_id),
2616
2569
  status: String(data.status ?? ""),
2570
+ visibility: stringOrNull(data.visibility),
2617
2571
  message: stringOrNull(data.message),
2618
2572
  checklist,
2619
2573
  release: toRecord(data.release),
@@ -2660,25 +2614,6 @@ var init_client = __esm({
2660
2614
  const [data] = await this.request("GET", `/market/capabilities/${listing_id}`);
2661
2615
  return parseListing(data);
2662
2616
  }
2663
- async list_company_publishers() {
2664
- const [data] = await this.request("GET", "/market/company-publishers");
2665
- return Array.isArray(data.items) ? data.items.filter((item) => isRecord(item)).map(parseCompanyPublisher) : [];
2666
- }
2667
- async request_company_publish_approval(listing_id, note) {
2668
- const [data] = await this.request("POST", `/market/capabilities/${listing_id}/company-publish-approval`, {
2669
- json_body: note ? { note } : {}
2670
- });
2671
- return parseListing(data);
2672
- }
2673
- async decide_company_publish_approval(listing_id, options) {
2674
- const [data] = await this.request("POST", `/market/capabilities/${listing_id}/company-publish-approval/decision`, {
2675
- json_body: {
2676
- decision: options.decision,
2677
- ...options.reason ? { reason: options.reason } : {}
2678
- }
2679
- });
2680
- return parseListing(data);
2681
- }
2682
2617
  async get_capability_state(capability_key, save_key = "default") {
2683
2618
  const [data] = await this.request("GET", `/market/capability-state/${capability_key}/${save_key}`);
2684
2619
  return parseCapabilitySaveState(data);
@@ -6937,12 +6872,7 @@ function ensureManifestPublisherIdentity(project) {
6937
6872
  const sellerHomepageUrl = String(manifestPayload.seller_homepage_url ?? "").trim();
6938
6873
  const sellerSocialUrl = String(manifestPayload.seller_social_url ?? "").trim();
6939
6874
  const jurisdiction = String(manifestPayload.jurisdiction ?? "").trim();
6940
- const companyId = String(manifestPayload.company_id ?? "").trim() || String(manifestPayload.publisher_company_id ?? "").trim();
6941
- const publisherType = String(manifestPayload.publisher_type ?? "user").trim().toLowerCase();
6942
6875
  const issues = [];
6943
- if (companyId && publisherType !== "company") {
6944
- issues.push('manifest.company_id requires manifest.publisher_type to be "company"');
6945
- }
6946
6876
  if (!docsUrl) {
6947
6877
  issues.push("manifest.docs_url is required");
6948
6878
  } else if (looksLikePlaceholder(docsUrl)) {
@@ -7102,108 +7032,23 @@ ${errors.map((error) => `- ${error}`).join("\n")}`
7102
7032
  }
7103
7033
  return preflight;
7104
7034
  }
7105
- function companyNameSlug(value) {
7106
- return value.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
7107
- }
7108
7035
  async function runRegistration(path = ".", options = {}, deps = {}) {
7109
7036
  const project = await loadProject(path);
7110
- let requestedCompanyId = String(options.company_id ?? "").trim();
7111
- const requestedCompanySlug = String(options.company_slug ?? "").trim();
7112
- let companyPublisherCandidates = null;
7113
- if (requestedCompanySlug) {
7114
- if (requestedCompanyId) {
7115
- throw new SiglumeProjectError("--company and --company-slug cannot be combined.");
7116
- }
7117
- const slug = companyNameSlug(requestedCompanySlug);
7118
- if (!slug && requestedCompanySlug !== requestedCompanyId) {
7119
- throw new SiglumeProjectError(`Company slug ${requestedCompanySlug} is not slug-compatible; use --company <company_id> instead.`);
7120
- }
7121
- }
7122
- if (requestedCompanyId) {
7123
- project.manifest = {
7124
- ...project.manifest,
7125
- publisher_type: "company",
7126
- company_id: requestedCompanyId,
7127
- publisher_company_id: requestedCompanyId
7128
- };
7129
- }
7130
7037
  ensureExplicitToolManual(project);
7131
7038
  ensureManifestPublisherIdentity(project);
7132
7039
  ensureRuntimeValidationReady(project);
7133
7040
  const client = await createClient(deps);
7134
- if (requestedCompanySlug) {
7135
- const slug = companyNameSlug(requestedCompanySlug);
7136
- companyPublisherCandidates = await client.list_company_publishers();
7137
- const matches = companyPublisherCandidates.filter(
7138
- (item) => companyNameSlug(item.name || item.company_id) === slug || item.company_id === requestedCompanySlug
7139
- );
7140
- if (matches.length === 0) {
7141
- throw new SiglumeProjectError(`Company slug ${requestedCompanySlug} is not available to this API key.`);
7142
- }
7143
- if (matches.length > 1) {
7144
- throw new SiglumeProjectError(`Company slug ${requestedCompanySlug} is ambiguous; use --company <company_id> instead.`);
7145
- }
7146
- const match = matches[0];
7147
- if (!match) {
7148
- throw new SiglumeProjectError(`Company slug ${requestedCompanySlug} is not available to this API key.`);
7149
- }
7150
- if (match.can_publish === false) {
7151
- const disabledReasons = match.disabled_reasons ?? [];
7152
- const reasons = disabledReasons.length > 0 ? disabledReasons.join(", ") : "company publisher is disabled";
7153
- throw new SiglumeProjectError(`Company ${match.company_id} cannot publish: ${reasons}.`);
7154
- }
7155
- requestedCompanyId = match.company_id;
7156
- project.manifest = {
7157
- ...project.manifest,
7158
- publisher_type: "company",
7159
- company_id: requestedCompanyId,
7160
- publisher_company_id: requestedCompanyId
7161
- };
7162
- }
7163
7041
  const preflight = await registrationPreflight(project, client);
7164
- let companyPublisherPreflight = null;
7165
- const companyId = String(project.manifest.company_id ?? "").trim() || String(project.manifest.publisher_company_id ?? "").trim();
7166
- const publisherType = String(project.manifest.publisher_type ?? "user").toLowerCase();
7167
- if (publisherType === "company") {
7168
- if (!companyId) {
7169
- throw new SiglumeProjectError("Company registration requires --company <company_id> or manifest.company_id.");
7170
- }
7171
- const companies = companyPublisherCandidates ?? await client.list_company_publishers();
7172
- companyPublisherCandidates = companies;
7173
- const company = companies.find((item) => item.company_id === companyId);
7174
- if (!company) {
7175
- throw new SiglumeProjectError(`Company ${companyId} is not available to this API key.`);
7176
- }
7177
- if (company.can_publish === false) {
7178
- const disabledReasons = company.disabled_reasons ?? [];
7179
- const reasons = disabledReasons.length > 0 ? disabledReasons.join(", ") : "company publisher is disabled";
7180
- throw new SiglumeProjectError(`Company ${companyId} cannot publish: ${reasons}.`);
7181
- }
7182
- companyPublisherPreflight = company;
7183
- }
7184
7042
  let developerPortalPreflight = null;
7185
7043
  if (String(project.manifest.price_model ?? "free").toLowerCase() !== "free") {
7186
- if (publisherType === "company") {
7187
- const company = companyPublisherPreflight;
7188
- if (!company) {
7189
- throw new SiglumeProjectError(`Company ${companyId} is not available to this API key.`);
7190
- }
7191
- if (company.settlement_wallet_ready !== true) {
7192
- throw new SiglumeProjectError(
7193
- `Paid company registration requires a verified company settlement wallet for ${company.name}. Open the company settings and complete settlement readiness before registering.`
7194
- );
7195
- }
7196
- developerPortalPreflight = { company_publisher: toJsonable(company) };
7197
- } else {
7198
- const portal = await client.get_developer_portal();
7199
- const verifiedDestination = portal.payout_readiness?.verified_destination;
7200
- if (verifiedDestination !== true) {
7201
- throw new SiglumeProjectError(
7202
- "Paid API registration requires a verified Polygon payout destination. Open https://siglume.com/owner/credits/payout and confirm the embedded-wallet payout token, or call GET /v1/market/developer/portal until payout_readiness.verified_destination is true."
7203
- );
7204
- }
7205
- developerPortalPreflight = toJsonable(portal);
7044
+ const portal = await client.get_developer_portal();
7045
+ const verifiedDestination = portal.payout_readiness?.verified_destination;
7046
+ if (verifiedDestination !== true) {
7047
+ throw new SiglumeProjectError(
7048
+ "Paid API registration requires a verified Polygon payout destination. Open https://siglume.com/owner/credits/payout and confirm the embedded-wallet payout token, or call GET /v1/market/developer/portal until payout_readiness.verified_destination is true."
7049
+ );
7206
7050
  }
7051
+ developerPortalPreflight = toJsonable(portal);
7207
7052
  }
7208
7053
  const receipt = await client.auto_register(project.manifest, project.tool_manual, {
7209
7054
  runtime_validation: project.runtime_validation
@@ -7218,7 +7063,9 @@ async function runRegistration(path = ".", options = {}, deps = {}) {
7218
7063
  }
7219
7064
  const shouldConfirm = Boolean(options.confirm) || options.confirm === void 0 && !options.draft_only && !options.submit_review;
7220
7065
  if (shouldConfirm) {
7221
- result.confirmation = toJsonable(await client.confirm_registration(receipt.listing_id));
7066
+ result.confirmation = toJsonable(await client.confirm_registration(receipt.listing_id, {
7067
+ visibility: options.confirm_visibility ?? "public"
7068
+ }));
7222
7069
  if (options.submit_review) {
7223
7070
  result.submit_review_skipped = true;
7224
7071
  }
@@ -7272,14 +7119,6 @@ async function getUsageReport(options, deps = {}) {
7272
7119
  count: items.length
7273
7120
  };
7274
7121
  }
7275
- async function listCompanyPublishersReport(deps = {}) {
7276
- const client = await createClient(deps);
7277
- const companies = await client.list_company_publishers();
7278
- return {
7279
- companies: companies.map((item) => toJsonable(item)),
7280
- count: companies.length
7281
- };
7282
- }
7283
7122
  async function diffJsonFiles(oldPath, newPath) {
7284
7123
  const oldPayload = await loadJsonDocument(oldPath);
7285
7124
  const newPayload = await loadJsonDocument(newPath);
@@ -8348,24 +8187,6 @@ function renderOperationTable(operations) {
8348
8187
  ...rows.map((row) => row.map((cell, index) => cell.padEnd(widths[index] ?? cell.length)).join(" "))
8349
8188
  ];
8350
8189
  }
8351
- function renderCompanyTable(companies) {
8352
- const rows = companies.map((item) => [
8353
- String(item.company_id ?? item.id ?? ""),
8354
- String(item.name ?? ""),
8355
- String(item.membership_role ?? (item.is_founder ? "founder" : "")),
8356
- String(item.settlement_wallet_ready === true ? "ready" : "not_ready"),
8357
- String(item.pending_approval_count ?? 0)
8358
- ]);
8359
- const headers = ["company_id", "name", "role", "settlement", "pending"];
8360
- const widths = headers.map(
8361
- (header, index) => Math.max(header.length, ...rows.map((row) => row[index]?.length ?? 0))
8362
- );
8363
- return [
8364
- headers.map((header, index) => header.padEnd(widths[index] ?? header.length)).join(" "),
8365
- widths.map((width) => "-".repeat(width)).join(" "),
8366
- ...rows.map((row) => row.map((cell, index) => cell.padEnd(widths[index] ?? cell.length)).join(" "))
8367
- ];
8368
- }
8369
8190
  async function runCli(argv, deps = {}) {
8370
8191
  const stdout = deps.stdout;
8371
8192
  const stderr = deps.stderr ?? console.error;
@@ -8521,42 +8342,44 @@ async function runCli(argv, deps = {}) {
8521
8342
  }
8522
8343
  if (report.runtime_validation_path) emit(stdout, `runtime_validation_path: ${String(report.runtime_validation_path)}`);
8523
8344
  });
8524
- program.command("companies").description("List Siglume companies available for company-name publishing.").option("--json", "emit machine-readable JSON", false).action(async (options) => {
8525
- const report = await listCompanyPublishersReport(deps);
8526
- if (options.json) {
8527
- emit(stdout, renderJson(report));
8528
- return;
8529
- }
8530
- const companies = Array.isArray(report.companies) ? report.companies.filter((item) => Boolean(item && typeof item === "object")) : [];
8531
- if (companies.length === 0) {
8532
- emit(stdout, "No company publishers available for this API key.");
8533
- return;
8534
- }
8535
- emit(stdout, "Company publishers");
8536
- renderCompanyTable(companies).forEach((line) => emit(stdout, line));
8537
- });
8538
- 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("--company <companyId>", "publish under a Siglume company name; revenue is split equally among active members", "").option("--company-slug <slug>", "publish under a Siglume company by matching the slugified company name", "").option("--json", "emit machine-readable JSON", false).argument("[path]", ".", "project path").action(async (path, options) => {
8345
+ 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) => {
8539
8346
  const draftOnly = Boolean(options.draftOnly);
8347
+ const privateConfirm = Boolean(options.privateConfirm);
8540
8348
  if (draftOnly && options.confirm) {
8541
8349
  throw new SiglumeProjectError("--draft-only cannot be combined with --confirm.");
8542
8350
  }
8351
+ if (draftOnly && privateConfirm) {
8352
+ throw new SiglumeProjectError("--draft-only cannot be combined with --private-confirm.");
8353
+ }
8354
+ if (options.confirm && privateConfirm) {
8355
+ throw new SiglumeProjectError("--confirm cannot be combined with --private-confirm.");
8356
+ }
8543
8357
  if (draftOnly && options.submitReview) {
8544
8358
  throw new SiglumeProjectError("--draft-only cannot be combined with --submit-review.");
8545
8359
  }
8546
- const shouldConfirm = Boolean(options.confirm) || !draftOnly && !options.submitReview;
8360
+ if (privateConfirm && options.submitReview) {
8361
+ throw new SiglumeProjectError("--private-confirm cannot be combined with --submit-review.");
8362
+ }
8363
+ const shouldConfirm = Boolean(options.confirm) || privateConfirm || !draftOnly && !options.submitReview;
8547
8364
  const report = await runRegistration(path, {
8548
8365
  confirm: shouldConfirm,
8366
+ confirm_visibility: privateConfirm ? "private" : "public",
8549
8367
  draft_only: draftOnly,
8550
- submit_review: options.submitReview,
8551
- company_id: options.company,
8552
- company_slug: options.companySlug
8368
+ submit_review: options.submitReview
8553
8369
  }, deps);
8370
+ if (privateConfirm && report.confirmation && !report.confirmation.visibility) {
8371
+ report.confirmation.visibility = "private";
8372
+ }
8554
8373
  if (options.json) {
8555
8374
  emit(stdout, renderJson(report));
8556
8375
  } else {
8557
8376
  const receipt = report.receipt;
8558
- const published = Boolean(report.confirmation || report.review);
8559
- if (published && receipt.registration_mode === "upgrade") {
8377
+ const confirmationSummary = report.confirmation;
8378
+ const privatelyConfirmed = confirmationSummary?.visibility === "private";
8379
+ const published = !privatelyConfirmed && Boolean(report.confirmation || report.review);
8380
+ if (privatelyConfirmed) {
8381
+ emit(stdout, "Registration privately confirmed.");
8382
+ } else if (published && receipt.registration_mode === "upgrade") {
8560
8383
  emit(stdout, "Upgrade registered.");
8561
8384
  } else if (published) {
8562
8385
  emit(stdout, "Registration accepted.");
@@ -8575,8 +8398,9 @@ async function runCli(argv, deps = {}) {
8575
8398
  if (receipt.request_id) emit(stdout, `request_id: ${receipt.request_id}`);
8576
8399
  if (report.confirmation) {
8577
8400
  const confirmation = report.confirmation;
8578
- emit(stdout, "Listing published.");
8401
+ emit(stdout, confirmation.visibility === "private" ? "Listing confirmed privately for production testing." : "Listing published.");
8579
8402
  if (confirmation.status) emit(stdout, `confirmation_status: ${confirmation.status}`);
8403
+ if (confirmation.visibility) emit(stdout, `confirmation_visibility: ${confirmation.visibility}`);
8580
8404
  if (confirmation.release?.release_status) emit(stdout, `release_status: ${confirmation.release.release_status}`);
8581
8405
  } else if (report.review) {
8582
8406
  const review = report.review;