@inferencesh/sdk 0.6.47 → 0.6.48
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/types.d.ts +35 -40
- package/dist/types.js +16 -0
- package/package.json +15 -22
package/dist/types.d.ts
CHANGED
|
@@ -503,6 +503,13 @@ export interface IntegrationConnectRequest {
|
|
|
503
503
|
metadata?: {
|
|
504
504
|
[key: string]: any;
|
|
505
505
|
};
|
|
506
|
+
/**
|
|
507
|
+
* ConnectionScope is who the resulting credential belongs to:
|
|
508
|
+
* "user" (just me) or "team" (shared with the team — requires team
|
|
509
|
+
* admin). Empty = the provider's default. Distinct from Scopes, which
|
|
510
|
+
* are OAuth permission scopes.
|
|
511
|
+
*/
|
|
512
|
+
connection_scope?: CredentialScope;
|
|
506
513
|
}
|
|
507
514
|
export interface IntegrationCompleteOAuthRequest {
|
|
508
515
|
provider: string;
|
|
@@ -1135,6 +1142,7 @@ export interface PermissionModelDTO {
|
|
|
1135
1142
|
user?: UserRelationDTO;
|
|
1136
1143
|
team_id: string;
|
|
1137
1144
|
team?: TeamRelationDTO;
|
|
1145
|
+
org_id?: string;
|
|
1138
1146
|
visibility: Visibility;
|
|
1139
1147
|
}
|
|
1140
1148
|
/**
|
|
@@ -2324,6 +2332,7 @@ export interface MCPServerDTO {
|
|
|
2324
2332
|
user: UserRelationDTO;
|
|
2325
2333
|
team_id: string;
|
|
2326
2334
|
team: TeamRelationDTO;
|
|
2335
|
+
org_id?: string;
|
|
2327
2336
|
visibility: Visibility;
|
|
2328
2337
|
slug: string;
|
|
2329
2338
|
name: string;
|
|
@@ -3541,6 +3550,11 @@ export declare const GPUTypeApple: GPUType;
|
|
|
3541
3550
|
export type Visibility = string;
|
|
3542
3551
|
export declare const VisibilityPrivate: Visibility;
|
|
3543
3552
|
export declare const VisibilityTeam: Visibility;
|
|
3553
|
+
/**
|
|
3554
|
+
* VisibilityOrg sits between team and public: visible to every member of
|
|
3555
|
+
* every team in the owning team's org (INF-795 Phase 2).
|
|
3556
|
+
*/
|
|
3557
|
+
export declare const VisibilityOrg: Visibility;
|
|
3544
3558
|
export declare const VisibilityPublic: Visibility;
|
|
3545
3559
|
export declare const VisibilityUnlisted: Visibility;
|
|
3546
3560
|
/**
|
|
@@ -4004,29 +4018,13 @@ export interface ResponseFormat {
|
|
|
4004
4018
|
json_schema?: any;
|
|
4005
4019
|
strict?: boolean;
|
|
4006
4020
|
}
|
|
4007
|
-
/**
|
|
4008
|
-
* ModelSettings groups sampling and generation parameters as a passable unit.
|
|
4009
|
-
*/
|
|
4010
|
-
export interface ModelSettings {
|
|
4011
|
-
temperature?: number;
|
|
4012
|
-
top_p?: number;
|
|
4013
|
-
top_k?: number;
|
|
4014
|
-
min_p?: number;
|
|
4015
|
-
frequency_penalty?: number;
|
|
4016
|
-
presence_penalty?: number;
|
|
4017
|
-
repetition_penalty?: number;
|
|
4018
|
-
seed?: number;
|
|
4019
|
-
stop?: string[];
|
|
4020
|
-
max_tokens?: number;
|
|
4021
|
-
reasoning_effort?: string;
|
|
4022
|
-
reasoning_max_tokens?: number;
|
|
4023
|
-
}
|
|
4024
4021
|
/**
|
|
4025
4022
|
* LLMSettings is everything that configures a generation independent of the
|
|
4026
|
-
* conversation: model, sampling, system prompt, tools and output
|
|
4027
|
-
* Embedded by
|
|
4028
|
-
* LLMInput
|
|
4029
|
-
* is built from the configuration by one
|
|
4023
|
+
* conversation: model, context, sampling, system prompt, tools and output
|
|
4024
|
+
* constraints. Embedded (tstype extends) by BaseLLMInput — an agent's stored
|
|
4025
|
+
* configuration — and LLMInput — a single call — so a field added here
|
|
4026
|
+
* reaches both, and the call is built from the configuration by one
|
|
4027
|
+
* assignment.
|
|
4030
4028
|
*/
|
|
4031
4029
|
export interface LLMSettings {
|
|
4032
4030
|
model?: string;
|
|
@@ -4052,25 +4050,7 @@ export interface LLMSettings {
|
|
|
4052
4050
|
* LLMInput is the input envelope for an LLM provider task: the settings plus
|
|
4053
4051
|
* the conversation, with the current turn split out of the context.
|
|
4054
4052
|
*/
|
|
4055
|
-
export interface LLMInput {
|
|
4056
|
-
model: string;
|
|
4057
|
-
context_size: number;
|
|
4058
|
-
temperature?: number;
|
|
4059
|
-
top_p?: number;
|
|
4060
|
-
top_k?: number;
|
|
4061
|
-
min_p?: number;
|
|
4062
|
-
frequency_penalty?: number;
|
|
4063
|
-
presence_penalty?: number;
|
|
4064
|
-
repetition_penalty?: number;
|
|
4065
|
-
seed?: number;
|
|
4066
|
-
stop?: string[];
|
|
4067
|
-
max_tokens?: number;
|
|
4068
|
-
reasoning_effort?: string;
|
|
4069
|
-
reasoning_max_tokens?: number;
|
|
4070
|
-
system_prompt: string;
|
|
4071
|
-
tools?: Tool[];
|
|
4072
|
-
tool_choice?: ToolChoice;
|
|
4073
|
-
response_format?: ResponseFormat;
|
|
4053
|
+
export interface LLMInput extends LLMSettings {
|
|
4074
4054
|
context: LLMContextMessage[];
|
|
4075
4055
|
role?: ChatMessageRole;
|
|
4076
4056
|
text?: string;
|
|
@@ -4389,6 +4369,21 @@ export declare const IntegrationGrantCredentials: IntegrationGrant;
|
|
|
4389
4369
|
* IntegrationGrantToken provides ready-to-use access (token, API key, etc.).
|
|
4390
4370
|
*/
|
|
4391
4371
|
export declare const IntegrationGrantToken: IntegrationGrant;
|
|
4372
|
+
/**
|
|
4373
|
+
* CredentialScope controls resolution priority and ownership.
|
|
4374
|
+
*/
|
|
4375
|
+
export type CredentialScope = string;
|
|
4376
|
+
export declare const CredentialScopePlatform: CredentialScope;
|
|
4377
|
+
/**
|
|
4378
|
+
* CredentialScopeOrg: shared across all teams of an org. In the enum for
|
|
4379
|
+
* end-to-end typing (connect-level pickers); connects with it are refused
|
|
4380
|
+
* until the org domain lands (INF-795 Phase 2). Resolution order once
|
|
4381
|
+
* live: agent > user > team > org > platform.
|
|
4382
|
+
*/
|
|
4383
|
+
export declare const CredentialScopeOrg: CredentialScope;
|
|
4384
|
+
export declare const CredentialScopeTeam: CredentialScope;
|
|
4385
|
+
export declare const CredentialScopeUser: CredentialScope;
|
|
4386
|
+
export declare const CredentialScopeAgent: CredentialScope;
|
|
4392
4387
|
/**
|
|
4393
4388
|
* NotificationChannel represents a delivery channel
|
|
4394
4389
|
*/
|
package/dist/types.js
CHANGED
|
@@ -474,6 +474,11 @@ export const GPUTypeAMD = "amd";
|
|
|
474
474
|
export const GPUTypeApple = "apple";
|
|
475
475
|
export const VisibilityPrivate = "private";
|
|
476
476
|
export const VisibilityTeam = "team";
|
|
477
|
+
/**
|
|
478
|
+
* VisibilityOrg sits between team and public: visible to every member of
|
|
479
|
+
* every team in the owning team's org (INF-795 Phase 2).
|
|
480
|
+
*/
|
|
481
|
+
export const VisibilityOrg = "org";
|
|
477
482
|
export const VisibilityPublic = "public";
|
|
478
483
|
export const VisibilityUnlisted = "unlisted";
|
|
479
484
|
export const PermRead = "read";
|
|
@@ -853,6 +858,17 @@ export const IntegrationGrantCredentials = "credentials";
|
|
|
853
858
|
* IntegrationGrantToken provides ready-to-use access (token, API key, etc.).
|
|
854
859
|
*/
|
|
855
860
|
export const IntegrationGrantToken = "token";
|
|
861
|
+
export const CredentialScopePlatform = "platform";
|
|
862
|
+
/**
|
|
863
|
+
* CredentialScopeOrg: shared across all teams of an org. In the enum for
|
|
864
|
+
* end-to-end typing (connect-level pickers); connects with it are refused
|
|
865
|
+
* until the org domain lands (INF-795 Phase 2). Resolution order once
|
|
866
|
+
* live: agent > user > team > org > platform.
|
|
867
|
+
*/
|
|
868
|
+
export const CredentialScopeOrg = "org";
|
|
869
|
+
export const CredentialScopeTeam = "team";
|
|
870
|
+
export const CredentialScopeUser = "user";
|
|
871
|
+
export const CredentialScopeAgent = "agent";
|
|
856
872
|
export const NotificationChannelEmail = "email";
|
|
857
873
|
export const NotificationChannelSMS = "sms";
|
|
858
874
|
export const NotificationChannelPush = "push";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inferencesh/sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.48",
|
|
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",
|
|
@@ -47,21 +47,6 @@
|
|
|
47
47
|
"default": "./dist/api/files.js"
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
"scripts": {
|
|
51
|
-
"build": "tsc",
|
|
52
|
-
"test": "jest --testPathIgnorePatterns=/integration\\.test\\.ts$ --testPathIgnorePatterns=\\.integration\\.test\\.ts$",
|
|
53
|
-
"test:integration": "jest --testPathPattern=integration --testTimeout=120000 --runInBand",
|
|
54
|
-
"test:all": "jest --testTimeout=120000 --runInBand",
|
|
55
|
-
"test:watch": "jest --watch --testPathIgnorePatterns=/integration\\.test\\.ts$ --testPathIgnorePatterns=\\.integration\\.test\\.ts$",
|
|
56
|
-
"test:coverage": "jest --coverage --testPathIgnorePatterns=/integration\\.test\\.ts$ --testPathIgnorePatterns=\\.integration\\.test\\.ts$",
|
|
57
|
-
"lint": "eslint src",
|
|
58
|
-
"lint:fix": "eslint src --fix",
|
|
59
|
-
"format": "prettier --write \"src/**/*.ts\"",
|
|
60
|
-
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
61
|
-
"clean": "rimraf dist coverage",
|
|
62
|
-
"prepublishOnly": "npm run clean && npm run build && npm test",
|
|
63
|
-
"example": "node examples/basic.js"
|
|
64
|
-
},
|
|
65
50
|
"keywords": [
|
|
66
51
|
"inference",
|
|
67
52
|
"ai",
|
|
@@ -146,10 +131,18 @@
|
|
|
146
131
|
"LICENSE",
|
|
147
132
|
"CHANGELOG.md"
|
|
148
133
|
],
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
134
|
+
"scripts": {
|
|
135
|
+
"build": "tsc",
|
|
136
|
+
"test": "jest --testPathIgnorePatterns=/integration\\.test\\.ts$ --testPathIgnorePatterns=\\.integration\\.test\\.ts$",
|
|
137
|
+
"test:integration": "jest --testPathPattern=integration --testTimeout=120000 --runInBand",
|
|
138
|
+
"test:all": "jest --testTimeout=120000 --runInBand",
|
|
139
|
+
"test:watch": "jest --watch --testPathIgnorePatterns=/integration\\.test\\.ts$ --testPathIgnorePatterns=\\.integration\\.test\\.ts$",
|
|
140
|
+
"test:coverage": "jest --coverage --testPathIgnorePatterns=/integration\\.test\\.ts$ --testPathIgnorePatterns=\\.integration\\.test\\.ts$",
|
|
141
|
+
"lint": "eslint src",
|
|
142
|
+
"lint:fix": "eslint src --fix",
|
|
143
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
144
|
+
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
145
|
+
"clean": "rimraf dist coverage",
|
|
146
|
+
"example": "node examples/basic.js"
|
|
154
147
|
}
|
|
155
|
-
}
|
|
148
|
+
}
|