@inferencesh/sdk 0.14.0 → 0.14.1

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 CHANGED
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.14.1] - 2026-10-01
11
+
12
+ ### Added
13
+
14
+ - `internalTools()` builder methods for every category: `knowledge()` (search, read, save and delete skills and knowledge entries), `agent()` (run a copy of the agent on a side task), `skills()`, `artifact()` and `remote()`.
15
+ - `InternalToolsConfig.knowledge` and `InternalToolsConfig.agent`.
16
+
17
+ ### Changed
18
+
19
+ - `InternalToolsConfig.spawn` is now `agent`. The API still reads a stored or sent `spawn` as `agent`.
20
+
21
+ ### Deprecated
22
+
23
+ - `InternalToolsConfig.host_context`: the API ignores it and no longer offers `get_host_context` or `send_to_host`.
24
+
10
25
  ## [0.14.0] - 2026-09-27
11
26
 
12
27
  ### Fixed
package/README.md CHANGED
@@ -378,7 +378,7 @@ Use the fluent builders to define `AgentTool` schemas. Client tools (`tool`) run
378
378
  | `httpTool(name, url)` / `callTool(name, url)` | Server | HTTP request with credential injection (preferred over `webhookTool`) |
379
379
  | `webhookTool(name, url)` | Server | Unsigned webhook (legacy; use `httpTool` for new tools) |
380
380
  | `mcpTool(name, credentialId, toolName)` | Server | Call a tool through a connected MCP credential |
381
- | `internalTools()` | Server | Built-in plan, memory, and widget tools |
381
+ | `internalTools()` | Server | Built-in tools: plan, memory, widget, finish, skills, meta, remote, knowledge, artifact, agent |
382
382
 
