@siglume/api-sdk 0.10.7 → 0.10.8
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 +99 -91
- package/dist/bin/siglume.cjs +306 -10
- package/dist/bin/siglume.cjs.map +1 -1
- package/dist/bin/siglume.js +306 -10
- package/dist/bin/siglume.js.map +1 -1
- package/dist/cli/index.cjs +306 -10
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +78 -0
- package/dist/cli/index.d.ts +78 -0
- package/dist/cli/index.js +306 -10
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +168 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +92 -1
- package/dist/index.d.ts +92 -1
- package/dist/index.js +168 -1
- package/dist/index.js.map +1 -1
- package/package.json +58 -58
package/dist/index.d.cts
CHANGED
|
@@ -190,6 +190,27 @@ declare const ListingCurrency: {
|
|
|
190
190
|
readonly JPY: "JPY";
|
|
191
191
|
};
|
|
192
192
|
type ListingCurrency = (typeof ListingCurrency)[keyof typeof ListingCurrency];
|
|
193
|
+
declare const PersistenceMode: {
|
|
194
|
+
readonly NONE: "none";
|
|
195
|
+
readonly LOCAL: "local";
|
|
196
|
+
readonly PLATFORM: "platform";
|
|
197
|
+
readonly DEVELOPER_SERVER: "developer_server";
|
|
198
|
+
};
|
|
199
|
+
type PersistenceMode = (typeof PersistenceMode)[keyof typeof PersistenceMode];
|
|
200
|
+
interface CapabilityPersistencePolicy {
|
|
201
|
+
mode: PersistenceMode;
|
|
202
|
+
schema_version?: string;
|
|
203
|
+
scope?: string;
|
|
204
|
+
restore_required?: boolean;
|
|
205
|
+
max_bytes?: number;
|
|
206
|
+
endpoint?: string | null;
|
|
207
|
+
description?: string;
|
|
208
|
+
/**
|
|
209
|
+
* JSON Schema for persisted game save data.
|
|
210
|
+
* Required when store_vertical is "game" and mode is not "none".
|
|
211
|
+
*/
|
|
212
|
+
save_data_schema?: Record<string, unknown>;
|
|
213
|
+
}
|
|
193
214
|
interface ConnectedAccountRef {
|
|
194
215
|
provider_key: string;
|
|
195
216
|
session_token: string;
|
|
@@ -221,10 +242,14 @@ interface AppManifest {
|
|
|
221
242
|
support_contact?: string;
|
|
222
243
|
seller_homepage_url?: string;
|
|
223
244
|
seller_social_url?: string;
|
|
245
|
+
publisher_type?: "user" | "company";
|
|
246
|
+
company_id?: string;
|
|
247
|
+
publisher_company_id?: string;
|
|
224
248
|
store_vertical: StoreVertical;
|
|
225
249
|
compatibility_tags?: string[];
|
|
226
250
|
example_prompts?: string[];
|
|
227
251
|
latency_tier?: string;
|
|
252
|
+
persistence?: CapabilityPersistencePolicy;
|
|
228
253
|
}
|
|
229
254
|
interface ExecutionContext {
|
|
230
255
|
agent_id: string;
|
|
@@ -388,13 +413,53 @@ interface AppListingRecord {
|
|
|
388
413
|
seller_display_name?: string | null;
|
|
389
414
|
seller_homepage_url?: string | null;
|
|
390
415
|
seller_social_url?: string | null;
|
|
416
|
+
publisher_type?: string | null;
|
|
417
|
+
publisher_company_id?: string | null;
|
|
418
|
+
company_id?: string | null;
|
|
419
|
+
company_name?: string | null;
|
|
420
|
+
company_publish_status?: string | null;
|
|
421
|
+
company_terms_version?: string | null;
|
|
391
422
|
review_status?: string | null;
|
|
392
423
|
review_note?: string | null;
|
|
393
424
|
submission_blockers: string[];
|
|
425
|
+
persistence: Record<string, unknown>;
|
|
394
426
|
created_at?: string | null;
|
|
395
427
|
updated_at?: string | null;
|
|
396
428
|
raw: Record<string, unknown>;
|
|
397
429
|
}
|
|
430
|
+
interface CompanyPublisherRecord {
|
|
431
|
+
company_id: string;
|
|
432
|
+
name: string;
|
|
433
|
+
status: string;
|
|
434
|
+
description?: string | null;
|
|
435
|
+
is_founder: boolean;
|
|
436
|
+
membership_role?: string | null;
|
|
437
|
+
membership_status?: string | null;
|
|
438
|
+
can_publish: boolean;
|
|
439
|
+
can_approve: boolean;
|
|
440
|
+
approval_required: boolean;
|
|
441
|
+
paid_listing_allowed: boolean;
|
|
442
|
+
disabled_reasons: string[];
|
|
443
|
+
company_terms_version?: string | null;
|
|
444
|
+
active_listing_count: number;
|
|
445
|
+
pending_approval_count: number;
|
|
446
|
+
settlement_wallet_ready: boolean;
|
|
447
|
+
settlement_wallets: Array<Record<string, unknown>>;
|
|
448
|
+
raw: Record<string, unknown>;
|
|
449
|
+
}
|
|
450
|
+
interface CapabilitySaveStateRecord {
|
|
451
|
+
capability_key: string;
|
|
452
|
+
save_key: string;
|
|
453
|
+
schema_version: string;
|
|
454
|
+
revision: number;
|
|
455
|
+
payload: Record<string, unknown>;
|
|
456
|
+
metadata: Record<string, unknown>;
|
|
457
|
+
checksum?: string | null;
|
|
458
|
+
updated_at?: string | null;
|
|
459
|
+
created_at?: string | null;
|
|
460
|
+
exists: boolean;
|
|
461
|
+
raw: Record<string, unknown>;
|
|
462
|
+
}
|
|
398
463
|
interface ConnectedAccountOAuthStart {
|
|
399
464
|
authorize_url: string;
|
|
400
465
|
state: string;
|
|
@@ -1578,6 +1643,19 @@ interface SiglumeClientShape {
|
|
|
1578
1643
|
cursor?: string;
|
|
1579
1644
|
}): Promise<CursorPage<AppListingRecord>>;
|
|
1580
1645
|
get_listing(listing_id: string): Promise<AppListingRecord>;
|
|
1646
|
+
list_company_publishers(): Promise<CompanyPublisherRecord[]>;
|
|
1647
|
+
request_company_publish_approval(listing_id: string, note?: string): Promise<AppListingRecord>;
|
|
1648
|
+
decide_company_publish_approval(listing_id: string, options: {
|
|
1649
|
+
decision: "approve" | "reject";
|
|
1650
|
+
reason?: string;
|
|
1651
|
+
}): Promise<AppListingRecord>;
|
|
1652
|
+
get_capability_state(capability_key: string, save_key?: string): Promise<CapabilitySaveStateRecord>;
|
|
1653
|
+
put_capability_state(capability_key: string, save_key?: string, payload?: Record<string, unknown>, options?: {
|
|
1654
|
+
schema_version?: string;
|
|
1655
|
+
expected_revision?: number | null;
|
|
1656
|
+
metadata?: Record<string, unknown>;
|
|
1657
|
+
}): Promise<CapabilitySaveStateRecord>;
|
|
1658
|
+
delete_capability_state(capability_key: string, save_key?: string): Promise<CapabilitySaveStateRecord>;
|
|
1581
1659
|
list_capabilities(options?: {
|
|
1582
1660
|
mine?: boolean;
|
|
1583
1661
|
status?: string;
|
|
@@ -2120,6 +2198,19 @@ declare class SiglumeClient implements SiglumeClientShape {
|
|
|
2120
2198
|
cursor?: string;
|
|
2121
2199
|
}): Promise<CursorPageResult<AppListingRecord>>;
|
|
2122
2200
|
get_listing(listing_id: string): Promise<AppListingRecord>;
|
|
2201
|
+
list_company_publishers(): Promise<CompanyPublisherRecord[]>;
|
|
2202
|
+
request_company_publish_approval(listing_id: string, note?: string): Promise<AppListingRecord>;
|
|
2203
|
+
decide_company_publish_approval(listing_id: string, options: {
|
|
2204
|
+
decision: "approve" | "reject";
|
|
2205
|
+
reason?: string;
|
|
2206
|
+
}): Promise<AppListingRecord>;
|
|
2207
|
+
get_capability_state(capability_key: string, save_key?: string): Promise<CapabilitySaveStateRecord>;
|
|
2208
|
+
put_capability_state(capability_key: string, save_key?: string, payload?: Record<string, unknown>, options?: {
|
|
2209
|
+
schema_version?: string;
|
|
2210
|
+
expected_revision?: number | null;
|
|
2211
|
+
metadata?: Record<string, unknown>;
|
|
2212
|
+
}): Promise<CapabilitySaveStateRecord>;
|
|
2213
|
+
delete_capability_state(capability_key: string, save_key?: string): Promise<CapabilitySaveStateRecord>;
|
|
2123
2214
|
list_bundles(options?: {
|
|
2124
2215
|
mine?: boolean;
|
|
2125
2216
|
status?: string;
|
|
@@ -3092,4 +3183,4 @@ declare function validate_tool_manual(manualInput: ManualInput): [boolean, ToolM
|
|
|
3092
3183
|
|
|
3093
3184
|
declare function renderJson(value: unknown): string;
|
|
3094
3185
|
|
|
3095
|
-
export { type AccessGrantRecord, type AccountAlert, type AccountContentDeleteResult, type AccountContentPostResult, type AccountDigest, type AccountDigestItem, type AccountDigestSummary, type AccountFeedbackSubmission, type AccountPlan, type AccountPlanCancellation, type AccountPreferences, type AccountWatchlist, type AdsBilling, type AdsBillingSettlement, type AdsCampaignPostRecord, type AdsCampaignRecord, type AdsProfile, type AgentCharter, type AgentRecord, type AgentThreadRecord, type AgentTopicSubscription, AnthropicProvider, type AnthropicToolDefinition, AppAdapter, AppCategory, type AppListingRecord, type AppManifest, AppTestHarness, ApprovalMode, type ApprovalPolicy, type ApprovalRequestHint, type AutoRegistrationReceipt, type Awaitable, type BillingPortalLink, BreakingChange, type BudgetPolicy, type BundleListingRecord, type BundleMember, type CapabilityBindingRecord, type CapabilityDelistedEvent, type CapabilityEventData, type CapabilityListing, type CapabilityPublishedEvent, type CassetteFile, type CassetteInteraction, type Change, ChangeLevel, type ConnectedAccountLifecycleResult, type ConnectedAccountOAuthStart, type ConnectedAccountRecord, type ConnectedAccountRef, type CrossCurrencyQuote, type CursorPage, DEFAULT_OPERATION_AGENT_ID, DEFAULT_SIGLUME_API_BASE, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, type DeveloperPortalSummary, type EmbeddedWalletCharge, type EnvelopeMeta, Environment, type ExecutionArtifact, type ExecutionCompletedEvent, type ExecutionCompletedEventData, type ExecutionContext, type ExecutionFailedEvent, type ExecutionFailedEventData, ExecutionKind, type ExecutionResult, type ExpressLikeRequest, type ExpressLikeResponse, type FavoriteAgent, type FavoriteAgentMutation, type GrantBindingResult, type HeaderLike, type HealthCheckResult, InMemoryWebhookDedupe, type InstalledToolBindingPolicyRecord, type InstalledToolConnectionReadiness, type InstalledToolExecutionRecord, type InstalledToolPolicyUpdateResult, type InstalledToolReceiptRecord, type InstalledToolReceiptStepRecord, type InstalledToolRecord, type JsonObject, type JsonPrimitive, type JsonValue, LLMProvider, ListingCurrency, type MarketNeedRecord, type MarketProposalActionResult, type MarketProposalRecord, type McpToolDescriptor, MeterClient, type MeterClientOptions, type MeterRecordResult, type MeteringInvoiceLinePreview, type MeteringSimulationResult, type NetworkClaimRecord, type NetworkContentDetail, type NetworkContentSummary, type NetworkEvidenceRecord, type NetworkRepliesPage, type OpenAIFunctionDefinition, OpenAIProvider, type OpenAIResponsesToolDefinition, type OperationExecution, type OperationMetadata, type PartnerApiKeyHandle, type PartnerApiKeyRecord, type PartnerDashboard, type PartnerUsage, type PaymentEventData, type PaymentFailedEvent, type PaymentSucceededEvent, PermissionClass, type PlanCheckoutSession, type PlanWeb3Mandate, type PolygonMandate, PriceModel, type QueuedWebhookEvent, type ReceiptRef, RecordMode, Recorder, type RecorderOptions, type RegistrationConfirmation, type RegistrationQuality, type SandboxSession, SettlementMode, type SettlementReceipt, type SideEffectRecord, SiglumeAPIError, SiglumeAssistError, SiglumeBuyerClient, type SiglumeBuyerClientOptions, SiglumeClient, SiglumeClientError, type SiglumeClientOptions, type SiglumeClientShape, SiglumeError, SiglumeExperimentalError, SiglumeExperimentalWarning, SiglumeNotFoundError, SiglumeProjectError, SiglumeValidationError, SiglumeWebhookError, type SiglumeWebhookEvent, SiglumeWebhookPayloadError, SiglumeWebhookReplayError, SiglumeWebhookSignatureError, StoreVertical, type StructuredGenerationUsage, StubProvider, type Subscription, type SubscriptionCancelledEvent, type SubscriptionCreatedEvent, type SubscriptionLifecycleEventData, type SubscriptionPausedEvent, type SubscriptionReinstatedEvent, type SubscriptionRenewedEvent, type SupportCaseRecord, TOOL_MANUAL_DRAFT_PROMPT, type ToolManual, type ToolManualAssistAttempt, type ToolManualAssistMetadata, type ToolManualAssistResult, type ToolManualGrade, type ToolManualIssue, type ToolManualIssueSeverity, ToolManualPermissionClass, type ToolManualQualityReport, type ToolSchemaExport, type UsageEventRecord, type UsageRecord, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_SIGNATURE_HEADER, type WebhookCallback, type WebhookDeliveryRecord, type WebhookDispatchResult, type WebhookEventBase, type WebhookEventType, WebhookHandler, type WebhookSignatureVerification, type WebhookSubscriptionRecord, type WorksCategoryRecord, type WorksOwnerDashboard, type WorksOwnerDashboardAgent, type WorksOwnerDashboardOrder, type WorksOwnerDashboardPitch, type WorksOwnerDashboardStats, type WorksPosterDashboard, type WorksPosterDashboardJob, type WorksPosterDashboardOrder, type WorksPosterDashboardStats, type WorksRegistrationRecord, buildOperationMetadata, build_webhook_signature_header, compute_webhook_signature, defaultCapabilityKeyForOperation, defaultOperationOutputSchema, diff_manifest, diff_tool_manual, draft_tool_manual, fallbackOperationCatalog, fill_tool_manual_gaps, normalizeUsageRecord, parse_cross_currency_quote, parse_embedded_wallet_charge, parse_polygon_mandate, parse_queued_webhook_event, parse_settlement_receipt, parse_webhook_delivery, parse_webhook_event, parse_webhook_subscription, renderJson as render_json, score_tool_manual_offline, score_tool_manual_remote, simulate_embedded_wallet_charge, simulate_polygon_mandate, to_anthropic_tool, to_mcp_tool, to_openai_function, to_openai_responses_tool, tool_manual_to_dict, validate_tool_manual, verify_webhook_signature };
|
|
3186
|
+
export { type AccessGrantRecord, type AccountAlert, type AccountContentDeleteResult, type AccountContentPostResult, type AccountDigest, type AccountDigestItem, type AccountDigestSummary, type AccountFeedbackSubmission, type AccountPlan, type AccountPlanCancellation, type AccountPreferences, type AccountWatchlist, type AdsBilling, type AdsBillingSettlement, type AdsCampaignPostRecord, type AdsCampaignRecord, type AdsProfile, type AgentCharter, type AgentRecord, type AgentThreadRecord, type AgentTopicSubscription, AnthropicProvider, type AnthropicToolDefinition, AppAdapter, AppCategory, type AppListingRecord, type AppManifest, AppTestHarness, ApprovalMode, type ApprovalPolicy, type ApprovalRequestHint, type AutoRegistrationReceipt, type Awaitable, type BillingPortalLink, BreakingChange, type BudgetPolicy, type BundleListingRecord, type BundleMember, type CapabilityBindingRecord, type CapabilityDelistedEvent, type CapabilityEventData, type CapabilityListing, type CapabilityPersistencePolicy, type CapabilityPublishedEvent, type CapabilitySaveStateRecord, type CassetteFile, type CassetteInteraction, type Change, ChangeLevel, type CompanyPublisherRecord, type ConnectedAccountLifecycleResult, type ConnectedAccountOAuthStart, type ConnectedAccountRecord, type ConnectedAccountRef, type CrossCurrencyQuote, type CursorPage, DEFAULT_OPERATION_AGENT_ID, DEFAULT_SIGLUME_API_BASE, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, type DeveloperPortalSummary, type EmbeddedWalletCharge, type EnvelopeMeta, Environment, type ExecutionArtifact, type ExecutionCompletedEvent, type ExecutionCompletedEventData, type ExecutionContext, type ExecutionFailedEvent, type ExecutionFailedEventData, ExecutionKind, type ExecutionResult, type ExpressLikeRequest, type ExpressLikeResponse, type FavoriteAgent, type FavoriteAgentMutation, type GrantBindingResult, type HeaderLike, type HealthCheckResult, InMemoryWebhookDedupe, type InstalledToolBindingPolicyRecord, type InstalledToolConnectionReadiness, type InstalledToolExecutionRecord, type InstalledToolPolicyUpdateResult, type InstalledToolReceiptRecord, type InstalledToolReceiptStepRecord, type InstalledToolRecord, type JsonObject, type JsonPrimitive, type JsonValue, LLMProvider, ListingCurrency, type MarketNeedRecord, type MarketProposalActionResult, type MarketProposalRecord, type McpToolDescriptor, MeterClient, type MeterClientOptions, type MeterRecordResult, type MeteringInvoiceLinePreview, type MeteringSimulationResult, type NetworkClaimRecord, type NetworkContentDetail, type NetworkContentSummary, type NetworkEvidenceRecord, type NetworkRepliesPage, type OpenAIFunctionDefinition, OpenAIProvider, type OpenAIResponsesToolDefinition, type OperationExecution, type OperationMetadata, type PartnerApiKeyHandle, type PartnerApiKeyRecord, type PartnerDashboard, type PartnerUsage, type PaymentEventData, type PaymentFailedEvent, type PaymentSucceededEvent, PermissionClass, PersistenceMode, type PlanCheckoutSession, type PlanWeb3Mandate, type PolygonMandate, PriceModel, type QueuedWebhookEvent, type ReceiptRef, RecordMode, Recorder, type RecorderOptions, type RegistrationConfirmation, type RegistrationQuality, type SandboxSession, SettlementMode, type SettlementReceipt, type SideEffectRecord, SiglumeAPIError, SiglumeAssistError, SiglumeBuyerClient, type SiglumeBuyerClientOptions, SiglumeClient, SiglumeClientError, type SiglumeClientOptions, type SiglumeClientShape, SiglumeError, SiglumeExperimentalError, SiglumeExperimentalWarning, SiglumeNotFoundError, SiglumeProjectError, SiglumeValidationError, SiglumeWebhookError, type SiglumeWebhookEvent, SiglumeWebhookPayloadError, SiglumeWebhookReplayError, SiglumeWebhookSignatureError, StoreVertical, type StructuredGenerationUsage, StubProvider, type Subscription, type SubscriptionCancelledEvent, type SubscriptionCreatedEvent, type SubscriptionLifecycleEventData, type SubscriptionPausedEvent, type SubscriptionReinstatedEvent, type SubscriptionRenewedEvent, type SupportCaseRecord, TOOL_MANUAL_DRAFT_PROMPT, type ToolManual, type ToolManualAssistAttempt, type ToolManualAssistMetadata, type ToolManualAssistResult, type ToolManualGrade, type ToolManualIssue, type ToolManualIssueSeverity, ToolManualPermissionClass, type ToolManualQualityReport, type ToolSchemaExport, type UsageEventRecord, type UsageRecord, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_SIGNATURE_HEADER, type WebhookCallback, type WebhookDeliveryRecord, type WebhookDispatchResult, type WebhookEventBase, type WebhookEventType, WebhookHandler, type WebhookSignatureVerification, type WebhookSubscriptionRecord, type WorksCategoryRecord, type WorksOwnerDashboard, type WorksOwnerDashboardAgent, type WorksOwnerDashboardOrder, type WorksOwnerDashboardPitch, type WorksOwnerDashboardStats, type WorksPosterDashboard, type WorksPosterDashboardJob, type WorksPosterDashboardOrder, type WorksPosterDashboardStats, type WorksRegistrationRecord, buildOperationMetadata, build_webhook_signature_header, compute_webhook_signature, defaultCapabilityKeyForOperation, defaultOperationOutputSchema, diff_manifest, diff_tool_manual, draft_tool_manual, fallbackOperationCatalog, fill_tool_manual_gaps, normalizeUsageRecord, parse_cross_currency_quote, parse_embedded_wallet_charge, parse_polygon_mandate, parse_queued_webhook_event, parse_settlement_receipt, parse_webhook_delivery, parse_webhook_event, parse_webhook_subscription, renderJson as render_json, score_tool_manual_offline, score_tool_manual_remote, simulate_embedded_wallet_charge, simulate_polygon_mandate, to_anthropic_tool, to_mcp_tool, to_openai_function, to_openai_responses_tool, tool_manual_to_dict, validate_tool_manual, verify_webhook_signature };
|
package/dist/index.d.ts
CHANGED
|
@@ -190,6 +190,27 @@ declare const ListingCurrency: {
|
|
|
190
190
|
readonly JPY: "JPY";
|
|
191
191
|
};
|
|
192
192
|
type ListingCurrency = (typeof ListingCurrency)[keyof typeof ListingCurrency];
|
|
193
|
+
declare const PersistenceMode: {
|
|
194
|
+
readonly NONE: "none";
|
|
195
|
+
readonly LOCAL: "local";
|
|
196
|
+
readonly PLATFORM: "platform";
|
|
197
|
+
readonly DEVELOPER_SERVER: "developer_server";
|
|
198
|
+
};
|
|
199
|
+
type PersistenceMode = (typeof PersistenceMode)[keyof typeof PersistenceMode];
|
|
200
|
+
interface CapabilityPersistencePolicy {
|
|
201
|
+
mode: PersistenceMode;
|
|
202
|
+
schema_version?: string;
|
|
203
|
+
scope?: string;
|
|
204
|
+
restore_required?: boolean;
|
|
205
|
+
max_bytes?: number;
|
|
206
|
+
endpoint?: string | null;
|
|
207
|
+
description?: string;
|
|
208
|
+
/**
|
|
209
|
+
* JSON Schema for persisted game save data.
|
|
210
|
+
* Required when store_vertical is "game" and mode is not "none".
|
|
211
|
+
*/
|
|
212
|
+
save_data_schema?: Record<string, unknown>;
|
|
213
|
+
}
|
|
193
214
|
interface ConnectedAccountRef {
|
|
194
215
|
provider_key: string;
|
|
195
216
|
session_token: string;
|
|
@@ -221,10 +242,14 @@ interface AppManifest {
|
|
|
221
242
|
support_contact?: string;
|
|
222
243
|
seller_homepage_url?: string;
|
|
223
244
|
seller_social_url?: string;
|
|
245
|
+
publisher_type?: "user" | "company";
|
|
246
|
+
company_id?: string;
|
|
247
|
+
publisher_company_id?: string;
|
|
224
248
|
store_vertical: StoreVertical;
|
|
225
249
|
compatibility_tags?: string[];
|
|
226
250
|
example_prompts?: string[];
|
|
227
251
|
latency_tier?: string;
|
|
252
|
+
persistence?: CapabilityPersistencePolicy;
|
|
228
253
|
}
|
|
229
254
|
interface ExecutionContext {
|
|
230
255
|
agent_id: string;
|
|
@@ -388,13 +413,53 @@ interface AppListingRecord {
|
|
|
388
413
|
seller_display_name?: string | null;
|
|
389
414
|
seller_homepage_url?: string | null;
|
|
390
415
|
seller_social_url?: string | null;
|
|
416
|
+
publisher_type?: string | null;
|
|
417
|
+
publisher_company_id?: string | null;
|
|
418
|
+
company_id?: string | null;
|
|
419
|
+
company_name?: string | null;
|
|
420
|
+
company_publish_status?: string | null;
|
|
421
|
+
company_terms_version?: string | null;
|
|
391
422
|
review_status?: string | null;
|
|
392
423
|
review_note?: string | null;
|
|
393
424
|
submission_blockers: string[];
|
|
425
|
+
persistence: Record<string, unknown>;
|
|
394
426
|
created_at?: string | null;
|
|
395
427
|
updated_at?: string | null;
|
|
396
428
|
raw: Record<string, unknown>;
|
|
397
429
|
}
|
|
430
|
+
interface CompanyPublisherRecord {
|
|
431
|
+
company_id: string;
|
|
432
|
+
name: string;
|
|
433
|
+
status: string;
|
|
434
|
+
description?: string | null;
|
|
435
|
+
is_founder: boolean;
|
|
436
|
+
membership_role?: string | null;
|
|
437
|
+
membership_status?: string | null;
|
|
438
|
+
can_publish: boolean;
|
|
439
|
+
can_approve: boolean;
|
|
440
|
+
approval_required: boolean;
|
|
441
|
+
paid_listing_allowed: boolean;
|
|
442
|
+
disabled_reasons: string[];
|
|
443
|
+
company_terms_version?: string | null;
|
|
444
|
+
active_listing_count: number;
|
|
445
|
+
pending_approval_count: number;
|
|
446
|
+
settlement_wallet_ready: boolean;
|
|
447
|
+
settlement_wallets: Array<Record<string, unknown>>;
|
|
448
|
+
raw: Record<string, unknown>;
|
|
449
|
+
}
|
|
450
|
+
interface CapabilitySaveStateRecord {
|
|
451
|
+
capability_key: string;
|
|
452
|
+
save_key: string;
|
|
453
|
+
schema_version: string;
|
|
454
|
+
revision: number;
|
|
455
|
+
payload: Record<string, unknown>;
|
|
456
|
+
metadata: Record<string, unknown>;
|
|
457
|
+
checksum?: string | null;
|
|
458
|
+
updated_at?: string | null;
|
|
459
|
+
created_at?: string | null;
|
|
460
|
+
exists: boolean;
|
|
461
|
+
raw: Record<string, unknown>;
|
|
462
|
+
}
|
|
398
463
|
interface ConnectedAccountOAuthStart {
|
|
399
464
|
authorize_url: string;
|
|
400
465
|
state: string;
|
|
@@ -1578,6 +1643,19 @@ interface SiglumeClientShape {
|
|
|
1578
1643
|
cursor?: string;
|
|
1579
1644
|
}): Promise<CursorPage<AppListingRecord>>;
|
|
1580
1645
|
get_listing(listing_id: string): Promise<AppListingRecord>;
|
|
1646
|
+
list_company_publishers(): Promise<CompanyPublisherRecord[]>;
|
|
1647
|
+
request_company_publish_approval(listing_id: string, note?: string): Promise<AppListingRecord>;
|
|
1648
|
+
decide_company_publish_approval(listing_id: string, options: {
|
|
1649
|
+
decision: "approve" | "reject";
|
|
1650
|
+
reason?: string;
|
|
1651
|
+
}): Promise<AppListingRecord>;
|
|
1652
|
+
get_capability_state(capability_key: string, save_key?: string): Promise<CapabilitySaveStateRecord>;
|
|
1653
|
+
put_capability_state(capability_key: string, save_key?: string, payload?: Record<string, unknown>, options?: {
|
|
1654
|
+
schema_version?: string;
|
|
1655
|
+
expected_revision?: number | null;
|
|
1656
|
+
metadata?: Record<string, unknown>;
|
|
1657
|
+
}): Promise<CapabilitySaveStateRecord>;
|
|
1658
|
+
delete_capability_state(capability_key: string, save_key?: string): Promise<CapabilitySaveStateRecord>;
|
|
1581
1659
|
list_capabilities(options?: {
|
|
1582
1660
|
mine?: boolean;
|
|
1583
1661
|
status?: string;
|
|
@@ -2120,6 +2198,19 @@ declare class SiglumeClient implements SiglumeClientShape {
|
|
|
2120
2198
|
cursor?: string;
|
|
2121
2199
|
}): Promise<CursorPageResult<AppListingRecord>>;
|
|
2122
2200
|
get_listing(listing_id: string): Promise<AppListingRecord>;
|
|
2201
|
+
list_company_publishers(): Promise<CompanyPublisherRecord[]>;
|
|
2202
|
+
request_company_publish_approval(listing_id: string, note?: string): Promise<AppListingRecord>;
|
|
2203
|
+
decide_company_publish_approval(listing_id: string, options: {
|
|
2204
|
+
decision: "approve" | "reject";
|
|
2205
|
+
reason?: string;
|
|
2206
|
+
}): Promise<AppListingRecord>;
|
|
2207
|
+
get_capability_state(capability_key: string, save_key?: string): Promise<CapabilitySaveStateRecord>;
|
|
2208
|
+
put_capability_state(capability_key: string, save_key?: string, payload?: Record<string, unknown>, options?: {
|
|
2209
|
+
schema_version?: string;
|
|
2210
|
+
expected_revision?: number | null;
|
|
2211
|
+
metadata?: Record<string, unknown>;
|
|
2212
|
+
}): Promise<CapabilitySaveStateRecord>;
|
|
2213
|
+
delete_capability_state(capability_key: string, save_key?: string): Promise<CapabilitySaveStateRecord>;
|
|
2123
2214
|
list_bundles(options?: {
|
|
2124
2215
|
mine?: boolean;
|
|
2125
2216
|
status?: string;
|
|
@@ -3092,4 +3183,4 @@ declare function validate_tool_manual(manualInput: ManualInput): [boolean, ToolM
|
|
|
3092
3183
|
|
|
3093
3184
|
declare function renderJson(value: unknown): string;
|
|
3094
3185
|
|
|
3095
|
-
export { type AccessGrantRecord, type AccountAlert, type AccountContentDeleteResult, type AccountContentPostResult, type AccountDigest, type AccountDigestItem, type AccountDigestSummary, type AccountFeedbackSubmission, type AccountPlan, type AccountPlanCancellation, type AccountPreferences, type AccountWatchlist, type AdsBilling, type AdsBillingSettlement, type AdsCampaignPostRecord, type AdsCampaignRecord, type AdsProfile, type AgentCharter, type AgentRecord, type AgentThreadRecord, type AgentTopicSubscription, AnthropicProvider, type AnthropicToolDefinition, AppAdapter, AppCategory, type AppListingRecord, type AppManifest, AppTestHarness, ApprovalMode, type ApprovalPolicy, type ApprovalRequestHint, type AutoRegistrationReceipt, type Awaitable, type BillingPortalLink, BreakingChange, type BudgetPolicy, type BundleListingRecord, type BundleMember, type CapabilityBindingRecord, type CapabilityDelistedEvent, type CapabilityEventData, type CapabilityListing, type CapabilityPublishedEvent, type CassetteFile, type CassetteInteraction, type Change, ChangeLevel, type ConnectedAccountLifecycleResult, type ConnectedAccountOAuthStart, type ConnectedAccountRecord, type ConnectedAccountRef, type CrossCurrencyQuote, type CursorPage, DEFAULT_OPERATION_AGENT_ID, DEFAULT_SIGLUME_API_BASE, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, type DeveloperPortalSummary, type EmbeddedWalletCharge, type EnvelopeMeta, Environment, type ExecutionArtifact, type ExecutionCompletedEvent, type ExecutionCompletedEventData, type ExecutionContext, type ExecutionFailedEvent, type ExecutionFailedEventData, ExecutionKind, type ExecutionResult, type ExpressLikeRequest, type ExpressLikeResponse, type FavoriteAgent, type FavoriteAgentMutation, type GrantBindingResult, type HeaderLike, type HealthCheckResult, InMemoryWebhookDedupe, type InstalledToolBindingPolicyRecord, type InstalledToolConnectionReadiness, type InstalledToolExecutionRecord, type InstalledToolPolicyUpdateResult, type InstalledToolReceiptRecord, type InstalledToolReceiptStepRecord, type InstalledToolRecord, type JsonObject, type JsonPrimitive, type JsonValue, LLMProvider, ListingCurrency, type MarketNeedRecord, type MarketProposalActionResult, type MarketProposalRecord, type McpToolDescriptor, MeterClient, type MeterClientOptions, type MeterRecordResult, type MeteringInvoiceLinePreview, type MeteringSimulationResult, type NetworkClaimRecord, type NetworkContentDetail, type NetworkContentSummary, type NetworkEvidenceRecord, type NetworkRepliesPage, type OpenAIFunctionDefinition, OpenAIProvider, type OpenAIResponsesToolDefinition, type OperationExecution, type OperationMetadata, type PartnerApiKeyHandle, type PartnerApiKeyRecord, type PartnerDashboard, type PartnerUsage, type PaymentEventData, type PaymentFailedEvent, type PaymentSucceededEvent, PermissionClass, type PlanCheckoutSession, type PlanWeb3Mandate, type PolygonMandate, PriceModel, type QueuedWebhookEvent, type ReceiptRef, RecordMode, Recorder, type RecorderOptions, type RegistrationConfirmation, type RegistrationQuality, type SandboxSession, SettlementMode, type SettlementReceipt, type SideEffectRecord, SiglumeAPIError, SiglumeAssistError, SiglumeBuyerClient, type SiglumeBuyerClientOptions, SiglumeClient, SiglumeClientError, type SiglumeClientOptions, type SiglumeClientShape, SiglumeError, SiglumeExperimentalError, SiglumeExperimentalWarning, SiglumeNotFoundError, SiglumeProjectError, SiglumeValidationError, SiglumeWebhookError, type SiglumeWebhookEvent, SiglumeWebhookPayloadError, SiglumeWebhookReplayError, SiglumeWebhookSignatureError, StoreVertical, type StructuredGenerationUsage, StubProvider, type Subscription, type SubscriptionCancelledEvent, type SubscriptionCreatedEvent, type SubscriptionLifecycleEventData, type SubscriptionPausedEvent, type SubscriptionReinstatedEvent, type SubscriptionRenewedEvent, type SupportCaseRecord, TOOL_MANUAL_DRAFT_PROMPT, type ToolManual, type ToolManualAssistAttempt, type ToolManualAssistMetadata, type ToolManualAssistResult, type ToolManualGrade, type ToolManualIssue, type ToolManualIssueSeverity, ToolManualPermissionClass, type ToolManualQualityReport, type ToolSchemaExport, type UsageEventRecord, type UsageRecord, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_SIGNATURE_HEADER, type WebhookCallback, type WebhookDeliveryRecord, type WebhookDispatchResult, type WebhookEventBase, type WebhookEventType, WebhookHandler, type WebhookSignatureVerification, type WebhookSubscriptionRecord, type WorksCategoryRecord, type WorksOwnerDashboard, type WorksOwnerDashboardAgent, type WorksOwnerDashboardOrder, type WorksOwnerDashboardPitch, type WorksOwnerDashboardStats, type WorksPosterDashboard, type WorksPosterDashboardJob, type WorksPosterDashboardOrder, type WorksPosterDashboardStats, type WorksRegistrationRecord, buildOperationMetadata, build_webhook_signature_header, compute_webhook_signature, defaultCapabilityKeyForOperation, defaultOperationOutputSchema, diff_manifest, diff_tool_manual, draft_tool_manual, fallbackOperationCatalog, fill_tool_manual_gaps, normalizeUsageRecord, parse_cross_currency_quote, parse_embedded_wallet_charge, parse_polygon_mandate, parse_queued_webhook_event, parse_settlement_receipt, parse_webhook_delivery, parse_webhook_event, parse_webhook_subscription, renderJson as render_json, score_tool_manual_offline, score_tool_manual_remote, simulate_embedded_wallet_charge, simulate_polygon_mandate, to_anthropic_tool, to_mcp_tool, to_openai_function, to_openai_responses_tool, tool_manual_to_dict, validate_tool_manual, verify_webhook_signature };
|
|
3186
|
+
export { type AccessGrantRecord, type AccountAlert, type AccountContentDeleteResult, type AccountContentPostResult, type AccountDigest, type AccountDigestItem, type AccountDigestSummary, type AccountFeedbackSubmission, type AccountPlan, type AccountPlanCancellation, type AccountPreferences, type AccountWatchlist, type AdsBilling, type AdsBillingSettlement, type AdsCampaignPostRecord, type AdsCampaignRecord, type AdsProfile, type AgentCharter, type AgentRecord, type AgentThreadRecord, type AgentTopicSubscription, AnthropicProvider, type AnthropicToolDefinition, AppAdapter, AppCategory, type AppListingRecord, type AppManifest, AppTestHarness, ApprovalMode, type ApprovalPolicy, type ApprovalRequestHint, type AutoRegistrationReceipt, type Awaitable, type BillingPortalLink, BreakingChange, type BudgetPolicy, type BundleListingRecord, type BundleMember, type CapabilityBindingRecord, type CapabilityDelistedEvent, type CapabilityEventData, type CapabilityListing, type CapabilityPersistencePolicy, type CapabilityPublishedEvent, type CapabilitySaveStateRecord, type CassetteFile, type CassetteInteraction, type Change, ChangeLevel, type CompanyPublisherRecord, type ConnectedAccountLifecycleResult, type ConnectedAccountOAuthStart, type ConnectedAccountRecord, type ConnectedAccountRef, type CrossCurrencyQuote, type CursorPage, DEFAULT_OPERATION_AGENT_ID, DEFAULT_SIGLUME_API_BASE, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, type DeveloperPortalSummary, type EmbeddedWalletCharge, type EnvelopeMeta, Environment, type ExecutionArtifact, type ExecutionCompletedEvent, type ExecutionCompletedEventData, type ExecutionContext, type ExecutionFailedEvent, type ExecutionFailedEventData, ExecutionKind, type ExecutionResult, type ExpressLikeRequest, type ExpressLikeResponse, type FavoriteAgent, type FavoriteAgentMutation, type GrantBindingResult, type HeaderLike, type HealthCheckResult, InMemoryWebhookDedupe, type InstalledToolBindingPolicyRecord, type InstalledToolConnectionReadiness, type InstalledToolExecutionRecord, type InstalledToolPolicyUpdateResult, type InstalledToolReceiptRecord, type InstalledToolReceiptStepRecord, type InstalledToolRecord, type JsonObject, type JsonPrimitive, type JsonValue, LLMProvider, ListingCurrency, type MarketNeedRecord, type MarketProposalActionResult, type MarketProposalRecord, type McpToolDescriptor, MeterClient, type MeterClientOptions, type MeterRecordResult, type MeteringInvoiceLinePreview, type MeteringSimulationResult, type NetworkClaimRecord, type NetworkContentDetail, type NetworkContentSummary, type NetworkEvidenceRecord, type NetworkRepliesPage, type OpenAIFunctionDefinition, OpenAIProvider, type OpenAIResponsesToolDefinition, type OperationExecution, type OperationMetadata, type PartnerApiKeyHandle, type PartnerApiKeyRecord, type PartnerDashboard, type PartnerUsage, type PaymentEventData, type PaymentFailedEvent, type PaymentSucceededEvent, PermissionClass, PersistenceMode, type PlanCheckoutSession, type PlanWeb3Mandate, type PolygonMandate, PriceModel, type QueuedWebhookEvent, type ReceiptRef, RecordMode, Recorder, type RecorderOptions, type RegistrationConfirmation, type RegistrationQuality, type SandboxSession, SettlementMode, type SettlementReceipt, type SideEffectRecord, SiglumeAPIError, SiglumeAssistError, SiglumeBuyerClient, type SiglumeBuyerClientOptions, SiglumeClient, SiglumeClientError, type SiglumeClientOptions, type SiglumeClientShape, SiglumeError, SiglumeExperimentalError, SiglumeExperimentalWarning, SiglumeNotFoundError, SiglumeProjectError, SiglumeValidationError, SiglumeWebhookError, type SiglumeWebhookEvent, SiglumeWebhookPayloadError, SiglumeWebhookReplayError, SiglumeWebhookSignatureError, StoreVertical, type StructuredGenerationUsage, StubProvider, type Subscription, type SubscriptionCancelledEvent, type SubscriptionCreatedEvent, type SubscriptionLifecycleEventData, type SubscriptionPausedEvent, type SubscriptionReinstatedEvent, type SubscriptionRenewedEvent, type SupportCaseRecord, TOOL_MANUAL_DRAFT_PROMPT, type ToolManual, type ToolManualAssistAttempt, type ToolManualAssistMetadata, type ToolManualAssistResult, type ToolManualGrade, type ToolManualIssue, type ToolManualIssueSeverity, ToolManualPermissionClass, type ToolManualQualityReport, type ToolSchemaExport, type UsageEventRecord, type UsageRecord, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_SIGNATURE_HEADER, type WebhookCallback, type WebhookDeliveryRecord, type WebhookDispatchResult, type WebhookEventBase, type WebhookEventType, WebhookHandler, type WebhookSignatureVerification, type WebhookSubscriptionRecord, type WorksCategoryRecord, type WorksOwnerDashboard, type WorksOwnerDashboardAgent, type WorksOwnerDashboardOrder, type WorksOwnerDashboardPitch, type WorksOwnerDashboardStats, type WorksPosterDashboard, type WorksPosterDashboardJob, type WorksPosterDashboardOrder, type WorksPosterDashboardStats, type WorksRegistrationRecord, buildOperationMetadata, build_webhook_signature_header, compute_webhook_signature, defaultCapabilityKeyForOperation, defaultOperationOutputSchema, diff_manifest, diff_tool_manual, draft_tool_manual, fallbackOperationCatalog, fill_tool_manual_gaps, normalizeUsageRecord, parse_cross_currency_quote, parse_embedded_wallet_charge, parse_polygon_mandate, parse_queued_webhook_event, parse_settlement_receipt, parse_webhook_delivery, parse_webhook_event, parse_webhook_subscription, renderJson as render_json, score_tool_manual_offline, score_tool_manual_remote, simulate_embedded_wallet_charge, simulate_polygon_mandate, to_anthropic_tool, to_mcp_tool, to_openai_function, to_openai_responses_tool, tool_manual_to_dict, validate_tool_manual, verify_webhook_signature };
|
package/dist/index.js
CHANGED
|
@@ -1537,6 +1537,56 @@ var init_operations = __esm({
|
|
|
1537
1537
|
});
|
|
1538
1538
|
|
|
1539
1539
|
// src/client.ts
|
|
1540
|
+
function validateManifestPersistenceContract(payload) {
|
|
1541
|
+
const vertical = String(payload.store_vertical ?? "").trim().toLowerCase();
|
|
1542
|
+
const persistence = payload.persistence;
|
|
1543
|
+
if (persistence === void 0 || persistence === null) {
|
|
1544
|
+
return;
|
|
1545
|
+
}
|
|
1546
|
+
if (!isRecord2(persistence)) {
|
|
1547
|
+
throw new SiglumeClientError("AppManifest.persistence must be an object.");
|
|
1548
|
+
}
|
|
1549
|
+
const mode = String(persistence.mode ?? (vertical === "game" ? "platform" : "none")).trim().toLowerCase();
|
|
1550
|
+
if (!["none", "local", "platform", "developer_server"].includes(mode)) {
|
|
1551
|
+
throw new SiglumeClientError(
|
|
1552
|
+
"AppManifest.persistence.mode must be one of: none, local, platform, developer_server."
|
|
1553
|
+
);
|
|
1554
|
+
}
|
|
1555
|
+
const schema = persistence.save_data_schema;
|
|
1556
|
+
if (vertical === "game" && mode !== "none" && schema === void 0) {
|
|
1557
|
+
throw new SiglumeClientError(
|
|
1558
|
+
"AppManifest.persistence.save_data_schema is required when store_vertical='game' and persistence.mode is not 'none'."
|
|
1559
|
+
);
|
|
1560
|
+
}
|
|
1561
|
+
if (schema !== void 0) {
|
|
1562
|
+
validateSaveDataSchema(schema, "AppManifest.persistence.save_data_schema");
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
function validateSaveDataSchema(schema, fieldName) {
|
|
1566
|
+
if (!isRecord2(schema)) {
|
|
1567
|
+
throw new SiglumeClientError(`${fieldName} must be a JSON Schema object.`);
|
|
1568
|
+
}
|
|
1569
|
+
const schemaSize = new TextEncoder().encode(JSON.stringify(schema)).length;
|
|
1570
|
+
if (schemaSize > 8192) {
|
|
1571
|
+
throw new SiglumeClientError(`${fieldName} must be at most 8192 bytes.`);
|
|
1572
|
+
}
|
|
1573
|
+
if (schema.type !== "object") {
|
|
1574
|
+
throw new SiglumeClientError(`${fieldName}.type must be 'object'.`);
|
|
1575
|
+
}
|
|
1576
|
+
const properties = schema.properties;
|
|
1577
|
+
if (!isRecord2(properties) || Object.keys(properties).length === 0) {
|
|
1578
|
+
throw new SiglumeClientError(`${fieldName}.properties must be a non-empty object.`);
|
|
1579
|
+
}
|
|
1580
|
+
if (schema.required !== void 0) {
|
|
1581
|
+
if (!Array.isArray(schema.required) || !schema.required.every((item) => typeof item === "string")) {
|
|
1582
|
+
throw new SiglumeClientError(`${fieldName}.required must be an array of strings when provided.`);
|
|
1583
|
+
}
|
|
1584
|
+
const missing = schema.required.filter((item) => !(item in properties));
|
|
1585
|
+
if (missing.length > 0) {
|
|
1586
|
+
throw new SiglumeClientError(`${fieldName}.required references undefined properties: ${missing.join(", ")}.`);
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1540
1590
|
function buildToolManualQualityReport(payload) {
|
|
1541
1591
|
const qualityBlock = isRecord2(payload.quality) ? payload.quality : payload;
|
|
1542
1592
|
const issues = [];
|
|
@@ -1611,6 +1661,8 @@ function buildUrl(baseUrl, path, params) {
|
|
|
1611
1661
|
return url.toString();
|
|
1612
1662
|
}
|
|
1613
1663
|
function parseListing(data) {
|
|
1664
|
+
const metadata = isRecord2(data.metadata) ? data.metadata : {};
|
|
1665
|
+
const persistence = isRecord2(data.persistence) ? data.persistence : isRecord2(metadata.persistence) ? metadata.persistence : {};
|
|
1614
1666
|
return {
|
|
1615
1667
|
listing_id: String(data.listing_id ?? data.id ?? ""),
|
|
1616
1668
|
capability_key: String(data.capability_key ?? ""),
|
|
@@ -1633,14 +1685,59 @@ function parseListing(data) {
|
|
|
1633
1685
|
seller_display_name: stringOrNull2(data.seller_display_name),
|
|
1634
1686
|
seller_homepage_url: stringOrNull2(data.seller_homepage_url),
|
|
1635
1687
|
seller_social_url: stringOrNull2(data.seller_social_url),
|
|
1688
|
+
publisher_type: stringOrNull2(data.publisher_type),
|
|
1689
|
+
publisher_company_id: stringOrNull2(data.publisher_company_id),
|
|
1690
|
+
company_id: stringOrNull2(data.company_id),
|
|
1691
|
+
company_name: stringOrNull2(data.company_name),
|
|
1692
|
+
company_publish_status: stringOrNull2(data.company_publish_status),
|
|
1693
|
+
company_terms_version: stringOrNull2(data.company_terms_version),
|
|
1636
1694
|
review_status: stringOrNull2(data.review_status),
|
|
1637
1695
|
review_note: stringOrNull2(data.review_note),
|
|
1638
1696
|
submission_blockers: Array.isArray(data.submission_blockers) ? data.submission_blockers.filter((item) => typeof item === "string") : [],
|
|
1697
|
+
persistence: { ...persistence },
|
|
1639
1698
|
created_at: stringOrNull2(data.created_at),
|
|
1640
1699
|
updated_at: stringOrNull2(data.updated_at),
|
|
1641
1700
|
raw: { ...data }
|
|
1642
1701
|
};
|
|
1643
1702
|
}
|
|
1703
|
+
function parseCompanyPublisher(data) {
|
|
1704
|
+
const wallets = Array.isArray(data.settlement_wallets) ? data.settlement_wallets.filter((item) => isRecord2(item)) : [];
|
|
1705
|
+
return {
|
|
1706
|
+
company_id: String(data.company_id ?? data.id ?? ""),
|
|
1707
|
+
name: String(data.name ?? ""),
|
|
1708
|
+
status: String(data.status ?? ""),
|
|
1709
|
+
description: stringOrNull2(data.description),
|
|
1710
|
+
is_founder: Boolean(data.is_founder ?? false),
|
|
1711
|
+
membership_role: stringOrNull2(data.membership_role),
|
|
1712
|
+
membership_status: stringOrNull2(data.membership_status),
|
|
1713
|
+
can_publish: Boolean(data.can_publish ?? true),
|
|
1714
|
+
can_approve: Boolean(data.can_approve ?? false),
|
|
1715
|
+
approval_required: Boolean(data.approval_required ?? false),
|
|
1716
|
+
paid_listing_allowed: Boolean(data.paid_listing_allowed ?? false),
|
|
1717
|
+
disabled_reasons: Array.isArray(data.disabled_reasons) ? data.disabled_reasons.filter((item) => typeof item === "string") : [],
|
|
1718
|
+
company_terms_version: stringOrNull2(data.company_terms_version),
|
|
1719
|
+
active_listing_count: Number(data.active_listing_count ?? 0),
|
|
1720
|
+
pending_approval_count: Number(data.pending_approval_count ?? 0),
|
|
1721
|
+
settlement_wallet_ready: Boolean(data.settlement_wallet_ready ?? false),
|
|
1722
|
+
settlement_wallets: wallets.map((item) => ({ ...item })),
|
|
1723
|
+
raw: { ...data }
|
|
1724
|
+
};
|
|
1725
|
+
}
|
|
1726
|
+
function parseCapabilitySaveState(data) {
|
|
1727
|
+
return {
|
|
1728
|
+
capability_key: String(data.capability_key ?? ""),
|
|
1729
|
+
save_key: String(data.save_key ?? ""),
|
|
1730
|
+
schema_version: String(data.schema_version ?? "1"),
|
|
1731
|
+
revision: Number(data.revision ?? 0),
|
|
1732
|
+
payload: toRecord2(data.payload),
|
|
1733
|
+
metadata: toRecord2(data.metadata),
|
|
1734
|
+
checksum: stringOrNull2(data.checksum),
|
|
1735
|
+
updated_at: stringOrNull2(data.updated_at),
|
|
1736
|
+
created_at: stringOrNull2(data.created_at),
|
|
1737
|
+
exists: Boolean(data.exists ?? false),
|
|
1738
|
+
raw: { ...data }
|
|
1739
|
+
};
|
|
1740
|
+
}
|
|
1644
1741
|
function parseBundleMember(data) {
|
|
1645
1742
|
return {
|
|
1646
1743
|
capability_listing_id: String(data.capability_listing_id ?? ""),
|
|
@@ -2820,6 +2917,9 @@ var init_client = __esm({
|
|
|
2820
2917
|
"support_contact",
|
|
2821
2918
|
"seller_homepage_url",
|
|
2822
2919
|
"seller_social_url",
|
|
2920
|
+
"publisher_type",
|
|
2921
|
+
"company_id",
|
|
2922
|
+
"publisher_company_id",
|
|
2823
2923
|
"store_vertical",
|
|
2824
2924
|
"jurisdiction",
|
|
2825
2925
|
"price_model",
|
|
@@ -2832,7 +2932,8 @@ var init_client = __esm({
|
|
|
2832
2932
|
"dry_run_supported",
|
|
2833
2933
|
"required_connected_accounts",
|
|
2834
2934
|
"permission_scopes",
|
|
2835
|
-
"compatibility_tags"
|
|
2935
|
+
"compatibility_tags",
|
|
2936
|
+
"persistence"
|
|
2836
2937
|
]) {
|
|
2837
2938
|
const value = manifestPayload[fieldName];
|
|
2838
2939
|
if (value !== void 0 && value !== null) {
|
|
@@ -2872,6 +2973,26 @@ var init_client = __esm({
|
|
|
2872
2973
|
);
|
|
2873
2974
|
}
|
|
2874
2975
|
}
|
|
2976
|
+
const explicitPublisherType = payload.publisher_type !== void 0 && payload.publisher_type !== null;
|
|
2977
|
+
const companyId = String(payload.company_id ?? "").trim() || String(payload.publisher_company_id ?? "").trim();
|
|
2978
|
+
const publisherType = String(payload.publisher_type ?? "user").trim().toLowerCase();
|
|
2979
|
+
if (publisherType !== "user" && publisherType !== "company") {
|
|
2980
|
+
throw new SiglumeClientError("AppManifest.publisher_type must be 'user' or 'company'.");
|
|
2981
|
+
}
|
|
2982
|
+
if (publisherType === "company" && !companyId) {
|
|
2983
|
+
throw new SiglumeClientError("AppManifest.company_id is required when publisher_type='company'.");
|
|
2984
|
+
}
|
|
2985
|
+
if (publisherType === "user" && companyId) {
|
|
2986
|
+
throw new SiglumeClientError("AppManifest.company_id cannot be combined with publisher_type='user'.");
|
|
2987
|
+
}
|
|
2988
|
+
if (explicitPublisherType || companyId) {
|
|
2989
|
+
payload.publisher_type = publisherType;
|
|
2990
|
+
}
|
|
2991
|
+
if (companyId) {
|
|
2992
|
+
payload.company_id = companyId;
|
|
2993
|
+
payload.publisher_company_id = companyId;
|
|
2994
|
+
}
|
|
2995
|
+
validateManifestPersistenceContract(payload);
|
|
2875
2996
|
if (payload.manifest && typeof payload.manifest === "object") {
|
|
2876
2997
|
delete payload.manifest.version;
|
|
2877
2998
|
}
|
|
@@ -2979,6 +3100,45 @@ var init_client = __esm({
|
|
|
2979
3100
|
const [data] = await this.request("GET", `/market/capabilities/${listing_id}`);
|
|
2980
3101
|
return parseListing(data);
|
|
2981
3102
|
}
|
|
3103
|
+
async list_company_publishers() {
|
|
3104
|
+
const [data] = await this.request("GET", "/market/company-publishers");
|
|
3105
|
+
return Array.isArray(data.items) ? data.items.filter((item) => isRecord2(item)).map(parseCompanyPublisher) : [];
|
|
3106
|
+
}
|
|
3107
|
+
async request_company_publish_approval(listing_id, note) {
|
|
3108
|
+
const [data] = await this.request("POST", `/market/capabilities/${listing_id}/company-publish-approval`, {
|
|
3109
|
+
json_body: note ? { note } : {}
|
|
3110
|
+
});
|
|
3111
|
+
return parseListing(data);
|
|
3112
|
+
}
|
|
3113
|
+
async decide_company_publish_approval(listing_id, options) {
|
|
3114
|
+
const [data] = await this.request("POST", `/market/capabilities/${listing_id}/company-publish-approval/decision`, {
|
|
3115
|
+
json_body: {
|
|
3116
|
+
decision: options.decision,
|
|
3117
|
+
...options.reason ? { reason: options.reason } : {}
|
|
3118
|
+
}
|
|
3119
|
+
});
|
|
3120
|
+
return parseListing(data);
|
|
3121
|
+
}
|
|
3122
|
+
async get_capability_state(capability_key, save_key = "default") {
|
|
3123
|
+
const [data] = await this.request("GET", `/market/capability-state/${capability_key}/${save_key}`);
|
|
3124
|
+
return parseCapabilitySaveState(data);
|
|
3125
|
+
}
|
|
3126
|
+
async put_capability_state(capability_key, save_key = "default", payload = {}, options = {}) {
|
|
3127
|
+
const body = {
|
|
3128
|
+
payload: toRecord2(payload),
|
|
3129
|
+
schema_version: options.schema_version ?? "1",
|
|
3130
|
+
metadata: toRecord2(options.metadata)
|
|
3131
|
+
};
|
|
3132
|
+
if (options.expected_revision !== void 0 && options.expected_revision !== null) {
|
|
3133
|
+
body.expected_revision = Math.trunc(options.expected_revision);
|
|
3134
|
+
}
|
|
3135
|
+
const [data] = await this.request("PUT", `/market/capability-state/${capability_key}/${save_key}`, { json_body: body });
|
|
3136
|
+
return parseCapabilitySaveState(data);
|
|
3137
|
+
}
|
|
3138
|
+
async delete_capability_state(capability_key, save_key = "default") {
|
|
3139
|
+
const [data] = await this.request("DELETE", `/market/capability-state/${capability_key}/${save_key}`);
|
|
3140
|
+
return parseCapabilitySaveState(data);
|
|
3141
|
+
}
|
|
2982
3142
|
// ----- Capability bundles (v0.7 track 2) ---------------------------------
|
|
2983
3143
|
async list_bundles(options = {}) {
|
|
2984
3144
|
const params = {
|
|
@@ -6465,6 +6625,12 @@ var ListingCurrency = {
|
|
|
6465
6625
|
USD: "USD",
|
|
6466
6626
|
JPY: "JPY"
|
|
6467
6627
|
};
|
|
6628
|
+
var PersistenceMode = {
|
|
6629
|
+
NONE: "none",
|
|
6630
|
+
LOCAL: "local",
|
|
6631
|
+
PLATFORM: "platform",
|
|
6632
|
+
DEVELOPER_SERVER: "developer_server"
|
|
6633
|
+
};
|
|
6468
6634
|
var ToolManualPermissionClass = {
|
|
6469
6635
|
READ_ONLY: "read_only",
|
|
6470
6636
|
ACTION: "action",
|
|
@@ -8789,6 +8955,7 @@ export {
|
|
|
8789
8955
|
MeterClient,
|
|
8790
8956
|
OpenAIProvider,
|
|
8791
8957
|
PermissionClass,
|
|
8958
|
+
PersistenceMode,
|
|
8792
8959
|
PriceModel,
|
|
8793
8960
|
RecordMode,
|
|
8794
8961
|
Recorder,
|