@inferencesh/sdk 0.39.4 → 0.40.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/CHANGELOG.md +14 -0
- package/dist/types.d.ts +59 -32
- package/dist/types.js +13 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.40.0] - 2026-11-14
|
|
11
|
+
|
|
12
|
+
**Breaking:** types regenerated from the API (api-v1551 to api-v1565).
|
|
13
|
+
|
|
14
|
+
### Removed
|
|
15
|
+
- `vault_id` on `CreateSandboxRequest` and on agent versions and agent config: a sandbox's and an agent's inference.sh access is `api_scopes` now (INF-1292). The API refuses `vault_id` on `POST /sandboxes` with a 400.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- `api_scopes` on `CreateSandboxRequest`, `AgentVersionDTO` and `AgentConfigInput`.
|
|
19
|
+
- `CredentialConfigDTO.own_app_scope` and `CredentialAppRequest.scope` (team OAuth apps).
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- Chat strictness levels that are unset are left out of replies instead of sent as `""`: `ChatSettingsDTO.strictness`, `ChatStrictnessDTO.chat` and `.minimum` are optional. A request with `""` gets a 400; clear a chat's level with `DELETE /chats/{id}/strictness`.
|
|
23
|
+
|
|
10
24
|
## [0.39.4] - 2026-11-13
|
|
11
25
|
|
|
12
26
|
### Fixed
|
package/dist/types.d.ts
CHANGED
|
@@ -342,11 +342,11 @@ export interface AgentVersionDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
342
342
|
*/
|
|
343
343
|
content_guard?: ContentGuardConfig;
|
|
344
344
|
/**
|
|
345
|
-
*
|
|
346
|
-
* get the
|
|
347
|
-
*
|
|
345
|
+
* APIScopes is the inference.sh access the sandboxes its
|
|
346
|
+
* sandbox_create makes get, cut to what the run can hand on. Absent:
|
|
347
|
+
* none.
|
|
348
348
|
*/
|
|
349
|
-
|
|
349
|
+
api_scopes?: Scope[];
|
|
350
350
|
/**
|
|
351
351
|
* VisitorReads is the scope groups of the team's resources (knowledge,
|
|
352
352
|
* files, artifacts, remotes) a visitor of an embed of this version can
|
|
@@ -403,10 +403,11 @@ export interface AgentConfigInput {
|
|
|
403
403
|
output_schema?: any;
|
|
404
404
|
content_guard?: ContentGuardConfig;
|
|
405
405
|
/**
|
|
406
|
-
*
|
|
407
|
-
*
|
|
406
|
+
* APIScopes is the inference.sh access the sandboxes it makes get:
|
|
407
|
+
* reads, apps:execute, files:write and apps:write, none the writer
|
|
408
|
+
* does not hold.
|
|
408
409
|
*/
|
|
409
|
-
|
|
410
|
+
api_scopes?: Scope[];
|
|
410
411
|
}
|
|
411
412
|
/**
|
|
412
413
|
* CoreAppConfigInput is the API input shape for core app configuration.
|
|
@@ -1428,8 +1429,9 @@ export interface ScopeDefinition {
|
|
|
1428
1429
|
*/
|
|
1429
1430
|
costs_credits?: boolean;
|
|
1430
1431
|
/**
|
|
1431
|
-
* Sandbox: a
|
|
1432
|
-
*
|
|
1432
|
+
* Sandbox: a sandbox may be granted it (its inference.sh access,
|
|
1433
|
+
* AgentVersionDTO.APIScopes, CreateSandboxRequest.APIScopes); the
|
|
1434
|
+
* allowlist is models.SandboxMayHold.
|
|
1433
1435
|
*/
|
|
1434
1436
|
sandbox?: boolean;
|
|
1435
1437
|
}
|
|
@@ -2468,8 +2470,9 @@ export interface ChatSettingsRequest {
|
|
|
2468
2470
|
*/
|
|
2469
2471
|
forget_memory?: string[];
|
|
2470
2472
|
/**
|
|
2471
|
-
* Strictness
|
|
2472
|
-
* guard flags something it read: watch, ask or strict
|
|
2473
|
+
* Strictness sets what the agent does in this chat after the content
|
|
2474
|
+
* guard flags something it read: watch, ask or strict; anything else,
|
|
2475
|
+
* "" included, is refused. DELETE /chats/{id}/strictness clears the
|
|
2473
2476
|
* chat's own level, so the agent's default applies. A team or org
|
|
2474
2477
|
* minimum still raises it (GET /chats/{id}/strictness).
|
|
2475
2478
|
*/
|
|
@@ -2495,32 +2498,35 @@ export interface ChatSettingsDTO {
|
|
|
2495
2498
|
*/
|
|
2496
2499
|
memory: StringEncodedMap;
|
|
2497
2500
|
/**
|
|
2498
|
-
* Strictness is agent_data.strictness: the chat's own level
|
|
2499
|
-
* it follows the agent's default.
|
|
2501
|
+
* Strictness is agent_data.strictness: the chat's own level; absent
|
|
2502
|
+
* when it follows the agent's default.
|
|
2500
2503
|
*/
|
|
2501
|
-
strictness
|
|
2504
|
+
strictness?: ChatStrictness;
|
|
2502
2505
|
}
|
|
2503
2506
|
/**
|
|
2504
2507
|
* ChatStrictnessDTO is GET /chats/{id}/strictness: what the agent does in
|
|
2505
2508
|
* the chat after the content guard flags something it read, and where that
|
|
2506
2509
|
* comes from. Effective is the strictest of the chat's level (Chat, else
|
|
2507
|
-
* AgentDefault
|
|
2510
|
+
* AgentDefault), Minimum and Delegated. A level that is not set is absent.
|
|
2508
2511
|
*/
|
|
2509
2512
|
export interface ChatStrictnessDTO {
|
|
2510
2513
|
chat_id: string;
|
|
2511
2514
|
/**
|
|
2512
|
-
* Chat is the chat's own level
|
|
2515
|
+
* Chat is the chat's own level (for a sub-agent's chat that sets none,
|
|
2516
|
+
* its nearest ancestor's); absent when it follows the agent.
|
|
2513
2517
|
*/
|
|
2514
|
-
chat
|
|
2518
|
+
chat?: ChatStrictness;
|
|
2515
2519
|
/**
|
|
2516
|
-
* AgentDefault is the agent's content_guard.strictness
|
|
2520
|
+
* AgentDefault is the agent's content_guard.strictness, watch when the
|
|
2521
|
+
* agent sets none.
|
|
2517
2522
|
*/
|
|
2518
2523
|
agent_default: ChatStrictness;
|
|
2519
2524
|
/**
|
|
2520
2525
|
* Minimum is the strictest level the chat's team or org governance
|
|
2521
|
-
* policy sets;
|
|
2526
|
+
* policy sets; absent when neither sets one. Levels below it are
|
|
2527
|
+
* locked.
|
|
2522
2528
|
*/
|
|
2523
|
-
minimum
|
|
2529
|
+
minimum?: ChatStrictness;
|
|
2524
2530
|
/**
|
|
2525
2531
|
* MinimumSetBy is the rung that set Minimum: team or org.
|
|
2526
2532
|
*/
|
|
@@ -2528,7 +2534,7 @@ export interface ChatStrictnessDTO {
|
|
|
2528
2534
|
/**
|
|
2529
2535
|
* Delegated is, for a sub-agent's chat, the level the chat that
|
|
2530
2536
|
* delegated to it runs at: a floor, so a sub-agent never runs looser
|
|
2531
|
-
* than its delegating chat.
|
|
2537
|
+
* than its delegating chat. Absent for a chat no agent delegated.
|
|
2532
2538
|
*/
|
|
2533
2539
|
delegated?: ChatStrictness;
|
|
2534
2540
|
/**
|
|
@@ -2899,8 +2905,9 @@ export interface ContentGuardConfig {
|
|
|
2899
2905
|
ignore_rules?: string[];
|
|
2900
2906
|
/**
|
|
2901
2907
|
* Strictness is what the agent's chats do after the guard flags a
|
|
2902
|
-
* result, unless a chat sets its own: watch
|
|
2903
|
-
* (shared.ChatStrictness).
|
|
2908
|
+
* result, unless a chat sets its own: watch, ask or strict
|
|
2909
|
+
* (shared.ChatStrictness). Left out, it is watch; "" is refused. A
|
|
2910
|
+
* team or org minimum still raises it.
|
|
2904
2911
|
*/
|
|
2905
2912
|
strictness?: ChatStrictness;
|
|
2906
2913
|
}
|
|
@@ -3029,6 +3036,13 @@ export interface CredentialConfigDTO {
|
|
|
3029
3036
|
* login itself.
|
|
3030
3037
|
*/
|
|
3031
3038
|
app?: CredentialDTO;
|
|
3039
|
+
/**
|
|
3040
|
+
* OwnAppScope is where an app this caller saves without naming a scope
|
|
3041
|
+
* lands, when that is not the workspace's own: "platform" for the
|
|
3042
|
+
* platform team, whose usual app serves every workspace. The form then
|
|
3043
|
+
* asks which is meant (CredentialAppRequest.Scope). Empty: the team's.
|
|
3044
|
+
*/
|
|
3045
|
+
own_app_scope?: CredentialScope;
|
|
3032
3046
|
/**
|
|
3033
3047
|
* AppNoun is what that app is called ("GitHub App") when it is not an
|
|
3034
3048
|
* OAuth sign-in app: its logins connect something other than a person
|
|
@@ -3717,7 +3731,7 @@ export interface DecideEntitlementRequestRequest {
|
|
|
3717
3731
|
* and APIError.Code on the legacy envelope. Clients branch on these, so a
|
|
3718
3732
|
* code is a named const here, where it generates into models and the SDKs.
|
|
3719
3733
|
*/
|
|
3720
|
-
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" | "visibility_not_allowed" | "blocked_by_usage_policy" | "last_owner" | "account_deactivated" | "account_banned" | "publish_quarantined" | "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_origin_required" | "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";
|
|
3734
|
+
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" | "visibility_not_allowed" | "blocked_by_usage_policy" | "last_owner" | "account_deactivated" | "account_banned" | "publish_quarantined" | "file_in_use" | "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_origin_required" | "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" | "listing_not_live" | "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";
|
|
3721
3735
|
export declare const ErrorCodeInvalidRequest: ErrorCode;
|
|
3722
3736
|
export declare const ErrorCodeValidationError: ErrorCode;
|
|
3723
3737
|
export declare const ErrorCodeUnauthorized: ErrorCode;
|
|
@@ -3792,6 +3806,12 @@ export declare const ErrorCodeAccountBanned: ErrorCode;
|
|
|
3792
3806
|
* PublishQuarantinedMeta; Until says from when a new account can.
|
|
3793
3807
|
*/
|
|
3794
3808
|
export declare const ErrorCodePublishQuarantined: ErrorCode;
|
|
3809
|
+
/**
|
|
3810
|
+
* ErrorCodeFileInUse (409): the file is used by live content (a skill's
|
|
3811
|
+
* files, an artifact's assets) and was not deleted. Meta is FileInUseMeta:
|
|
3812
|
+
* the content using it. Staff may delete it anyway (?force=true).
|
|
3813
|
+
*/
|
|
3814
|
+
export declare const ErrorCodeFileInUse: ErrorCode;
|
|
3795
3815
|
/**
|
|
3796
3816
|
* ErrorCodePersonRequired (403): only a person may do this, and the
|
|
3797
3817
|
* caller is a workspace's service account (a workspace API key), or the
|
|
@@ -3934,6 +3954,13 @@ export declare const ErrorCodeCodeConfirmationRequired: ErrorCode;
|
|
|
3934
3954
|
* theirs. InvalidTransition (409): the task already moved on.
|
|
3935
3955
|
*/
|
|
3936
3956
|
export declare const ErrorCodeAppRetired: ErrorCode;
|
|
3957
|
+
/**
|
|
3958
|
+
* ListingNotLive (410): the app, agent, skill or knowledge entry is
|
|
3959
|
+
* listed in the store and its listing serves no reviewed version now,
|
|
3960
|
+
* so a caller who does not own it is not served it. One answer whatever
|
|
3961
|
+
* took it down.
|
|
3962
|
+
*/
|
|
3963
|
+
export declare const ErrorCodeListingNotLive: ErrorCode;
|
|
3937
3964
|
export declare const ErrorCodeAppMaintenance: ErrorCode;
|
|
3938
3965
|
export declare const ErrorCodeInvalidTransition: ErrorCode;
|
|
3939
3966
|
/**
|
|
@@ -5756,13 +5783,13 @@ export interface CreateSandboxRequest {
|
|
|
5756
5783
|
*/
|
|
5757
5784
|
from_snapshot_id?: string;
|
|
5758
5785
|
/**
|
|
5759
|
-
*
|
|
5760
|
-
*
|
|
5761
|
-
* on. Empty: the
|
|
5762
|
-
*
|
|
5763
|
-
*
|
|
5786
|
+
* APIScopes is the inference.sh access the box gets beyond running
|
|
5787
|
+
* its remote: reads, apps:execute, files:write and apps:write, cut to
|
|
5788
|
+
* what the caller can hand on. Empty: the remote's alone. A sandbox an
|
|
5789
|
+
* agent's sandbox_create makes takes the agent's
|
|
5790
|
+
* (AgentVersionDTO.APIScopes) instead.
|
|
5764
5791
|
*/
|
|
5765
|
-
|
|
5792
|
+
api_scopes?: Scope[];
|
|
5766
5793
|
}
|
|
5767
5794
|
/**
|
|
5768
5795
|
* UpdateSandboxRequest is PATCH /sandboxes/{id}: the fields to change,
|
|
@@ -5892,8 +5919,8 @@ export interface SandboxDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
5892
5919
|
last_activity_at?: string;
|
|
5893
5920
|
/**
|
|
5894
5921
|
* APIScopes are what the box may do with our API beyond running its
|
|
5895
|
-
* remote: copied
|
|
5896
|
-
* whole life. Absent or empty: nothing beyond the remote.
|
|
5922
|
+
* remote: copied when it was made (CreateSandboxRequest.APIScopes, or
|
|
5923
|
+
* its agent's), for its whole life. Absent or empty: nothing beyond the remote.
|
|
5897
5924
|
*/
|
|
5898
5925
|
api_scopes?: Scope[];
|
|
5899
5926
|
}
|
package/dist/types.js
CHANGED
|
@@ -662,6 +662,12 @@ export const ErrorCodeAccountBanned = "account_banned";
|
|
|
662
662
|
* PublishQuarantinedMeta; Until says from when a new account can.
|
|
663
663
|
*/
|
|
664
664
|
export const ErrorCodePublishQuarantined = "publish_quarantined";
|
|
665
|
+
/**
|
|
666
|
+
* ErrorCodeFileInUse (409): the file is used by live content (a skill's
|
|
667
|
+
* files, an artifact's assets) and was not deleted. Meta is FileInUseMeta:
|
|
668
|
+
* the content using it. Staff may delete it anyway (?force=true).
|
|
669
|
+
*/
|
|
670
|
+
export const ErrorCodeFileInUse = "file_in_use";
|
|
665
671
|
/**
|
|
666
672
|
* ErrorCodePersonRequired (403): only a person may do this, and the
|
|
667
673
|
* caller is a workspace's service account (a workspace API key), or the
|
|
@@ -804,6 +810,13 @@ export const ErrorCodeCodeConfirmationRequired = "code_confirmation_required";
|
|
|
804
810
|
* theirs. InvalidTransition (409): the task already moved on.
|
|
805
811
|
*/
|
|
806
812
|
export const ErrorCodeAppRetired = "app_retired";
|
|
813
|
+
/**
|
|
814
|
+
* ListingNotLive (410): the app, agent, skill or knowledge entry is
|
|
815
|
+
* listed in the store and its listing serves no reviewed version now,
|
|
816
|
+
* so a caller who does not own it is not served it. One answer whatever
|
|
817
|
+
* took it down.
|
|
818
|
+
*/
|
|
819
|
+
export const ErrorCodeListingNotLive = "listing_not_live";
|
|
807
820
|
export const ErrorCodeAppMaintenance = "app_maintenance";
|
|
808
821
|
export const ErrorCodeInvalidTransition = "invalid_transition";
|
|
809
822
|
/**
|