@inferencesh/sdk 0.17.0 → 0.18.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/dist/types.d.ts +61 -16
- package/dist/types.js +32 -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/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
|
}
|
|
@@ -1870,13 +1888,6 @@ export interface ChatMessageDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
1870
1888
|
tool_call_id?: string;
|
|
1871
1889
|
tool_invocations?: ToolInvocationDTO[];
|
|
1872
1890
|
}
|
|
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
1891
|
/**
|
|
1881
1892
|
* PolicyRuleDTO is one rule, typed form Kind[selector](specifier).
|
|
1882
1893
|
*/
|
|
@@ -1884,10 +1895,10 @@ export interface PolicyRuleDTO {
|
|
|
1884
1895
|
id: string;
|
|
1885
1896
|
effect: PolicyEffect;
|
|
1886
1897
|
/**
|
|
1887
|
-
* Kind: RemoteExec, Workspace, Harness, Tool
|
|
1888
|
-
* Agent, Knowledge, Mcp, Flow
|
|
1898
|
+
* Kind: what the rule governs (RemoteExec, Workspace, Harness, Tool,
|
|
1899
|
+
* and the usage kinds App, Agent, Knowledge, Mcp, Flow).
|
|
1889
1900
|
*/
|
|
1890
|
-
kind:
|
|
1901
|
+
kind: PolicyKind;
|
|
1891
1902
|
/**
|
|
1892
1903
|
* Selector narrows the rule to one remote (its id) or a tag (tag:<name>);
|
|
1893
1904
|
* empty applies everywhere.
|
|
@@ -4157,11 +4168,6 @@ export interface TeamDTO extends BaseModelDTO {
|
|
|
4157
4168
|
* org it is without belonging to the org workspace.
|
|
4158
4169
|
*/
|
|
4159
4170
|
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
4171
|
}
|
|
4166
4172
|
/**
|
|
4167
4173
|
* TeamMemberDTO is the API response for a team member.
|
|
@@ -4715,7 +4721,6 @@ export declare const ChannelTypeTelegram: ChannelType;
|
|
|
4715
4721
|
export interface ChatData {
|
|
4716
4722
|
plan_steps: PlanStep[];
|
|
4717
4723
|
memory: StringEncodedMap;
|
|
4718
|
-
always_allowed_tools: string[];
|
|
4719
4724
|
/**
|
|
4720
4725
|
* AllowAllTools runs every tool call in this chat without asking. The
|
|
4721
4726
|
* person switches it in the chat's settings, and off again at any time.
|
|
@@ -5543,6 +5548,46 @@ export declare const NotificationStatusDelivered: NotificationStatus;
|
|
|
5543
5548
|
export declare const NotificationStatusFailed: NotificationStatus;
|
|
5544
5549
|
export declare const NotificationStatusBounced: NotificationStatus;
|
|
5545
5550
|
export declare const NotificationStatusCancelled: NotificationStatus;
|
|
5551
|
+
/**
|
|
5552
|
+
* PolicyEffect is a rule's outcome and a decision's verdict.
|
|
5553
|
+
*/
|
|
5554
|
+
export type PolicyEffect = "allow" | "ask" | "deny";
|
|
5555
|
+
export declare const PolicyEffectAllow: PolicyEffect;
|
|
5556
|
+
export declare const PolicyEffectAsk: PolicyEffect;
|
|
5557
|
+
export declare const PolicyEffectDeny: PolicyEffect;
|
|
5558
|
+
/**
|
|
5559
|
+
* PolicyKind names what a rule governs; each kind has one matcher.
|
|
5560
|
+
*/
|
|
5561
|
+
export type PolicyKind = "RemoteExec" | "Workspace" | "Harness" | "Tool" | "App" | "Agent" | "Knowledge" | "Mcp" | "Flow" | "WebFetch";
|
|
5562
|
+
/**
|
|
5563
|
+
* PolicyKindRemoteExec: shell commands run on a remote.
|
|
5564
|
+
*/
|
|
5565
|
+
export declare const PolicyKindRemoteExec: PolicyKind;
|
|
5566
|
+
/**
|
|
5567
|
+
* PolicyKindWorkspace: folders on a remote.
|
|
5568
|
+
*/
|
|
5569
|
+
export declare const PolicyKindWorkspace: PolicyKind;
|
|
5570
|
+
/**
|
|
5571
|
+
* PolicyKindHarness: a harness's own tool approvals, e.g.
|
|
5572
|
+
* Harness(Bash(git status:*)).
|
|
5573
|
+
*/
|
|
5574
|
+
export declare const PolicyKindHarness: PolicyKind;
|
|
5575
|
+
/**
|
|
5576
|
+
* PolicyKindTool: a tool call our own agent loop makes, by tool name.
|
|
5577
|
+
*/
|
|
5578
|
+
export declare const PolicyKindTool: PolicyKind;
|
|
5579
|
+
/**
|
|
5580
|
+
* Usage kinds (UsageCategory.PolicyKind): rules name resolved ids.
|
|
5581
|
+
*/
|
|
5582
|
+
export declare const PolicyKindApp: PolicyKind;
|
|
5583
|
+
export declare const PolicyKindAgent: PolicyKind;
|
|
5584
|
+
export declare const PolicyKindKnowledge: PolicyKind;
|
|
5585
|
+
export declare const PolicyKindMcp: PolicyKind;
|
|
5586
|
+
export declare const PolicyKindFlow: PolicyKind;
|
|
5587
|
+
/**
|
|
5588
|
+
* PolicyKindWebFetch: fetched domains.
|
|
5589
|
+
*/
|
|
5590
|
+
export declare const PolicyKindWebFetch: PolicyKind;
|
|
5546
5591
|
/**
|
|
5547
5592
|
* FunctionKind is how an app function talks to its caller.
|
|
5548
5593
|
*/
|
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).
|
|
@@ -1066,6 +1063,38 @@ export const NotificationStatusDelivered = "delivered";
|
|
|
1066
1063
|
export const NotificationStatusFailed = "failed";
|
|
1067
1064
|
export const NotificationStatusBounced = "bounced";
|
|
1068
1065
|
export const NotificationStatusCancelled = "cancelled";
|
|
1066
|
+
export const PolicyEffectAllow = "allow";
|
|
1067
|
+
export const PolicyEffectAsk = "ask";
|
|
1068
|
+
export const PolicyEffectDeny = "deny";
|
|
1069
|
+
/**
|
|
1070
|
+
* PolicyKindRemoteExec: shell commands run on a remote.
|
|
1071
|
+
*/
|
|
1072
|
+
export const PolicyKindRemoteExec = "RemoteExec";
|
|
1073
|
+
/**
|
|
1074
|
+
* PolicyKindWorkspace: folders on a remote.
|
|
1075
|
+
*/
|
|
1076
|
+
export const PolicyKindWorkspace = "Workspace";
|
|
1077
|
+
/**
|
|
1078
|
+
* PolicyKindHarness: a harness's own tool approvals, e.g.
|
|
1079
|
+
* Harness(Bash(git status:*)).
|
|
1080
|
+
*/
|
|
1081
|
+
export const PolicyKindHarness = "Harness";
|
|
1082
|
+
/**
|
|
1083
|
+
* PolicyKindTool: a tool call our own agent loop makes, by tool name.
|
|
1084
|
+
*/
|
|
1085
|
+
export const PolicyKindTool = "Tool";
|
|
1086
|
+
/**
|
|
1087
|
+
* Usage kinds (UsageCategory.PolicyKind): rules name resolved ids.
|
|
1088
|
+
*/
|
|
1089
|
+
export const PolicyKindApp = "App";
|
|
1090
|
+
export const PolicyKindAgent = "Agent";
|
|
1091
|
+
export const PolicyKindKnowledge = "Knowledge";
|
|
1092
|
+
export const PolicyKindMcp = "Mcp";
|
|
1093
|
+
export const PolicyKindFlow = "Flow";
|
|
1094
|
+
/**
|
|
1095
|
+
* PolicyKindWebFetch: fetched domains.
|
|
1096
|
+
*/
|
|
1097
|
+
export const PolicyKindWebFetch = "WebFetch";
|
|
1069
1098
|
/**
|
|
1070
1099
|
* FunctionKindRun takes an input and returns an output (optionally
|
|
1071
1100
|
* yielding progress on the way). The zero value means this.
|