@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.
- package/README.md +9 -10
- package/dist/bin/siglume.cjs +41 -217
- package/dist/bin/siglume.cjs.map +1 -1
- package/dist/bin/siglume.js +41 -217
- package/dist/bin/siglume.js.map +1 -1
- package/dist/cli/index.cjs +41 -217
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +3 -35
- package/dist/cli/index.d.ts +3 -35
- package/dist/cli/index.js +41 -217
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +6 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -42
- package/dist/index.d.ts +5 -42
- package/dist/index.js +6 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,9 +66,8 @@ 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
|
-
siglume companies # list company publishers available to this key
|
|
71
|
-
siglume register . --company company_123
|
|
72
71
|
```
|
|
73
72
|
|
|
74
73
|
`siglume register` reads `tool_manual.json`, the local Git-ignored
|
|
@@ -77,12 +76,18 @@ Git-ignored because they hold the runtime auth header shared secret. SDK / HTTP
|
|
|
77
76
|
`source_url`, `source_context`, and `input_form_spec` directly to
|
|
78
77
|
`auto-register`. The CLI runs preflight by default, then calls the same
|
|
79
78
|
`auto-register` route used by SDK / automation clients and confirms publication
|
|
80
|
-
unless `--draft-only` is set.
|
|
81
|
-
|
|
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
|
|
82
82
|
includes runtime checks, contract checks, external OAuth declaration checks, pricing / payout
|
|
83
83
|
rules, and a mandatory fail-closed LLM legal review for law compliance plus
|
|
84
84
|
public-order / morals compliance.
|
|
85
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
|
+
|
|
86
91
|
## Usage-Based And Per-Action Billing
|
|
87
92
|
|
|
88
93
|
For the canonical pricing reference, see
|
|
@@ -167,12 +172,6 @@ After live or sandbox execution, inspect receipts with `siglume dev tail`,
|
|
|
167
172
|
publisher listing view is privacy-redacted. See
|
|
168
173
|
[`../docs/developer-observability.md`](../docs/developer-observability.md).
|
|
169
174
|
|
|
170
|
-
Company-name publishing is founder-only in the Phase 2 MVP. Use
|
|
171
|
-
`publisher_type: "company"` with `company_id` in `app_manifest.yaml`, or pass
|
|
172
|
-
`--company <company_id>` to the CLI. Paid company listings require the
|
|
173
|
-
company's verified settlement wallet; Siglume does not fall back to the
|
|
174
|
-
registrant's personal payout wallet.
|
|
175
|
-
|
|
176
175
|
Game APIs use the same publishing flow. To make a listing eligible for the
|
|
177
176
|
dedicated Game API Store entry point, include explicit game-oriented
|
|
178
177
|
`compatibility_tags` in the manifest, for example `["game", "unity",
|
package/dist/bin/siglume.cjs
CHANGED
|
@@ -1527,12 +1527,6 @@ function parseListing(data) {
|
|
|
1527
1527
|
seller_display_name: stringOrNull(data.seller_display_name),
|
|
1528
1528
|
seller_homepage_url: stringOrNull(data.seller_homepage_url),
|
|
1529
1529
|
seller_social_url: stringOrNull(data.seller_social_url),
|
|
1530
|
-
publisher_type: stringOrNull(data.publisher_type),
|
|
1531
|
-
publisher_company_id: stringOrNull(data.publisher_company_id),
|
|
1532
|
-
company_id: stringOrNull(data.company_id),
|
|
1533
|
-
company_name: stringOrNull(data.company_name),
|
|
1534
|
-
company_publish_status: stringOrNull(data.company_publish_status),
|
|
1535
|
-
company_terms_version: stringOrNull(data.company_terms_version),
|
|
1536
1530
|
review_status: stringOrNull(data.review_status),
|
|
1537
1531
|
review_note: stringOrNull(data.review_note),
|
|
1538
1532
|
submission_blockers: Array.isArray(data.submission_blockers) ? data.submission_blockers.filter((item) => typeof item === "string") : [],
|
|
@@ -1542,29 +1536,6 @@ function parseListing(data) {
|
|
|
1542
1536
|
raw: { ...data }
|
|
1543
1537
|
};
|
|
1544
1538
|
}
|
|
1545
|
-
function parseCompanyPublisher(data) {
|
|
1546
|
-
const wallets = Array.isArray(data.settlement_wallets) ? data.settlement_wallets.filter((item) => isRecord(item)) : [];
|
|
1547
|
-
return {
|
|
1548
|
-
company_id: String(data.company_id ?? data.id ?? ""),
|
|
1549
|
-
name: String(data.name ?? ""),
|
|
1550
|
-
status: String(data.status ?? ""),
|
|
1551
|
-
description: stringOrNull(data.description),
|
|
1552
|
-
is_founder: Boolean(data.is_founder ?? false),
|
|
1553
|
-
membership_role: stringOrNull(data.membership_role),
|
|
1554
|
-
membership_status: stringOrNull(data.membership_status),
|
|
1555
|
-
can_publish: Boolean(data.can_publish ?? true),
|
|
1556
|
-
can_approve: Boolean(data.can_approve ?? false),
|
|
1557
|
-
approval_required: Boolean(data.approval_required ?? false),
|
|
1558
|
-
paid_listing_allowed: Boolean(data.paid_listing_allowed ?? false),
|
|
1559
|
-
disabled_reasons: Array.isArray(data.disabled_reasons) ? data.disabled_reasons.filter((item) => typeof item === "string") : [],
|
|
1560
|
-
company_terms_version: stringOrNull(data.company_terms_version),
|
|
1561
|
-
active_listing_count: Number(data.active_listing_count ?? 0),
|
|
1562
|
-
pending_approval_count: Number(data.pending_approval_count ?? 0),
|
|
1563
|
-
settlement_wallet_ready: Boolean(data.settlement_wallet_ready ?? false),
|
|
1564
|
-
settlement_wallets: wallets.map((item) => ({ ...item })),
|
|
1565
|
-
raw: { ...data }
|
|
1566
|
-
};
|
|
1567
|
-
}
|
|
1568
1539
|
function parseCapabilitySaveState(data) {
|
|
1569
1540
|
return {
|
|
1570
1541
|
capability_key: String(data.capability_key ?? ""),
|
|
@@ -2479,9 +2450,6 @@ var init_client = __esm({
|
|
|
2479
2450
|
"support_contact",
|
|
2480
2451
|
"seller_homepage_url",
|
|
2481
2452
|
"seller_social_url",
|
|
2482
|
-
"publisher_type",
|
|
2483
|
-
"company_id",
|
|
2484
|
-
"publisher_company_id",
|
|
2485
2453
|
"store_vertical",
|
|
2486
2454
|
"jurisdiction",
|
|
2487
2455
|
"price_model",
|
|
@@ -2555,25 +2523,6 @@ var init_client = __esm({
|
|
|
2555
2523
|
);
|
|
2556
2524
|
}
|
|
2557
2525
|
}
|
|
2558
|
-
const explicitPublisherType = payload.publisher_type !== void 0 && payload.publisher_type !== null;
|
|
2559
|
-
const companyId = String(payload.company_id ?? "").trim() || String(payload.publisher_company_id ?? "").trim();
|
|
2560
|
-
const publisherType = String(payload.publisher_type ?? "user").trim().toLowerCase();
|
|
2561
|
-
if (publisherType !== "user" && publisherType !== "company") {
|
|
2562
|
-
throw new SiglumeClientError("AppManifest.publisher_type must be 'user' or 'company'.");
|
|
2563
|
-
}
|
|
2564
|
-
if (publisherType === "company" && !companyId) {
|
|
2565
|
-
throw new SiglumeClientError("AppManifest.company_id is required when publisher_type='company'.");
|
|
2566
|
-
}
|
|
2567
|
-
if (publisherType === "user" && companyId) {
|
|
2568
|
-
throw new SiglumeClientError("AppManifest.company_id cannot be combined with publisher_type='user'.");
|
|
2569
|
-
}
|
|
2570
|
-
if (explicitPublisherType || companyId) {
|
|
2571
|
-
payload.publisher_type = publisherType;
|
|
2572
|
-
}
|
|
2573
|
-
if (companyId) {
|
|
2574
|
-
payload.company_id = companyId;
|
|
2575
|
-
payload.publisher_company_id = companyId;
|
|
2576
|
-
}
|
|
2577
2526
|
validateManifestPersistenceContract(payload);
|
|
2578
2527
|
if (payload.manifest && typeof payload.manifest === "object") {
|
|
2579
2528
|
delete payload.manifest.version;
|
|
@@ -2616,8 +2565,12 @@ var init_client = __esm({
|
|
|
2616
2565
|
};
|
|
2617
2566
|
}
|
|
2618
2567
|
async confirm_registration(listing_id, options = {}) {
|
|
2619
|
-
const { version_bump: versionBump } = options;
|
|
2568
|
+
const { version_bump: versionBump, visibility = "public" } = options;
|
|
2620
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;
|
|
2621
2574
|
if (versionBump !== void 0) {
|
|
2622
2575
|
const allowed = ["patch", "minor", "major"];
|
|
2623
2576
|
if (!allowed.includes(versionBump)) {
|
|
@@ -2635,6 +2588,7 @@ var init_client = __esm({
|
|
|
2635
2588
|
return {
|
|
2636
2589
|
listing_id: String(data.listing_id ?? listing_id),
|
|
2637
2590
|
status: String(data.status ?? ""),
|
|
2591
|
+
visibility: stringOrNull(data.visibility),
|
|
2638
2592
|
message: stringOrNull(data.message),
|
|
2639
2593
|
checklist,
|
|
2640
2594
|
release: toRecord(data.release),
|
|
@@ -2681,25 +2635,6 @@ var init_client = __esm({
|
|
|
2681
2635
|
const [data] = await this.request("GET", `/market/capabilities/${listing_id}`);
|
|
2682
2636
|
return parseListing(data);
|
|
2683
2637
|
}
|
|
2684
|
-
async list_company_publishers() {
|
|
2685
|
-
const [data] = await this.request("GET", "/market/company-publishers");
|
|
2686
|
-
return Array.isArray(data.items) ? data.items.filter((item) => isRecord(item)).map(parseCompanyPublisher) : [];
|
|
2687
|
-
}
|
|
2688
|
-
async request_company_publish_approval(listing_id, note) {
|
|
2689
|
-
const [data] = await this.request("POST", `/market/capabilities/${listing_id}/company-publish-approval`, {
|
|
2690
|
-
json_body: note ? { note } : {}
|
|
2691
|
-
});
|
|
2692
|
-
return parseListing(data);
|
|
2693
|
-
}
|
|
2694
|
-
async decide_company_publish_approval(listing_id, options) {
|
|
2695
|
-
const [data] = await this.request("POST", `/market/capabilities/${listing_id}/company-publish-approval/decision`, {
|
|
2696
|
-
json_body: {
|
|
2697
|
-
decision: options.decision,
|
|
2698
|
-
...options.reason ? { reason: options.reason } : {}
|
|
2699
|
-
}
|
|
2700
|
-
});
|
|
2701
|
-
return parseListing(data);
|
|
2702
|
-
}
|
|
2703
2638
|
async get_capability_state(capability_key, save_key = "default") {
|
|
2704
2639
|
const [data] = await this.request("GET", `/market/capability-state/${capability_key}/${save_key}`);
|
|
2705
2640
|
return parseCapabilitySaveState(data);
|
|
@@ -6958,12 +6893,7 @@ function ensureManifestPublisherIdentity(project) {
|
|
|
6958
6893
|
const sellerHomepageUrl = String(manifestPayload.seller_homepage_url ?? "").trim();
|
|
6959
6894
|
const sellerSocialUrl = String(manifestPayload.seller_social_url ?? "").trim();
|
|
6960
6895
|
const jurisdiction = String(manifestPayload.jurisdiction ?? "").trim();
|
|
6961
|
-
const companyId = String(manifestPayload.company_id ?? "").trim() || String(manifestPayload.publisher_company_id ?? "").trim();
|
|
6962
|
-
const publisherType = String(manifestPayload.publisher_type ?? "user").trim().toLowerCase();
|
|
6963
6896
|
const issues = [];
|
|
6964
|
-
if (companyId && publisherType !== "company") {
|
|
6965
|
-
issues.push('manifest.company_id requires manifest.publisher_type to be "company"');
|
|
6966
|
-
}
|
|
6967
6897
|
if (!docsUrl) {
|
|
6968
6898
|
issues.push("manifest.docs_url is required");
|
|
6969
6899
|
} else if (looksLikePlaceholder(docsUrl)) {
|
|
@@ -7123,108 +7053,23 @@ ${errors.map((error) => `- ${error}`).join("\n")}`
|
|
|
7123
7053
|
}
|
|
7124
7054
|
return preflight;
|
|
7125
7055
|
}
|
|
7126
|
-
function companyNameSlug(value) {
|
|
7127
|
-
return value.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
7128
|
-
}
|
|
7129
7056
|
async function runRegistration(path = ".", options = {}, deps = {}) {
|
|
7130
7057
|
const project = await loadProject(path);
|
|
7131
|
-
let requestedCompanyId = String(options.company_id ?? "").trim();
|
|
7132
|
-
const requestedCompanySlug = String(options.company_slug ?? "").trim();
|
|
7133
|
-
let companyPublisherCandidates = null;
|
|
7134
|
-
if (requestedCompanySlug) {
|
|
7135
|
-
if (requestedCompanyId) {
|
|
7136
|
-
throw new SiglumeProjectError("--company and --company-slug cannot be combined.");
|
|
7137
|
-
}
|
|
7138
|
-
const slug = companyNameSlug(requestedCompanySlug);
|
|
7139
|
-
if (!slug && requestedCompanySlug !== requestedCompanyId) {
|
|
7140
|
-
throw new SiglumeProjectError(`Company slug ${requestedCompanySlug} is not slug-compatible; use --company <company_id> instead.`);
|
|
7141
|
-
}
|
|
7142
|
-
}
|
|
7143
|
-
if (requestedCompanyId) {
|
|
7144
|
-
project.manifest = {
|
|
7145
|
-
...project.manifest,
|
|
7146
|
-
publisher_type: "company",
|
|
7147
|
-
company_id: requestedCompanyId,
|
|
7148
|
-
publisher_company_id: requestedCompanyId
|
|
7149
|
-
};
|
|
7150
|
-
}
|
|
7151
7058
|
ensureExplicitToolManual(project);
|
|
7152
7059
|
ensureManifestPublisherIdentity(project);
|
|
7153
7060
|
ensureRuntimeValidationReady(project);
|
|
7154
7061
|
const client = await createClient(deps);
|
|
7155
|
-
if (requestedCompanySlug) {
|
|
7156
|
-
const slug = companyNameSlug(requestedCompanySlug);
|
|
7157
|
-
companyPublisherCandidates = await client.list_company_publishers();
|
|
7158
|
-
const matches = companyPublisherCandidates.filter(
|
|
7159
|
-
(item) => companyNameSlug(item.name || item.company_id) === slug || item.company_id === requestedCompanySlug
|
|
7160
|
-
);
|
|
7161
|
-
if (matches.length === 0) {
|
|
7162
|
-
throw new SiglumeProjectError(`Company slug ${requestedCompanySlug} is not available to this API key.`);
|
|
7163
|
-
}
|
|
7164
|
-
if (matches.length > 1) {
|
|
7165
|
-
throw new SiglumeProjectError(`Company slug ${requestedCompanySlug} is ambiguous; use --company <company_id> instead.`);
|
|
7166
|
-
}
|
|
7167
|
-
const match = matches[0];
|
|
7168
|
-
if (!match) {
|
|
7169
|
-
throw new SiglumeProjectError(`Company slug ${requestedCompanySlug} is not available to this API key.`);
|
|
7170
|
-
}
|
|
7171
|
-
if (match.can_publish === false) {
|
|
7172
|
-
const disabledReasons = match.disabled_reasons ?? [];
|
|
7173
|
-
const reasons = disabledReasons.length > 0 ? disabledReasons.join(", ") : "company publisher is disabled";
|
|
7174
|
-
throw new SiglumeProjectError(`Company ${match.company_id} cannot publish: ${reasons}.`);
|
|
7175
|
-
}
|
|
7176
|
-
requestedCompanyId = match.company_id;
|
|
7177
|
-
project.manifest = {
|
|
7178
|
-
...project.manifest,
|
|
7179
|
-
publisher_type: "company",
|
|
7180
|
-
company_id: requestedCompanyId,
|
|
7181
|
-
publisher_company_id: requestedCompanyId
|
|
7182
|
-
};
|
|
7183
|
-
}
|
|
7184
7062
|
const preflight = await registrationPreflight(project, client);
|
|
7185
|
-
let companyPublisherPreflight = null;
|
|
7186
|
-
const companyId = String(project.manifest.company_id ?? "").trim() || String(project.manifest.publisher_company_id ?? "").trim();
|
|
7187
|
-
const publisherType = String(project.manifest.publisher_type ?? "user").toLowerCase();
|
|
7188
|
-
if (publisherType === "company") {
|
|
7189
|
-
if (!companyId) {
|
|
7190
|
-
throw new SiglumeProjectError("Company registration requires --company <company_id> or manifest.company_id.");
|
|
7191
|
-
}
|
|
7192
|
-
const companies = companyPublisherCandidates ?? await client.list_company_publishers();
|
|
7193
|
-
companyPublisherCandidates = companies;
|
|
7194
|
-
const company = companies.find((item) => item.company_id === companyId);
|
|
7195
|
-
if (!company) {
|
|
7196
|
-
throw new SiglumeProjectError(`Company ${companyId} is not available to this API key.`);
|
|
7197
|
-
}
|
|
7198
|
-
if (company.can_publish === false) {
|
|
7199
|
-
const disabledReasons = company.disabled_reasons ?? [];
|
|
7200
|
-
const reasons = disabledReasons.length > 0 ? disabledReasons.join(", ") : "company publisher is disabled";
|
|
7201
|
-
throw new SiglumeProjectError(`Company ${companyId} cannot publish: ${reasons}.`);
|
|
7202
|
-
}
|
|
7203
|
-
companyPublisherPreflight = company;
|
|
7204
|
-
}
|
|
7205
7063
|
let developerPortalPreflight = null;
|
|
7206
7064
|
if (String(project.manifest.price_model ?? "free").toLowerCase() !== "free") {
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
throw new SiglumeProjectError(
|
|
7214
|
-
`Paid company registration requires a verified company settlement wallet for ${company.name}. Open the company settings and complete settlement readiness before registering.`
|
|
7215
|
-
);
|
|
7216
|
-
}
|
|
7217
|
-
developerPortalPreflight = { company_publisher: toJsonable(company) };
|
|
7218
|
-
} else {
|
|
7219
|
-
const portal = await client.get_developer_portal();
|
|
7220
|
-
const verifiedDestination = portal.payout_readiness?.verified_destination;
|
|
7221
|
-
if (verifiedDestination !== true) {
|
|
7222
|
-
throw new SiglumeProjectError(
|
|
7223
|
-
"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."
|
|
7224
|
-
);
|
|
7225
|
-
}
|
|
7226
|
-
developerPortalPreflight = toJsonable(portal);
|
|
7065
|
+
const portal = await client.get_developer_portal();
|
|
7066
|
+
const verifiedDestination = portal.payout_readiness?.verified_destination;
|
|
7067
|
+
if (verifiedDestination !== true) {
|
|
7068
|
+
throw new SiglumeProjectError(
|
|
7069
|
+
"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."
|
|
7070
|
+
);
|
|
7227
7071
|
}
|
|
7072
|
+
developerPortalPreflight = toJsonable(portal);
|
|
7228
7073
|
}
|
|
7229
7074
|
const receipt = await client.auto_register(project.manifest, project.tool_manual, {
|
|
7230
7075
|
runtime_validation: project.runtime_validation
|
|
@@ -7239,7 +7084,9 @@ async function runRegistration(path = ".", options = {}, deps = {}) {
|
|
|
7239
7084
|
}
|
|
7240
7085
|
const shouldConfirm = Boolean(options.confirm) || options.confirm === void 0 && !options.draft_only && !options.submit_review;
|
|
7241
7086
|
if (shouldConfirm) {
|
|
7242
|
-
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
|
+
}));
|
|
7243
7090
|
if (options.submit_review) {
|
|
7244
7091
|
result.submit_review_skipped = true;
|
|
7245
7092
|
}
|
|
@@ -7293,14 +7140,6 @@ async function getUsageReport(options, deps = {}) {
|
|
|
7293
7140
|
count: items.length
|
|
7294
7141
|
};
|
|
7295
7142
|
}
|
|
7296
|
-
async function listCompanyPublishersReport(deps = {}) {
|
|
7297
|
-
const client = await createClient(deps);
|
|
7298
|
-
const companies = await client.list_company_publishers();
|
|
7299
|
-
return {
|
|
7300
|
-
companies: companies.map((item) => toJsonable(item)),
|
|
7301
|
-
count: companies.length
|
|
7302
|
-
};
|
|
7303
|
-
}
|
|
7304
7143
|
async function diffJsonFiles(oldPath, newPath) {
|
|
7305
7144
|
const oldPayload = await loadJsonDocument(oldPath);
|
|
7306
7145
|
const newPayload = await loadJsonDocument(newPath);
|
|
@@ -8369,24 +8208,6 @@ function renderOperationTable(operations) {
|
|
|
8369
8208
|
...rows.map((row) => row.map((cell, index) => cell.padEnd(widths[index] ?? cell.length)).join(" "))
|
|
8370
8209
|
];
|
|
8371
8210
|
}
|
|
8372
|
-
function renderCompanyTable(companies) {
|
|
8373
|
-
const rows = companies.map((item) => [
|
|
8374
|
-
String(item.company_id ?? item.id ?? ""),
|
|
8375
|
-
String(item.name ?? ""),
|
|
8376
|
-
String(item.membership_role ?? (item.is_founder ? "founder" : "")),
|
|
8377
|
-
String(item.settlement_wallet_ready === true ? "ready" : "not_ready"),
|
|
8378
|
-
String(item.pending_approval_count ?? 0)
|
|
8379
|
-
]);
|
|
8380
|
-
const headers = ["company_id", "name", "role", "settlement", "pending"];
|
|
8381
|
-
const widths = headers.map(
|
|
8382
|
-
(header, index) => Math.max(header.length, ...rows.map((row) => row[index]?.length ?? 0))
|
|
8383
|
-
);
|
|
8384
|
-
return [
|
|
8385
|
-
headers.map((header, index) => header.padEnd(widths[index] ?? header.length)).join(" "),
|
|
8386
|
-
widths.map((width) => "-".repeat(width)).join(" "),
|
|
8387
|
-
...rows.map((row) => row.map((cell, index) => cell.padEnd(widths[index] ?? cell.length)).join(" "))
|
|
8388
|
-
];
|
|
8389
|
-
}
|
|
8390
8211
|
async function runCli(argv, deps = {}) {
|
|
8391
8212
|
const stdout = deps.stdout;
|
|
8392
8213
|
const stderr = deps.stderr ?? console.error;
|
|
@@ -8542,42 +8363,44 @@ async function runCli(argv, deps = {}) {
|
|
|
8542
8363
|
}
|
|
8543
8364
|
if (report.runtime_validation_path) emit(stdout, `runtime_validation_path: ${String(report.runtime_validation_path)}`);
|
|
8544
8365
|
});
|
|
8545
|
-
program.command("
|
|
8546
|
-
const report = await listCompanyPublishersReport(deps);
|
|
8547
|
-
if (options.json) {
|
|
8548
|
-
emit(stdout, renderJson(report));
|
|
8549
|
-
return;
|
|
8550
|
-
}
|
|
8551
|
-
const companies = Array.isArray(report.companies) ? report.companies.filter((item) => Boolean(item && typeof item === "object")) : [];
|
|
8552
|
-
if (companies.length === 0) {
|
|
8553
|
-
emit(stdout, "No company publishers available for this API key.");
|
|
8554
|
-
return;
|
|
8555
|
-
}
|
|
8556
|
-
emit(stdout, "Company publishers");
|
|
8557
|
-
renderCompanyTable(companies).forEach((line) => emit(stdout, line));
|
|
8558
|
-
});
|
|
8559
|
-
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) => {
|
|
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) => {
|
|
8560
8367
|
const draftOnly = Boolean(options.draftOnly);
|
|
8368
|
+
const privateConfirm = Boolean(options.privateConfirm);
|
|
8561
8369
|
if (draftOnly && options.confirm) {
|
|
8562
8370
|
throw new SiglumeProjectError("--draft-only cannot be combined with --confirm.");
|
|
8563
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
|
+
}
|
|
8564
8378
|
if (draftOnly && options.submitReview) {
|
|
8565
8379
|
throw new SiglumeProjectError("--draft-only cannot be combined with --submit-review.");
|
|
8566
8380
|
}
|
|
8567
|
-
|
|
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;
|
|
8568
8385
|
const report = await runRegistration(path, {
|
|
8569
8386
|
confirm: shouldConfirm,
|
|
8387
|
+
confirm_visibility: privateConfirm ? "private" : "public",
|
|
8570
8388
|
draft_only: draftOnly,
|
|
8571
|
-
submit_review: options.submitReview
|
|
8572
|
-
company_id: options.company,
|
|
8573
|
-
company_slug: options.companySlug
|
|
8389
|
+
submit_review: options.submitReview
|
|
8574
8390
|
}, deps);
|
|
8391
|
+
if (privateConfirm && report.confirmation && !report.confirmation.visibility) {
|
|
8392
|
+
report.confirmation.visibility = "private";
|
|
8393
|
+
}
|
|
8575
8394
|
if (options.json) {
|
|
8576
8395
|
emit(stdout, renderJson(report));
|
|
8577
8396
|
} else {
|
|
8578
8397
|
const receipt = report.receipt;
|
|
8579
|
-
const
|
|
8580
|
-
|
|
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") {
|
|
8581
8404
|
emit(stdout, "Upgrade registered.");
|
|
8582
8405
|
} else if (published) {
|
|
8583
8406
|
emit(stdout, "Registration accepted.");
|
|
@@ -8596,8 +8419,9 @@ async function runCli(argv, deps = {}) {
|
|
|
8596
8419
|
if (receipt.request_id) emit(stdout, `request_id: ${receipt.request_id}`);
|
|
8597
8420
|
if (report.confirmation) {
|
|
8598
8421
|
const confirmation = report.confirmation;
|
|
8599
|
-
emit(stdout, "Listing published.");
|
|
8422
|
+
emit(stdout, confirmation.visibility === "private" ? "Listing confirmed privately for production testing." : "Listing published.");
|
|
8600
8423
|
if (confirmation.status) emit(stdout, `confirmation_status: ${confirmation.status}`);
|
|
8424
|
+
if (confirmation.visibility) emit(stdout, `confirmation_visibility: ${confirmation.visibility}`);
|
|
8601
8425
|
if (confirmation.release?.release_status) emit(stdout, `release_status: ${confirmation.release.release_status}`);
|
|
8602
8426
|
} else if (report.review) {
|
|
8603
8427
|
const review = report.review;
|