383
383
  ```typescript
384
384
  import {
@@ -136,6 +136,14 @@ declare class InternalToolsBuilder {
136
136
  meta(enabled?: boolean): this;
137
137
  /** Enable remote tools (run commands on the user's connected remotes) */
138
138
  remote(enabled?: boolean): this;
139
+ /** Enable knowledge tools (search, read and save the user's skills and knowledge entries) */
140
+ knowledge(enabled?: boolean): this;
141
+ /** Enable skill_get for the skills configured on the agent (on by default) */
142
+ skills(enabled?: boolean): this;
143
+ /** Enable artifact tools (publish shareable HTML/Markdown pages) */
144
+ artifact(enabled?: boolean): this;
145
+ /** Enable the agent tool (run a copy of this agent on a side task) */
146
+ agent(enabled?: boolean): this;
139
147
  /** Enable all internal tools */
140
148
  all(): this;
141
149
  /** Disable all internal tools */
@@ -293,6 +293,26 @@ class InternalToolsBuilder {
293
293
  this.config.remote = enabled;
294
294
  return this;
295
295
  }
296
+ /** Enable knowledge tools (search, read and save the user's skills and knowledge entries) */
297
+ knowledge(enabled = true) {
298
+ this.config.knowledge = enabled;
299
+ return this;
300
+ }
301
+ /** Enable skill_get for the skills configured on the agent (on by default) */
302
+ skills(enabled = true) {
303
+ this.config.skills = enabled;
304
+ return this;
305
+ }
306
+ /** Enable artifact tools (publish shareable HTML/Markdown pages) */
307
+ artifact(enabled = true) {
308
+ this.config.artifact = enabled;
309
+ return this;
310
+ }
311
+ /** Enable the agent tool (run a copy of this agent on a side task) */
312
+ agent(enabled = true) {
313
+ this.config.agent = enabled;
314
+ return this;
315
+ }
296
316
  /** Enable all internal tools */
297
317
  all() {
298
318
  this.config.plan = true;
package/dist/types.d.ts CHANGED
@@ -10,8 +10,9 @@ export interface InternalToolsConfig {
10
10
  host_context?: boolean;
11
11
  meta?: boolean;
12
12
  artifact?: boolean;
13
- spawn?: boolean;
13
+ agent?: boolean;
14
14
  remote?: boolean;
15
+ knowledge?: boolean;
15
16
  }
16
17
  /**
17
18
  * AgentTool represents a unified tool that can be used by an agent
@@ -84,6 +85,13 @@ export interface AppToolConfig {
84
85
  session_enabled?: boolean;
85
86
  setup?: any;
86
87
  input?: any;
88
+ /**
89
+ * FixedInput pins arguments: they are merged over whatever the model sent,
90
+ * and removed from the tool schema the model is shown, so it neither sees
91
+ * nor controls them. Input only supplies defaults the model may override;
92
+ * this is for values an operator decides, not the model.
93
+ */
94
+ fixed_input?: any;
87
95
  }
88
96
  export interface AgentToolConfig {
89
97
  ref: string;
@@ -153,6 +161,7 @@ export interface AppToolConfigDTO {
153
161
  session_enabled?: boolean;
154
162
  setup?: any;
155
163
  input?: any;
164
+ fixed_input?: any;
156
165
  }
157
166
  export interface AgentToolConfigDTO {
158
167
  ref: string;
@@ -2960,10 +2969,6 @@ export interface OrgDTO extends BaseModelDTO {
2960
2969
  name: string;
2961
2970
  avatar_url?: string;
2962
2971
  default_team_id?: string;
2963
- /**
2964
- * UsagePolicyID of the org's usage policy ('' = ungoverned, INF-808).
2965
- */
2966
- usage_policy_id?: string;
2967
2972
  /**
2968
2973
  * IsAdmin: whether the CALLER is on this org's admin grant list. Set on
2969
2974
  * caller-scoped responses.
@@ -4268,7 +4273,7 @@ export declare const PlanStepStatusPending: PlanStepStatus;
4268
4273
  export declare const PlanStepStatusInProgress: PlanStepStatus;
4269
4274
  export declare const PlanStepStatusCompleted: PlanStepStatus;
4270
4275
  export declare const PlanStepStatusCancelled: PlanStepStatus;
4271
- export type ChatMessageRole = "system" | "user" | "assistant" | "tool" | "injection" | "compaction";
4276
+ export type ChatMessageRole = "system" | "user" | "assistant" | "tool" | "injection" | "compaction" | "event";
4272
4277
  /**
4273
4278
  * LLM wire-protocol roles
4274
4279
  */
@@ -4279,22 +4284,25 @@ export declare const ChatMessageRoleTool: ChatMessageRole;
4279
4284
  /**
4280
4285
  * Internal bookkeeping roles — never sent to the LLM provider.
4281
4286
  * BuildContext folds injections into the user turn and replaces
4282
- * compaction markers with their summary.
4287
+ * compaction markers with their summary. Event messages are display-only
4288
+ * system info (a hook ran, ...) and BuildContext skips them.
4283
4289
  */
4284
4290
  export declare const ChatMessageRoleInjection: ChatMessageRole;
4285
4291
  export declare const ChatMessageRoleCompaction: ChatMessageRole;
4292
+ export declare const ChatMessageRoleEvent: ChatMessageRole;
4286
4293
  export type ChatMessageStatus = "pending" | "queued" | "ready" | "failed" | "cancelled";
4287
4294
  export declare const ChatMessageStatusPending: ChatMessageStatus;
4288
4295
  export declare const ChatMessageStatusQueued: ChatMessageStatus;
4289
4296
  export declare const ChatMessageStatusReady: ChatMessageStatus;
4290
4297
  export declare const ChatMessageStatusFailed: ChatMessageStatus;
4291
4298
  export declare const ChatMessageStatusCancelled: ChatMessageStatus;
4292
- export type ChatMessageContentType = "text" | "reasoning" | "image" | "file" | "tool";
4299
+ export type ChatMessageContentType = "text" | "reasoning" | "image" | "file" | "tool" | "event";
4293
4300
  export declare const ChatMessageContentTypeText: ChatMessageContentType;
4294
4301
  export declare const ChatMessageContentTypeReasoning: ChatMessageContentType;
4295
4302
  export declare const ChatMessageContentTypeImage: ChatMessageContentType;
4296
4303
  export declare const ChatMessageContentTypeFile: ChatMessageContentType;
4297
4304
  export declare const ChatMessageContentTypeTool: ChatMessageContentType;
4305
+ export declare const ChatMessageContentTypeEvent: ChatMessageContentType;
4298
4306
  export type ChannelType = "slack" | "discord" | "teams" | "telegram";
4299
4307
  export declare const ChannelTypeSlack: ChannelType;
4300
4308
  export declare const ChannelTypeDiscord: ChannelType;
@@ -4328,6 +4336,34 @@ export interface ChatMessageContent {
4328
4336
  image?: string;
4329
4337
  file?: string;
4330
4338
  tool_calls?: ToolCall[];
4339
+ event?: ChatEvent;
4340
+ }
4341
+ export type ChatEventType = "hook";
4342
+ export declare const ChatEventTypeHook: ChatEventType;
4343
+ /**
4344
+ * ChatEvent is the payload of an event-role message: system info shown in the
4345
+ * chat but never sent to the model.
4346
+ */
4347
+ export interface ChatEvent {
4348
+ type: ChatEventType;
4349
+ hook?: ChatHookEvent;
4350
+ }
4351
+ /**
4352
+ * ChatHookEvent records one lifecycle hook handler run.
4353
+ */
4354
+ export interface ChatHookEvent {
4355
+ event: HookEvent;
4356
+ handler_type: HookHandlerType;
4357
+ /**
4358
+ * Handler names what ran: the builtin or agent ref, or a webhook's host
4359
+ * (never its full URL, which can carry credentials).
4360
+ */
4361
+ handler: string;
4362
+ decision?: HookDecision;
4363
+ reason?: string;
4364
+ injected?: boolean;
4365
+ error?: string;
4366
+ duration_ms: number;
4331
4367
  }
4332
4368
  /**
4333
4369
  * ChannelContext records which channel a chat or message came through
package/dist/types.js CHANGED
@@ -575,10 +575,12 @@ export const ChatMessageRoleTool = "tool";
575
575
  /**
576
576
  * Internal bookkeeping roles — never sent to the LLM provider.
577
577
  * BuildContext folds injections into the user turn and replaces
578
- * compaction markers with their summary.
578
+ * compaction markers with their summary. Event messages are display-only
579
+ * system info (a hook ran, ...) and BuildContext skips them.
579
580
  */
580
581
  export const ChatMessageRoleInjection = "injection";
581
582
  export const ChatMessageRoleCompaction = "compaction";
583
+ export const ChatMessageRoleEvent = "event";
582
584
  export const ChatMessageStatusPending = "pending";
583
585
  export const ChatMessageStatusQueued = "queued";
584
586
  export const ChatMessageStatusReady = "ready";
@@ -589,10 +591,12 @@ export const ChatMessageContentTypeReasoning = "reasoning";
589
591
  export const ChatMessageContentTypeImage = "image";
590
592
  export const ChatMessageContentTypeFile = "file";
591
593
  export const ChatMessageContentTypeTool = "tool";
594
+ export const ChatMessageContentTypeEvent = "event";
592
595
  export const ChannelTypeSlack = "slack";
593
596
  export const ChannelTypeDiscord = "discord";
594
597
  export const ChannelTypeTeams = "teams";
595
598
  export const ChannelTypeTelegram = "telegram";
599
+ export const ChatEventTypeHook = "hook";
596
600
  export const EngineStatusRunning = "running";
597
601
  export const EngineStatusPending = "pending";
598
602
  export const EngineStatusDraining = "draining";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inferencesh/sdk",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
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",