@inferencesh/sdk 0.17.0 → 0.19.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 +12 -0
- package/README.md +0 -1
- package/dist/types.d.ts +66 -36
- package/dist/types.js +36 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.18.0] - 2026-10-04
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `AgentPermissions` and `permissions` on agent configs: what an agent's new chats may do without asking (`allow_all_tools`).
|
|
15
|
+
- `PolicyKind` (`RemoteExec`, `Workspace`, `Harness`, `Tool`, `WebFetch`, and the usage kinds `App`, `Agent`, `Knowledge`, `Mcp`, `Flow`) with its constants. `PolicyRuleDTO.kind` is a `PolicyKind`.
|
|
16
|
+
|
|
17
|
+
### Removed
|
|
18
|
+
|
|
19
|
+
- `ChatData.always_allowed_tools`. A chat's always-allow list became chat rules (`GET /chats/{id}/rules`); the api no longer sends it.
|
|
20
|
+
- `TeamDTO.usage_policy_id`. A workspace's usage policy is a policy attached to it; the org's workspace list carries it.
|
|
21
|
+
|
|
10
22
|
## [0.17.0] - 2026-10-02
|
|
11
23
|
|
|
12
24
|
### Changed
|
package/README.md
CHANGED
|
@@ -557,7 +557,6 @@ Runs a task on inference.sh.
|
|
|
557
557
|
| `params.input` | `object` | Yes | Input parameters for the app |
|
|
558
558
|
| `params.setup` | `object` | No | Setup parameters (affects worker warmth/scheduling) |
|
|
559
559
|
| `params.infra` | `string` | No | Infrastructure: `'cloud'` or `'private'` |
|
|
560
|
-
| `params.variant` | `string` | No | App variant to use |
|
|
561
560
|
| `params.session` | `string` | No | Session ID or `'new'` to start a new session |
|
|
562
561
|
| `params.session_timeout` | `number` | No | Session timeout in seconds (1-3600, only with `session: 'new'`) |
|
|
563
562
|
|
package/dist/types.d.ts
CHANGED
|
@@ -18,6 +18,22 @@ export interface InternalToolsConfig {
|
|
|
18
18
|
remote?: boolean;
|
|
19
19
|
knowledge?: boolean;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* AgentPermissions is what an agent's new chats in its own workspace may do
|
|
23
|
+
* without asking (INF-906). Each is copied into such a chat when it is
|
|
24
|
+
* created; the chat owns it from then on. Chats other workspaces start with
|
|
25
|
+
* the agent get none of it: they run on their own remotes and tools. A team
|
|
26
|
+
* or org policy still asks or denies over it.
|
|
27
|
+
*/
|
|
28
|
+
export interface AgentPermissions {
|
|
29
|
+
/**
|
|
30
|
+
* AllowAllTools starts each new chat with "allow every tool" on: loop
|
|
31
|
+
* tools, harness tools and remote_exec commands run without asking. For
|
|
32
|
+
* agents nobody watches (webhook and cron runs), where an approval would
|
|
33
|
+
* stall the run.
|
|
34
|
+
*/
|
|
35
|
+
allow_all_tools?: boolean;
|
|
36
|
+
}
|
|
21
37
|
/**
|
|
22
38
|
* AgentTool represents a unified tool that can be used by an agent
|
|
23
39
|
*/
|
|
@@ -254,6 +270,7 @@ export interface AgentVersionDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
254
270
|
skills: SkillConfig[];
|
|
255
271
|
context?: ContextField[];
|
|
256
272
|
internal_tools?: InternalToolsConfig;
|
|
273
|
+
permissions?: AgentPermissions;
|
|
257
274
|
hooks?: LifecycleHookConfig[];
|
|
258
275
|
output_schema?: any;
|
|
259
276
|
}
|
|
@@ -287,6 +304,7 @@ export interface AgentConfigInput {
|
|
|
287
304
|
skills?: SkillConfig[];
|
|
288
305
|
context?: ContextField[];
|
|
289
306
|
internal_tools?: InternalToolsConfig;
|
|
307
|
+
permissions?: AgentPermissions;
|
|
290
308
|
hooks?: LifecycleHookConfig[];
|
|
291
309
|
output_schema?: any;
|
|
292
310
|
}
|
|
@@ -443,9 +461,6 @@ export interface AppVersionInput {
|
|
|
443
461
|
[key: string]: AppFunction;
|
|
444
462
|
};
|
|
445
463
|
default_function?: string;
|
|
446
|
-
variants?: {
|
|
447
|
-
[key: string]: AppVariant;
|
|
448
|
-
};
|
|
449
464
|
env?: {
|
|
450
465
|
[key: string]: string;
|
|
451
466
|
};
|
|
@@ -1152,18 +1167,6 @@ export interface AppResources {
|
|
|
1152
1167
|
gpu: AppGPUResource;
|
|
1153
1168
|
ram: number;
|
|
1154
1169
|
}
|
|
1155
|
-
/**
|
|
1156
|
-
* AppVariant is a named resource/env configuration variant.
|
|
1157
|
-
*/
|
|
1158
|
-
export interface AppVariant {
|
|
1159
|
-
name: string;
|
|
1160
|
-
order: number;
|
|
1161
|
-
resources: AppResources;
|
|
1162
|
-
env: {
|
|
1163
|
-
[key: string]: string;
|
|
1164
|
-
};
|
|
1165
|
-
python: string;
|
|
1166
|
-
}
|
|
1167
1170
|
/**
|
|
1168
1171
|
* SecretRequirement defines a secret that an app requires to run.
|
|
1169
1172
|
*/
|
|
@@ -1240,9 +1243,6 @@ export interface AppVersionDTO extends BaseModelDTO {
|
|
|
1240
1243
|
[key: string]: AppFunction;
|
|
1241
1244
|
};
|
|
1242
1245
|
default_function?: string;
|
|
1243
|
-
variants: {
|
|
1244
|
-
[key: string]: AppVariant;
|
|
1245
|
-
};
|
|
1246
1246
|
env: {
|
|
1247
1247
|
[key: string]: string;
|
|
1248
1248
|
};
|
|
@@ -1870,13 +1870,6 @@ export interface ChatMessageDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
1870
1870
|
tool_call_id?: string;
|
|
1871
1871
|
tool_invocations?: ToolInvocationDTO[];
|
|
1872
1872
|
}
|
|
1873
|
-
/**
|
|
1874
|
-
* PolicyEffect is a rule's outcome: allow, ask or deny.
|
|
1875
|
-
*/
|
|
1876
|
-
export type PolicyEffect = "allow" | "ask" | "deny";
|
|
1877
|
-
export declare const PolicyEffectAllow: PolicyEffect;
|
|
1878
|
-
export declare const PolicyEffectAsk: PolicyEffect;
|
|
1879
|
-
export declare const PolicyEffectDeny: PolicyEffect;
|
|
1880
1873
|
/**
|
|
1881
1874
|
* PolicyRuleDTO is one rule, typed form Kind[selector](specifier).
|
|
1882
1875
|
*/
|
|
@@ -1884,10 +1877,10 @@ export interface PolicyRuleDTO {
|
|
|
1884
1877
|
id: string;
|
|
1885
1878
|
effect: PolicyEffect;
|
|
1886
1879
|
/**
|
|
1887
|
-
* Kind: RemoteExec, Workspace, Harness, Tool
|
|
1888
|
-
* Agent, Knowledge, Mcp, Flow
|
|
1880
|
+
* Kind: what the rule governs (RemoteExec, Workspace, Harness, Tool,
|
|
1881
|
+
* and the usage kinds App, Agent, Knowledge, Mcp, Flow).
|
|
1889
1882
|
*/
|
|
1890
|
-
kind:
|
|
1883
|
+
kind: PolicyKind;
|
|
1891
1884
|
/**
|
|
1892
1885
|
* Selector narrows the rule to one remote (its id) or a tag (tag:<name>);
|
|
1893
1886
|
* empty applies everywhere.
|
|
@@ -4042,7 +4035,6 @@ export interface TaskDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
4042
4035
|
app?: AppDTO;
|
|
4043
4036
|
app_version_id: string;
|
|
4044
4037
|
app_version?: AppVersionDTO;
|
|
4045
|
-
app_variant: string;
|
|
4046
4038
|
function: string;
|
|
4047
4039
|
infra: Infra;
|
|
4048
4040
|
workers: string[];
|
|
@@ -4157,11 +4149,6 @@ export interface TeamDTO extends BaseModelDTO {
|
|
|
4157
4149
|
* org it is without belonging to the org workspace.
|
|
4158
4150
|
*/
|
|
4159
4151
|
org_name?: string;
|
|
4160
|
-
/**
|
|
4161
|
-
* UsagePolicyID of the team's own usage policy ('' = inherit the org's,
|
|
4162
|
-
* or ungoverned when standalone, INF-808).
|
|
4163
|
-
*/
|
|
4164
|
-
usage_policy_id?: string;
|
|
4165
4152
|
}
|
|
4166
4153
|
/**
|
|
4167
4154
|
* TeamMemberDTO is the API response for a team member.
|
|
@@ -4715,7 +4702,6 @@ export declare const ChannelTypeTelegram: ChannelType;
|
|
|
4715
4702
|
export interface ChatData {
|
|
4716
4703
|
plan_steps: PlanStep[];
|
|
4717
4704
|
memory: StringEncodedMap;
|
|
4718
|
-
always_allowed_tools: string[];
|
|
4719
4705
|
/**
|
|
4720
4706
|
* AllowAllTools runs every tool call in this chat without asking. The
|
|
4721
4707
|
* person switches it in the chat's settings, and off again at any time.
|
|
@@ -5324,7 +5310,7 @@ export declare const DeviceTokenKindSession: DeviceTokenKind;
|
|
|
5324
5310
|
* TODO: retire once CLIs older than the session-token release are gone.
|
|
5325
5311
|
*/
|
|
5326
5312
|
export declare const DeviceTokenKindAPIKey: DeviceTokenKind;
|
|
5327
|
-
export type EntitlementResource = "api_keys" | "connectors" | "knowledge_bases" | "storage_mb" | "concurrency" | "rate_per_min" | "seats" | "triggers" | "retention_days" | "private_apps" | "task_executions" | "feature:byok" | "feature:seedance" | "feature:scopes" | "feature:webhooks" | "feature:team_billing" | "feature:auto_recharge" | "feature:invoices" | "feature:publish_apps";
|
|
5313
|
+
export type EntitlementResource = "api_keys" | "connectors" | "knowledge_bases" | "storage_mb" | "concurrency" | "rate_per_min" | "seats" | "triggers" | "retention_days" | "private_apps" | "task_executions" | "feature:byok" | "feature:seedance" | "feature:marketplace_publish" | "feature:scopes" | "feature:webhooks" | "feature:team_billing" | "feature:auto_recharge" | "feature:invoices" | "feature:publish_apps";
|
|
5328
5314
|
/**
|
|
5329
5315
|
* Capacity limits — scale with tier
|
|
5330
5316
|
*/
|
|
@@ -5347,6 +5333,10 @@ export declare const ResourceTaskExecutions: EntitlementResource;
|
|
|
5347
5333
|
*/
|
|
5348
5334
|
export declare const ResourceFeatureBYOK: EntitlementResource;
|
|
5349
5335
|
export declare const ResourceFeatureSeedance: EntitlementResource;
|
|
5336
|
+
/**
|
|
5337
|
+
* Granted per team: the marketplace takes submissions by invitation.
|
|
5338
|
+
*/
|
|
5339
|
+
export declare const ResourceFeatureMarketplacePublish: EntitlementResource;
|
|
5350
5340
|
/**
|
|
5351
5341
|
* Legacy feature gates — kept for DB compatibility, no longer gated
|
|
5352
5342
|
*/
|
|
@@ -5543,6 +5533,46 @@ export declare const NotificationStatusDelivered: NotificationStatus;
|
|
|
5543
5533
|
export declare const NotificationStatusFailed: NotificationStatus;
|
|
5544
5534
|
export declare const NotificationStatusBounced: NotificationStatus;
|
|
5545
5535
|
export declare const NotificationStatusCancelled: NotificationStatus;
|
|
5536
|
+
/**
|
|
5537
|
+
* PolicyEffect is a rule's outcome and a decision's verdict.
|
|
5538
|
+
*/
|
|
5539
|
+
export type PolicyEffect = "allow" | "ask" | "deny";
|
|
5540
|
+
export declare const PolicyEffectAllow: PolicyEffect;
|
|
5541
|
+
export declare const PolicyEffectAsk: PolicyEffect;
|
|
5542
|
+
export declare const PolicyEffectDeny: PolicyEffect;
|
|
5543
|
+
/**
|
|
5544
|
+
* PolicyKind names what a rule governs; each kind has one matcher.
|
|
5545
|
+
*/
|
|
5546
|
+
export type PolicyKind = "RemoteExec" | "Workspace" | "Harness" | "Tool" | "App" | "Agent" | "Knowledge" | "Mcp" | "Flow" | "WebFetch";
|
|
5547
|
+
/**
|
|
5548
|
+
* PolicyKindRemoteExec: shell commands run on a remote.
|
|
5549
|
+
*/
|
|
5550
|
+
export declare const PolicyKindRemoteExec: PolicyKind;
|
|
5551
|
+
/**
|
|
5552
|
+
* PolicyKindWorkspace: folders on a remote.
|
|
5553
|
+
*/
|
|
5554
|
+
export declare const PolicyKindWorkspace: PolicyKind;
|
|
5555
|
+
/**
|
|
5556
|
+
* PolicyKindHarness: a harness's own tool approvals, e.g.
|
|
5557
|
+
* Harness(Bash(git status:*)).
|
|
5558
|
+
*/
|
|
5559
|
+
export declare const PolicyKindHarness: PolicyKind;
|
|
5560
|
+
/**
|
|
5561
|
+
* PolicyKindTool: a tool call our own agent loop makes, by tool name.
|
|
5562
|
+
*/
|
|
5563
|
+
export declare const PolicyKindTool: PolicyKind;
|
|
5564
|
+
/**
|
|
5565
|
+
* Usage kinds (UsageCategory.PolicyKind): rules name resolved ids.
|
|
5566
|
+
*/
|
|
5567
|
+
export declare const PolicyKindApp: PolicyKind;
|
|
5568
|
+
export declare const PolicyKindAgent: PolicyKind;
|
|
5569
|
+
export declare const PolicyKindKnowledge: PolicyKind;
|
|
5570
|
+
export declare const PolicyKindMcp: PolicyKind;
|
|
5571
|
+
export declare const PolicyKindFlow: PolicyKind;
|
|
5572
|
+
/**
|
|
5573
|
+
* PolicyKindWebFetch: fetched domains.
|
|
5574
|
+
*/
|
|
5575
|
+
export declare const PolicyKindWebFetch: PolicyKind;
|
|
5546
5576
|
/**
|
|
5547
5577
|
* FunctionKind is how an app function talks to its caller.
|
|
5548
5578
|
*/
|
package/dist/types.js
CHANGED
|
@@ -302,9 +302,6 @@ export const ScopeGroupKnowledge = "knowledge";
|
|
|
302
302
|
export const ScopeGroupArtifacts = "artifacts";
|
|
303
303
|
export const ScopeGroupUser = "user";
|
|
304
304
|
export const ScopeGroupSettings = "settings";
|
|
305
|
-
export const PolicyEffectAllow = "allow";
|
|
306
|
-
export const PolicyEffectAsk = "ask";
|
|
307
|
-
export const PolicyEffectDeny = "deny";
|
|
308
305
|
/**
|
|
309
306
|
* AlwaysAllowScopeExact: this call exactly (each piece of the command,
|
|
310
307
|
* the file, the domain).
|
|
@@ -910,6 +907,10 @@ export const ResourceTaskExecutions = "task_executions";
|
|
|
910
907
|
*/
|
|
911
908
|
export const ResourceFeatureBYOK = "feature:byok";
|
|
912
909
|
export const ResourceFeatureSeedance = "feature:seedance";
|
|
910
|
+
/**
|
|
911
|
+
* Granted per team: the marketplace takes submissions by invitation.
|
|
912
|
+
*/
|
|
913
|
+
export const ResourceFeatureMarketplacePublish = "feature:marketplace_publish";
|
|
913
914
|
/**
|
|
914
915
|
* Legacy feature gates — kept for DB compatibility, no longer gated
|
|
915
916
|
*/
|
|
@@ -1066,6 +1067,38 @@ export const NotificationStatusDelivered = "delivered";
|
|
|
1066
1067
|
export const NotificationStatusFailed = "failed";
|
|
1067
1068
|
export const NotificationStatusBounced = "bounced";
|
|
1068
1069
|
export const NotificationStatusCancelled = "cancelled";
|
|
1070
|
+
export const PolicyEffectAllow = "allow";
|
|
1071
|
+
export const PolicyEffectAsk = "ask";
|
|
1072
|
+
export const PolicyEffectDeny = "deny";
|
|
1073
|
+
/**
|
|
1074
|
+
* PolicyKindRemoteExec: shell commands run on a remote.
|
|
1075
|
+
*/
|
|
1076
|
+
export const PolicyKindRemoteExec = "RemoteExec";
|
|
1077
|
+
/**
|
|
1078
|
+
* PolicyKindWorkspace: folders on a remote.
|
|
1079
|
+
*/
|
|
1080
|
+
export const PolicyKindWorkspace = "Workspace";
|
|
1081
|
+
/**
|
|
1082
|
+
* PolicyKindHarness: a harness's own tool approvals, e.g.
|
|
1083
|
+
* Harness(Bash(git status:*)).
|
|
1084
|
+
*/
|
|
1085
|
+
export const PolicyKindHarness = "Harness";
|
|
1086
|
+
/**
|
|
1087
|
+
* PolicyKindTool: a tool call our own agent loop makes, by tool name.
|
|
1088
|
+
*/
|
|
1089
|
+
export const PolicyKindTool = "Tool";
|
|
1090
|
+
/**
|
|
1091
|
+
* Usage kinds (UsageCategory.PolicyKind): rules name resolved ids.
|
|
1092
|
+
*/
|
|
1093
|
+
export const PolicyKindApp = "App";
|
|
1094
|
+
export const PolicyKindAgent = "Agent";
|
|
1095
|
+
export const PolicyKindKnowledge = "Knowledge";
|
|
1096
|
+
export const PolicyKindMcp = "Mcp";
|
|
1097
|
+
export const PolicyKindFlow = "Flow";
|
|
1098
|
+
/**
|
|
1099
|
+
* PolicyKindWebFetch: fetched domains.
|
|
1100
|
+
*/
|
|
1101
|
+
export const PolicyKindWebFetch = "WebFetch";
|
|
1069
1102
|
/**
|
|
1070
1103
|
* FunctionKindRun takes an input and returns an output (optionally
|
|
1071
1104
|
* yielding progress on the way). The zero value means this.
|