@inferencesh/sdk 0.38.12 → 0.38.14

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.
@@ -60,7 +60,7 @@
60
60
  "apps:execute"
61
61
  ],
62
62
  "also": [
63
- "engines:write"
63
+ "engine_self"
64
64
  ]
65
65
  },
66
66
  {
@@ -205,7 +205,7 @@
205
205
  "billing:read",
206
206
  "conversations:read",
207
207
  "credentials:read",
208
- "engines:write",
208
+ "engine_self",
209
209
  "knowledge:read",
210
210
  "remotes:read",
211
211
  "remotes:write",
package/dist/types.d.ts CHANGED
@@ -3213,7 +3213,7 @@ export interface WorkerRAM {
3213
3213
  * a task lists the ones it needs (Task.Requires); the scheduler only sends
3214
3214
  * a task to an engine that has every one it needs.
3215
3215
  */
3216
- export type EngineCapability = "egress_gateway" | "sandboxes" | "capacity" | "egress_pending" | "egress_grants";
3216
+ export type EngineCapability = "egress_gateway" | "sandboxes" | "capacity" | "egress_pending" | "egress_grants" | "egress_decide";
3217
3217
  /**
3218
3218
  * EngineCapabilityEgressGateway: the engine runs its sandboxes behind
3219
3219
  * the egress gateway, so it can take bound secrets (the v2 secrets
@@ -3247,6 +3247,14 @@ export declare const EngineCapabilityEgressPending: EngineCapability;
3247
3247
  * an engine (INF-1173).
3248
3248
  */
3249
3249
  export declare const EngineCapabilityEgressGrants: EngineCapability;
3250
+ /**
3251
+ * EngineCapabilityEgressDecide: the engine's gateway reports what it
3252
+ * saw on a request (EgressResolveRequest.Observed) and carries out the
3253
+ * API's answer, every time in it included (HoldUntil, HoldOffMs,
3254
+ * MaxHoldMs, Resend, the retry status); it wakes held requests on
3255
+ * egress_answer and acks egress_revoke (INF-1173).
3256
+ */
3257
+ export declare const EngineCapabilityEgressDecide: EngineCapability;
3250
3258
  /**
3251
3259
  * EngineCapabilities is a set of capabilities, kept as a list. Nil and
3252
3260
  * empty are the same: nothing beyond the base contract.
@@ -3333,6 +3341,13 @@ export interface EntitlementErrorMeta {
3333
3341
  addon_plan_id?: string;
3334
3342
  addon_plan_name?: string;
3335
3343
  addon_plan_price?: number;
3344
+ /**
3345
+ * Requirement is the unmet requirement of a purchase_required refusal,
3346
+ * WithinDays its window, BillingPage where to meet it.
3347
+ */
3348
+ requirement?: FeatureRequirement;
3349
+ within_days?: number;
3350
+ billing_page?: string;
3336
3351
  }
3337
3352
  /**
3338
3353
  * EntitlementRequestDTO is a team's request for an entitlement, with the
@@ -3384,7 +3399,7 @@ export interface DecideEntitlementRequestRequest {
3384
3399
  * and APIError.Code on the legacy envelope. Clients branch on these, so a
3385
3400
  * code is a named const here, where it generates into models and the SDKs.
3386
3401
  */
3387
- export type ErrorCode = "invalid_request" | "validation_error" | "unauthorized" | "forbidden" | "not_found" | "conflict" | "name_conflict" | "already_exists" | "not_configured" | "method_not_allowed" | "rate_limited" | "internal_error" | "access_restricted" | "web_access_restricted" | "requirements_not_met" | "team_role_required" | "in_other_workspace" | "blocked_by_usage_policy" | "last_owner" | "account_deactivated" | "account_banned" | "person_required" | "otp_required" | "requires_sign_in" | "insufficient_scope" | "invalid_scope" | "impersonation_reason_required" | "mcp_auth_expired" | "admin_session_required" | "admin_scopes_not_approved" | "cli_session_required" | "admin_required" | "same_admin_required" | "browser_session_required" | "invalid_ttl" | "admin_authenticator_required" | "last_authenticator" | "limit_exceeded" | "feature_not_available" | "entitlement_unavailable" | "payment_required" | "payment_method_required" | "form_closed" | "already_submitted" | "already_claimed" | "already_entitled" | "request_open" | "invalid_code" | "already_processed" | "expired" | "code_confirmation_required" | "app_retired" | "app_maintenance" | "invalid_transition" | "maintenance" | "SESSION_NOT_FOUND" | "SESSION_EXPIRED" | "SESSION_ENDED" | "WORKER_LEASED" | "APP_MISMATCH" | "VERSION_MISMATCH" | "agents_disabled" | "remote_offline" | "remote_timeout" | "harness_not_drivable" | "harness_too_old";
3402
+ export type ErrorCode = "invalid_request" | "validation_error" | "unauthorized" | "forbidden" | "not_found" | "conflict" | "name_conflict" | "already_exists" | "not_configured" | "method_not_allowed" | "rate_limited" | "internal_error" | "access_restricted" | "web_access_restricted" | "requirements_not_met" | "team_role_required" | "in_other_workspace" | "blocked_by_usage_policy" | "last_owner" | "account_deactivated" | "account_banned" | "person_required" | "otp_required" | "requires_sign_in" | "insufficient_scope" | "invalid_scope" | "impersonation_reason_required" | "mcp_auth_expired" | "admin_session_required" | "admin_scopes_not_approved" | "cli_session_required" | "admin_required" | "same_admin_required" | "browser_session_required" | "invalid_ttl" | "admin_authenticator_required" | "last_authenticator" | "limit_exceeded" | "feature_not_available" | "entitlement_unavailable" | "purchase_required" | "payment_required" | "payment_method_required" | "form_closed" | "already_submitted" | "notifications_disabled" | "already_claimed" | "already_entitled" | "request_open" | "invalid_code" | "already_processed" | "expired" | "code_confirmation_required" | "app_retired" | "app_maintenance" | "invalid_transition" | "maintenance" | "SESSION_NOT_FOUND" | "SESSION_EXPIRED" | "SESSION_ENDED" | "WORKER_LEASED" | "APP_MISMATCH" | "VERSION_MISMATCH" | "agents_disabled" | "remote_offline" | "remote_timeout" | "harness_not_drivable" | "harness_too_old";
3388
3403
  export declare const ErrorCodeInvalidRequest: ErrorCode;
3389
3404
  export declare const ErrorCodeValidationError: ErrorCode;
3390
3405
  export declare const ErrorCodeUnauthorized: ErrorCode;
@@ -3526,6 +3541,13 @@ export declare const ErrorCodeLastAuthenticator: ErrorCode;
3526
3541
  export declare const ErrorCodeLimitExceeded: ErrorCode;
3527
3542
  export declare const ErrorCodeFeatureNotAvailable: ErrorCode;
3528
3543
  export declare const ErrorCodeEntitlementUnavailable: ErrorCode;
3544
+ /**
3545
+ * ErrorCodePurchaseRequired (402): the feature requires a purchase
3546
+ * within the last EntitlementErrorMeta.WithinDays days
3547
+ * (shared.RequireRecentPurchase) and the team's payer made none. Meta is
3548
+ * EntitlementErrorMeta, with BillingPage where to make one.
3549
+ */
3550
+ export declare const ErrorCodePurchaseRequired: ErrorCode;
3529
3551
  export declare const ErrorCodePaymentRequired: ErrorCode;
3530
3552
  /**
3531
3553
  * ErrorCodePaymentMethodRequired (402): the action needs a saved payment
@@ -3540,6 +3562,11 @@ export declare const ErrorCodePaymentMethodRequired: ErrorCode;
3540
3562
  */
3541
3563
  export declare const ErrorCodeFormClosed: ErrorCode;
3542
3564
  export declare const ErrorCodeAlreadySubmitted: ErrorCode;
3565
+ /**
3566
+ * ErrorCodeNotificationsDisabled (409): the recipient switched this
3567
+ * notification off in their notification preferences.
3568
+ */
3569
+ export declare const ErrorCodeNotificationsDisabled: ErrorCode;
3543
3570
  /**
3544
3571
  * Bounty claims (409): the caller already claimed this proof, or as many
3545
3572
  * times as the program allows.
@@ -8097,6 +8124,13 @@ export declare const ResourceFeatureTeamBilling: EntitlementResource;
8097
8124
  export declare const ResourceFeatureAutoRecharge: EntitlementResource;
8098
8125
  export declare const ResourceFeatureInvoices: EntitlementResource;
8099
8126
  export declare const ResourceFeaturePublishApps: EntitlementResource;
8127
+ /**
8128
+ * FeatureRequirement is a condition a team must meet to pass a feature gate
8129
+ * on top of its entitlement (FeatureRequires). An enabled boolean row with
8130
+ * source override, which staff grant, waives a feature's requirements.
8131
+ */
8132
+ export type FeatureRequirement = "recent_purchase";
8133
+ export declare const RequireRecentPurchase: FeatureRequirement;
8100
8134
  export type ContentRating = "safe" | "sexual_suggestive" | "sexual_explicit" | "violence_non_graphic" | "violence_graphic" | "gore" | "unrated";
8101
8135
  export declare const ContentSafe: ContentRating;
8102
8136
  export declare const ContentSexualSuggestive: ContentRating;
package/dist/types.js CHANGED
@@ -509,6 +509,14 @@ export const EngineCapabilityEgressPending = "egress_pending";
509
509
  * an engine (INF-1173).
510
510
  */
511
511
  export const EngineCapabilityEgressGrants = "egress_grants";
512
+ /**
513
+ * EngineCapabilityEgressDecide: the engine's gateway reports what it
514
+ * saw on a request (EgressResolveRequest.Observed) and carries out the
515
+ * API's answer, every time in it included (HoldUntil, HoldOffMs,
516
+ * MaxHoldMs, Resend, the retry status); it wakes held requests on
517
+ * egress_answer and acks egress_revoke (INF-1173).
518
+ */
519
+ export const EngineCapabilityEgressDecide = "egress_decide";
512
520
  export const ErrorCodeInvalidRequest = "invalid_request";
513
521
  export const ErrorCodeValidationError = "validation_error";
514
522
  export const ErrorCodeUnauthorized = "unauthorized";
@@ -650,6 +658,13 @@ export const ErrorCodeLastAuthenticator = "last_authenticator";
650
658
  export const ErrorCodeLimitExceeded = "limit_exceeded";
651
659
  export const ErrorCodeFeatureNotAvailable = "feature_not_available";
652
660
  export const ErrorCodeEntitlementUnavailable = "entitlement_unavailable";
661
+ /**
662
+ * ErrorCodePurchaseRequired (402): the feature requires a purchase
663
+ * within the last EntitlementErrorMeta.WithinDays days
664
+ * (shared.RequireRecentPurchase) and the team's payer made none. Meta is
665
+ * EntitlementErrorMeta, with BillingPage where to make one.
666
+ */
667
+ export const ErrorCodePurchaseRequired = "purchase_required";
653
668
  export const ErrorCodePaymentRequired = "payment_required";
654
669
  /**
655
670
  * ErrorCodePaymentMethodRequired (402): the action needs a saved payment
@@ -664,6 +679,11 @@ export const ErrorCodePaymentMethodRequired = "payment_method_required";
664
679
  */
665
680
  export const ErrorCodeFormClosed = "form_closed";
666
681
  export const ErrorCodeAlreadySubmitted = "already_submitted";
682
+ /**
683
+ * ErrorCodeNotificationsDisabled (409): the recipient switched this
684
+ * notification off in their notification preferences.
685
+ */
686
+ export const ErrorCodeNotificationsDisabled = "notifications_disabled";
667
687
  /**
668
688
  * Bounty claims (409): the caller already claimed this proof, or as many
669
689
  * times as the program allows.
@@ -1623,6 +1643,7 @@ export const ResourceFeatureTeamBilling = "feature:team_billing";
1623
1643
  export const ResourceFeatureAutoRecharge = "feature:auto_recharge";
1624
1644
  export const ResourceFeatureInvoices = "feature:invoices";
1625
1645
  export const ResourceFeaturePublishApps = "feature:publish_apps";
1646
+ export const RequireRecentPurchase = "recent_purchase";
1626
1647
  export const ContentSafe = "safe";
1627
1648
  export const ContentSexualSuggestive = "sexual_suggestive";
1628
1649
  export const ContentSexualExplicit = "sexual_explicit";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inferencesh/sdk",
3
- "version": "0.38.12",
3
+ "version": "0.38.14",
4
4
  "description": "Official JavaScript/TypeScript SDK for inference.sh - Run AI models with a simple API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",