@siglume/api-sdk 1.0.0 → 1.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/dist/index.d.cts CHANGED
@@ -190,6 +190,7 @@ declare const ListingCurrency: {
190
190
  readonly JPY: "JPY";
191
191
  };
192
192
  type ListingCurrency = (typeof ListingCurrency)[keyof typeof ListingCurrency];
193
+ declare const MINIMUM_JPY_OPERATION_PRICE_MINOR = 15;
193
194
  declare const PersistenceMode: {
194
195
  readonly NONE: "none";
195
196
  readonly LOCAL: "local";
@@ -224,6 +225,7 @@ interface AppManifest {
224
225
  permission_scopes?: string[];
225
226
  price_model?: PriceModel;
226
227
  price_value_minor?: number;
228
+ pricing_plan?: PricingPlan;
227
229
  currency: ListingCurrency;
228
230
  allow_free_trial: boolean;
229
231
  free_trial_duration_days?: number;
@@ -375,6 +377,28 @@ interface EnvelopeMeta {
375
377
  request_id?: string | null;
376
378
  trace_id?: string | null;
377
379
  }
380
+ interface PricingPlanItem {
381
+ key?: string | null;
382
+ label?: string | null;
383
+ price_minor?: number | null;
384
+ amount_minor?: number | null;
385
+ currency?: string | null;
386
+ unit_label?: string | null;
387
+ description?: string | null;
388
+ conditions?: unknown;
389
+ receipt_code?: string | null;
390
+ }
391
+ interface PricingPlan {
392
+ billing_model?: string | null;
393
+ display_name?: string | null;
394
+ summary?: string | null;
395
+ description?: string | null;
396
+ currency?: string | null;
397
+ unit_label?: string | null;
398
+ free_upfront_invocation?: boolean | null;
399
+ fallback_note?: string | null;
400
+ items?: PricingPlanItem[];
401
+ }
378
402
  interface CursorPage<T> {
379
403
  items: T[];
380
404
  next_cursor?: string | null;
@@ -396,6 +420,7 @@ interface AppListingRecord {
396
420
  dry_run_supported: boolean;
397
421
  price_model?: string | null;
398
422
  price_value_minor: number;
423
+ pricing_plan?: PricingPlan | null;
399
424
  currency: string;
400
425
  allow_free_trial: boolean;
401
426
  free_trial_duration_days: number;
@@ -2807,7 +2832,7 @@ interface MeteringSimulationResult {
2807
2832
  }
2808
2833
  type MeterClientOptions = SiglumeClientOptions;
2809
2834
  /**
2810
- * Experimental analytics / pre-billing wrapper for usage-event ingest.
2835
+ * Analytics wrapper for usage-event ingest and invoice previews.
2811
2836
  */
2812
2837
  declare class MeterClient {
2813
2838
  readonly experimental = true;
@@ -3073,4 +3098,4 @@ declare function validate_tool_manual(manualInput: ManualInput): [boolean, ToolM
3073
3098
 
3074
3099
  declare function renderJson(value: unknown): string;
3075
3100
 
3076
- 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 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 };
3101
+ 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 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, MINIMUM_JPY_OPERATION_PRICE_MINOR, 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 PricingPlan, type PricingPlanItem, 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,7 @@ declare const ListingCurrency: {
190
190
  readonly JPY: "JPY";
191
191
  };
192
192
  type ListingCurrency = (typeof ListingCurrency)[keyof typeof ListingCurrency];
193
+ declare const MINIMUM_JPY_OPERATION_PRICE_MINOR = 15;
193
194
  declare const PersistenceMode: {
194
195
  readonly NONE: "none";
195
196
  readonly LOCAL: "local";
@@ -224,6 +225,7 @@ interface AppManifest {
224
225
  permission_scopes?: string[];
225
226
  price_model?: PriceModel;
226
227
  price_value_minor?: number;
228
+ pricing_plan?: PricingPlan;
227
229
  currency: ListingCurrency;
228
230
  allow_free_trial: boolean;
229
231
  free_trial_duration_days?: number;
@@ -375,6 +377,28 @@ interface EnvelopeMeta {
375
377
  request_id?: string | null;
376
378
  trace_id?: string | null;
377
379
  }
380
+ interface PricingPlanItem {
381
+ key?: string | null;
382
+ label?: string | null;
383
+ price_minor?: number | null;
384
+ amount_minor?: number | null;
385
+ currency?: string | null;
386
+ unit_label?: string | null;
387
+ description?: string | null;
388
+ conditions?: unknown;
389
+ receipt_code?: string | null;
390
+ }
391
+ interface PricingPlan {
392
+ billing_model?: string | null;
393
+ display_name?: string | null;
394
+ summary?: string | null;
395
+ description?: string | null;
396
+ currency?: string | null;
397
+ unit_label?: string | null;
398
+ free_upfront_invocation?: boolean | null;
399
+ fallback_note?: string | null;
400
+ items?: PricingPlanItem[];
401
+ }
378
402
  interface CursorPage<T> {
379
403
  items: T[];
380
404
  next_cursor?: string | null;
@@ -396,6 +420,7 @@ interface AppListingRecord {
396
420
  dry_run_supported: boolean;
397
421
  price_model?: string | null;
398
422
  price_value_minor: number;
423
+ pricing_plan?: PricingPlan | null;
399
424
  currency: string;
400
425
  allow_free_trial: boolean;
401
426
  free_trial_duration_days: number;
@@ -2807,7 +2832,7 @@ interface MeteringSimulationResult {
2807
2832
  }
2808
2833
  type MeterClientOptions = SiglumeClientOptions;
2809
2834
  /**
2810
- * Experimental analytics / pre-billing wrapper for usage-event ingest.
2835
+ * Analytics wrapper for usage-event ingest and invoice previews.
2811
2836
  */
2812
2837
  declare class MeterClient {
2813
2838
  readonly experimental = true;
@@ -3073,4 +3098,4 @@ declare function validate_tool_manual(manualInput: ManualInput): [boolean, ToolM
3073
3098
 
3074
3099
  declare function renderJson(value: unknown): string;
3075
3100
 
3076
- 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 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 };
3101
+ 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 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, MINIMUM_JPY_OPERATION_PRICE_MINOR, 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 PricingPlan, type PricingPlanItem, 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
@@ -8,6 +8,81 @@ var __export = (target, all) => {
8
8
  __defProp(target, name, { get: all[name], enumerable: true });
9
9
  };
10
10
 
11
+ // src/types.ts
12
+ var PermissionClass, ApprovalMode, ExecutionKind, Environment, PriceModel, AppCategory, StoreVertical, ListingCurrency, MINIMUM_JPY_OPERATION_PRICE_MINOR, PersistenceMode, ToolManualPermissionClass, SettlementMode;
13
+ var init_types = __esm({
14
+ "src/types.ts"() {
15
+ "use strict";
16
+ PermissionClass = {
17
+ READ_ONLY: "read-only",
18
+ ACTION: "action",
19
+ PAYMENT: "payment",
20
+ /** @deprecated Use READ_ONLY. Behaves identically. */
21
+ RECOMMENDATION: "recommendation"
22
+ };
23
+ ApprovalMode = {
24
+ AUTO: "auto",
25
+ BUDGET_BOUNDED: "budget-bounded",
26
+ ALWAYS_ASK: "always-ask",
27
+ DENY: "deny"
28
+ };
29
+ ExecutionKind = {
30
+ DRY_RUN: "dry_run",
31
+ QUOTE: "quote",
32
+ ACTION: "action",
33
+ PAYMENT: "payment"
34
+ };
35
+ Environment = {
36
+ SANDBOX: "sandbox",
37
+ LIVE: "live"
38
+ };
39
+ PriceModel = {
40
+ FREE: "free",
41
+ SUBSCRIPTION: "subscription",
42
+ ONE_TIME: "one_time",
43
+ BUNDLE: "bundle",
44
+ USAGE_BASED: "usage_based",
45
+ PER_ACTION: "per_action"
46
+ };
47
+ AppCategory = {
48
+ COMMERCE: "commerce",
49
+ BOOKING: "booking",
50
+ CRM: "crm",
51
+ FINANCE: "finance",
52
+ DOCUMENT: "document",
53
+ COMMUNICATION: "communication",
54
+ MONITORING: "monitoring",
55
+ OTHER: "other"
56
+ };
57
+ StoreVertical = {
58
+ API: "api",
59
+ GAME: "game"
60
+ };
61
+ ListingCurrency = {
62
+ USD: "USD",
63
+ JPY: "JPY"
64
+ };
65
+ MINIMUM_JPY_OPERATION_PRICE_MINOR = 15;
66
+ PersistenceMode = {
67
+ NONE: "none",
68
+ LOCAL: "local",
69
+ PLATFORM: "platform",
70
+ DEVELOPER_SERVER: "developer_server"
71
+ };
72
+ ToolManualPermissionClass = {
73
+ READ_ONLY: "read_only",
74
+ ACTION: "action",
75
+ PAYMENT: "payment"
76
+ };
77
+ SettlementMode = {
78
+ STRIPE_CHECKOUT: "stripe_checkout",
79
+ STRIPE_PAYMENT_INTENT: "stripe_payment_intent",
80
+ POLYGON_MANDATE: "polygon_mandate",
81
+ EMBEDDED_WALLET_CHARGE: "embedded_wallet_charge"
82
+ };
83
+ }
84
+ });
85
+
11
86
  // src/errors.ts
12
87
  var SiglumeError, SiglumeClientError, SiglumeProjectError, SiglumeValidationError, SiglumeAssistError, SiglumeNotFoundError, SiglumeWebhookError, SiglumeWebhookSignatureError, SiglumeWebhookPayloadError, SiglumeWebhookReplayError, SiglumeAPIError;
13
88
  var init_errors = __esm({
@@ -1587,6 +1662,58 @@ function validateSaveDataSchema(schema, fieldName) {
1587
1662
  }
1588
1663
  }
1589
1664
  }
1665
+ function validatePricingPlanFloor(plan, defaultCurrency) {
1666
+ if (plan === void 0 || plan === null) {
1667
+ return;
1668
+ }
1669
+ if (!isRecord2(plan)) {
1670
+ throw new SiglumeClientError("AppManifest.pricing_plan must be an object when provided.");
1671
+ }
1672
+ const items = plan.items;
1673
+ if (items === void 0 || items === null) {
1674
+ return;
1675
+ }
1676
+ if (!Array.isArray(items)) {
1677
+ throw new SiglumeClientError("AppManifest.pricing_plan.items must be an array when provided.");
1678
+ }
1679
+ const planCurrency = String(plan.currency ?? defaultCurrency ?? "").trim().toUpperCase();
1680
+ const seenKeys = /* @__PURE__ */ new Set();
1681
+ items.forEach((item, index) => {
1682
+ if (!isRecord2(item)) {
1683
+ throw new SiglumeClientError(`AppManifest.pricing_plan.items[${index}] must be an object.`);
1684
+ }
1685
+ const itemKey = String(
1686
+ item.key ?? item.operation ?? item.operation_key ?? item.request_type ?? item.receipt_code ?? item.action ?? ""
1687
+ ).trim();
1688
+ if (!itemKey) {
1689
+ throw new SiglumeClientError(`AppManifest.pricing_plan.items[${index}].key is required.`);
1690
+ }
1691
+ if (seenKeys.has(itemKey)) {
1692
+ throw new SiglumeClientError(`AppManifest.pricing_plan.items[${index}].key duplicates ${itemKey}.`);
1693
+ }
1694
+ seenKeys.add(itemKey);
1695
+ const amountRaw = item.price_minor ?? item.amount_minor ?? item.cost_minor ?? item.value_minor;
1696
+ if (amountRaw === void 0 || amountRaw === null) {
1697
+ throw new SiglumeClientError(`AppManifest.pricing_plan.items[${index}].price_minor is required.`);
1698
+ }
1699
+ const amountMinor = typeof amountRaw === "number" ? amountRaw : typeof amountRaw === "string" && amountRaw.trim() ? Number(amountRaw) : NaN;
1700
+ if (!Number.isInteger(amountMinor)) {
1701
+ throw new SiglumeClientError(`AppManifest.pricing_plan.items[${index}].price_minor must be an integer.`);
1702
+ }
1703
+ if (amountMinor < 0) {
1704
+ throw new SiglumeClientError(`AppManifest.pricing_plan.items[${index}].price_minor must be zero or positive.`);
1705
+ }
1706
+ const currency = String(item.currency ?? planCurrency ?? defaultCurrency ?? "").trim().toUpperCase();
1707
+ if (MINIMUM_JPY_OPERATION_PRICE_CURRENCIES.has(currency) && amountMinor > 0 && amountMinor < MINIMUM_JPY_OPERATION_PRICE_MINOR) {
1708
+ throw new SiglumeClientError(
1709
+ `AppManifest.pricing_plan.items[${index}].price_minor must be 0 or at least ${MINIMUM_JPY_OPERATION_PRICE_MINOR} for JPY/JPYC operation billing.`
1710
+ );
1711
+ }
1712
+ });
1713
+ }
1714
+ function pricingPlanHasItems(plan) {
1715
+ return isRecord2(plan) && Array.isArray(plan.items) && plan.items.length > 0;
1716
+ }
1590
1717
  function buildToolManualQualityReport(payload) {
1591
1718
  const qualityBlock = isRecord2(payload.quality) ? payload.quality : payload;
1592
1719
  const issues = [];
@@ -1662,6 +1789,7 @@ function buildUrl(baseUrl, path, params) {
1662
1789
  }
1663
1790
  function parseListing(data) {
1664
1791
  const metadata = isRecord2(data.metadata) ? data.metadata : {};
1792
+ const pricing_plan = isRecord2(data.pricing_plan) ? data.pricing_plan : isRecord2(metadata.pricing_plan) ? metadata.pricing_plan : null;
1665
1793
  const persistence = isRecord2(data.persistence) ? data.persistence : isRecord2(metadata.persistence) ? metadata.persistence : {};
1666
1794
  return {
1667
1795
  listing_id: String(data.listing_id ?? data.id ?? ""),
@@ -1675,6 +1803,7 @@ function parseListing(data) {
1675
1803
  dry_run_supported: Boolean(data.dry_run_supported ?? false),
1676
1804
  price_model: stringOrNull2(data.price_model),
1677
1805
  price_value_minor: Number(data.price_value_minor ?? 0),
1806
+ pricing_plan,
1678
1807
  currency: String(data.currency ?? "USD"),
1679
1808
  allow_free_trial: Boolean(data.allow_free_trial ?? false),
1680
1809
  free_trial_duration_days: Number(data.free_trial_duration_days ?? 30),
@@ -2772,10 +2901,11 @@ function cloneJsonLike(value) {
2772
2901
  }
2773
2902
  return value;
2774
2903
  }
2775
- var DEFAULT_SIGLUME_API_BASE, RETRYABLE_STATUS_CODES, CursorPageResult, SiglumeClient;
2904
+ var DEFAULT_SIGLUME_API_BASE, RETRYABLE_STATUS_CODES, MINIMUM_JPY_OPERATION_PRICE_CURRENCIES, CursorPageResult, SiglumeClient;
2776
2905
  var init_client = __esm({
2777
2906
  "src/client.ts"() {
2778
2907
  "use strict";
2908
+ init_types();
2779
2909
  init_errors();
2780
2910
  init_webhooks();
2781
2911
  init_web3();
@@ -2783,6 +2913,7 @@ var init_client = __esm({
2783
2913
  init_utils();
2784
2914
  DEFAULT_SIGLUME_API_BASE = "https://siglume.com/v1";
2785
2915
  RETRYABLE_STATUS_CODES = /* @__PURE__ */ new Set([429, 500, 502, 503, 504]);
2916
+ MINIMUM_JPY_OPERATION_PRICE_CURRENCIES = /* @__PURE__ */ new Set(["JPY", "JPYC"]);
2786
2917
  CursorPageResult = class {
2787
2918
  items;
2788
2919
  next_cursor;
@@ -2890,6 +3021,7 @@ var init_client = __esm({
2890
3021
  "jurisdiction",
2891
3022
  "price_model",
2892
3023
  "price_value_minor",
3024
+ "pricing_plan",
2893
3025
  "currency",
2894
3026
  "allow_free_trial",
2895
3027
  "free_trial_duration_days",
@@ -2906,6 +3038,9 @@ var init_client = __esm({
2906
3038
  payload[fieldName] = value;
2907
3039
  }
2908
3040
  }
3041
+ if (payload.pricing_plan !== void 0 && (typeof payload.pricing_plan !== "object" || Array.isArray(payload.pricing_plan))) {
3042
+ throw new SiglumeClientError("AppManifest.pricing_plan must be an object when provided.");
3043
+ }
2909
3044
  if (payload.store_vertical === void 0 || payload.store_vertical === null) {
2910
3045
  throw new SiglumeClientError(
2911
3046
  "AppManifest.store_vertical is required. Choose 'api' for normal API Store listings or 'game' for API games."
@@ -2921,6 +3056,13 @@ var init_client = __esm({
2921
3056
  throw new SiglumeClientError(`AppManifest.currency must be 'USD' or 'JPY'. Got ${String(payload.currency)}.`);
2922
3057
  }
2923
3058
  payload.currency = currency;
3059
+ if (payload.pricing_plan !== void 0) {
3060
+ validatePricingPlanFloor(payload.pricing_plan, currency);
3061
+ }
3062
+ const priceModel = String(payload.price_model ?? "free").trim().toLowerCase();
3063
+ if ((priceModel === "usage_based" || priceModel === "per_action") && !pricingPlanHasItems(payload.pricing_plan)) {
3064
+ throw new SiglumeClientError("AppManifest.pricing_plan.items is required for usage_based/per_action pricing.");
3065
+ }
2924
3066
  if (payload.allow_free_trial === void 0 || payload.allow_free_trial === null) {
2925
3067
  throw new SiglumeClientError(
2926
3068
  "AppManifest.allow_free_trial is required. Pass true to offer a Plus/Pro buyer free trial or false to disable trials."
@@ -6463,73 +6605,8 @@ function toRecord3(value) {
6463
6605
  init_metering();
6464
6606
  init_operations();
6465
6607
 
6466
- // src/types.ts
6467
- var PermissionClass = {
6468
- READ_ONLY: "read-only",
6469
- ACTION: "action",
6470
- PAYMENT: "payment",
6471
- /** @deprecated Use READ_ONLY. Behaves identically. */
6472
- RECOMMENDATION: "recommendation"
6473
- };
6474
- var ApprovalMode = {
6475
- AUTO: "auto",
6476
- BUDGET_BOUNDED: "budget-bounded",
6477
- ALWAYS_ASK: "always-ask",
6478
- DENY: "deny"
6479
- };
6480
- var ExecutionKind = {
6481
- DRY_RUN: "dry_run",
6482
- QUOTE: "quote",
6483
- ACTION: "action",
6484
- PAYMENT: "payment"
6485
- };
6486
- var Environment = {
6487
- SANDBOX: "sandbox",
6488
- LIVE: "live"
6489
- };
6490
- var PriceModel = {
6491
- FREE: "free",
6492
- SUBSCRIPTION: "subscription",
6493
- ONE_TIME: "one_time",
6494
- BUNDLE: "bundle",
6495
- USAGE_BASED: "usage_based",
6496
- PER_ACTION: "per_action"
6497
- };
6498
- var AppCategory = {
6499
- COMMERCE: "commerce",
6500
- BOOKING: "booking",
6501
- CRM: "crm",
6502
- FINANCE: "finance",
6503
- DOCUMENT: "document",
6504
- COMMUNICATION: "communication",
6505
- MONITORING: "monitoring",
6506
- OTHER: "other"
6507
- };
6508
- var StoreVertical = {
6509
- API: "api",
6510
- GAME: "game"
6511
- };
6512
- var ListingCurrency = {
6513
- USD: "USD",
6514
- JPY: "JPY"
6515
- };
6516
- var PersistenceMode = {
6517
- NONE: "none",
6518
- LOCAL: "local",
6519
- PLATFORM: "platform",
6520
- DEVELOPER_SERVER: "developer_server"
6521
- };
6522
- var ToolManualPermissionClass = {
6523
- READ_ONLY: "read_only",
6524
- ACTION: "action",
6525
- PAYMENT: "payment"
6526
- };
6527
- var SettlementMode = {
6528
- STRIPE_CHECKOUT: "stripe_checkout",
6529
- STRIPE_PAYMENT_INTENT: "stripe_payment_intent",
6530
- POLYGON_MANDATE: "polygon_mandate",
6531
- EMBEDDED_WALLET_CHARGE: "embedded_wallet_charge"
6532
- };
6608
+ // src/runtime.ts
6609
+ init_types();
6533
6610
 
6534
6611
  // src/testing/recorder.ts
6535
6612
  var CASSETTE_VERSION = 1;
@@ -6927,6 +7004,7 @@ Actual: ${requestSignature(requestRecord, ignoreBodyFields)}`
6927
7004
  };
6928
7005
 
6929
7006
  // src/tool-manual-validator.ts
7007
+ init_types();
6930
7008
  init_utils();
6931
7009
  var JURISDICTION_PATTERN = /^[A-Z]{2}(-[A-Z0-9]{1,3})?$/;
6932
7010
  var TOOL_NAME_RE = /^[A-Za-z0-9_]{3,64}$/;
@@ -7201,6 +7279,64 @@ function validate_tool_manual(manualInput) {
7201
7279
  // src/runtime.ts
7202
7280
  init_web3();
7203
7281
  var CAPABILITY_KEY_RE = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
7282
+ var MINIMUM_JPY_OPERATION_PRICE_CURRENCIES2 = /* @__PURE__ */ new Set(["JPY", "JPYC"]);
7283
+ function pricingPlanFloorIssues(plan, defaultCurrency) {
7284
+ const issues = [];
7285
+ if (plan === void 0 || plan === null) {
7286
+ return issues;
7287
+ }
7288
+ if (typeof plan !== "object" || Array.isArray(plan)) {
7289
+ return ["pricing_plan must be an object when provided"];
7290
+ }
7291
+ const record = plan;
7292
+ const items = record.items;
7293
+ if (items === void 0 || items === null) {
7294
+ return issues;
7295
+ }
7296
+ if (!Array.isArray(items)) {
7297
+ return ["pricing_plan.items must be an array when provided"];
7298
+ }
7299
+ const planCurrency = String(record.currency ?? defaultCurrency ?? "").trim().toUpperCase();
7300
+ const seenKeys = /* @__PURE__ */ new Set();
7301
+ items.forEach((item, index) => {
7302
+ if (typeof item !== "object" || item === null || Array.isArray(item)) {
7303
+ issues.push(`pricing_plan.items[${index}] must be an object`);
7304
+ return;
7305
+ }
7306
+ const itemRecord = item;
7307
+ const itemKey = String(
7308
+ itemRecord.key ?? itemRecord.operation ?? itemRecord.operation_key ?? itemRecord.request_type ?? itemRecord.receipt_code ?? itemRecord.action ?? ""
7309
+ ).trim();
7310
+ if (!itemKey) {
7311
+ issues.push(`pricing_plan.items[${index}].key is required`);
7312
+ } else if (seenKeys.has(itemKey)) {
7313
+ issues.push(`pricing_plan.items[${index}].key duplicates ${itemKey}`);
7314
+ } else {
7315
+ seenKeys.add(itemKey);
7316
+ }
7317
+ const amountRaw = itemRecord.price_minor ?? itemRecord.amount_minor ?? itemRecord.cost_minor ?? itemRecord.value_minor;
7318
+ if (amountRaw === void 0 || amountRaw === null) {
7319
+ issues.push(`pricing_plan.items[${index}].price_minor is required`);
7320
+ return;
7321
+ }
7322
+ const amountMinor = typeof amountRaw === "number" ? amountRaw : typeof amountRaw === "string" && amountRaw.trim() ? Number(amountRaw) : NaN;
7323
+ if (!Number.isInteger(amountMinor)) {
7324
+ issues.push(`pricing_plan.items[${index}].price_minor must be an integer`);
7325
+ return;
7326
+ }
7327
+ if (amountMinor < 0) {
7328
+ issues.push(`pricing_plan.items[${index}].price_minor must be zero or positive`);
7329
+ return;
7330
+ }
7331
+ const currency = String(itemRecord.currency ?? planCurrency ?? defaultCurrency ?? "").trim().toUpperCase();
7332
+ if (MINIMUM_JPY_OPERATION_PRICE_CURRENCIES2.has(currency) && amountMinor > 0 && amountMinor < MINIMUM_JPY_OPERATION_PRICE_MINOR) {
7333
+ issues.push(
7334
+ `pricing_plan.items[${index}].price_minor must be 0 or at least ${MINIMUM_JPY_OPERATION_PRICE_MINOR} for JPY/JPYC operation billing`
7335
+ );
7336
+ }
7337
+ });
7338
+ return issues;
7339
+ }
7204
7340
  function normalizeExecutionResult(result, executionKind) {
7205
7341
  return {
7206
7342
  success: Boolean(result.success),
@@ -7302,6 +7438,10 @@ var AppTestHarness = class {
7302
7438
  if (!manifest.example_prompts || manifest.example_prompts.length === 0) {
7303
7439
  issues.push("at least one example_prompt is recommended");
7304
7440
  }
7441
+ issues.push(...pricingPlanFloorIssues(manifest.pricing_plan, String(manifest.currency ?? "USD")));
7442
+ if ((manifest.price_model === PriceModel.USAGE_BASED || manifest.price_model === PriceModel.PER_ACTION) && (!manifest.pricing_plan || !Array.isArray(manifest.pricing_plan.items) || manifest.pricing_plan.items.length === 0)) {
7443
+ issues.push("pricing_plan.items is required for usage_based/per_action pricing");
7444
+ }
7305
7445
  if (manifest.permission_class === PermissionClass.ACTION || manifest.permission_class === PermissionClass.PAYMENT) {
7306
7446
  if (!manifest.dry_run_supported) {
7307
7447
  issues.push("action/payment apps should support dry_run");
@@ -7377,7 +7517,7 @@ var AppTestHarness = class {
7377
7517
  };
7378
7518
  }
7379
7519
  return {
7380
- experimental: manifest.price_model === PriceModel.USAGE_BASED || manifest.price_model === PriceModel.PER_ACTION,
7520
+ experimental: false,
7381
7521
  usage_record,
7382
7522
  invoice_line_preview
7383
7523
  };
@@ -8803,6 +8943,7 @@ function readEnv(name) {
8803
8943
  }
8804
8944
 
8805
8945
  // src/index.ts
8946
+ init_types();
8806
8947
  init_web3();
8807
8948
  init_webhooks();
8808
8949
  init_utils();
@@ -8822,6 +8963,7 @@ export {
8822
8963
  InMemoryWebhookDedupe,
8823
8964
  LLMProvider,
8824
8965
  ListingCurrency,
8966
+ MINIMUM_JPY_OPERATION_PRICE_MINOR,
8825
8967
  MeterClient,
8826
8968
  OpenAIProvider,
8827
8969
  PermissionClass,