@inferencesh/sdk 0.13.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 +23 -0
- package/README.md +1 -1
- package/dist/api/tasks.d.ts +5 -3
- package/dist/api/tasks.js +8 -10
- package/dist/api/teams.d.ts +5 -9
- package/dist/index.d.ts +1 -1
- package/dist/tool-builder.d.ts +8 -0
- package/dist/tool-builder.js +20 -0
- package/dist/types.d.ts +170 -4
- package/dist/types.js +22 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,29 @@ 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
|
+
|
|
25
|
+
## [0.14.0] - 2026-09-27
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- `tasks.create()` returns `TaskResultDTO`, what `POST /apps/run` sends (id, status, output, socket), instead of claiming a full `Task`. `run(..., { wait: false })` fetches the full task with `GET /tasks/{id}` before returning it.
|
|
30
|
+
- `teams.list()`, `get()`, `create()` and `update()` return `TeamDTO`, what the server sends, instead of `TeamRelationDTO`.
|
|
31
|
+
- `MeResponse` is the generated type (adds `org`, `team_view` and `diagnostics`; `team` is a `TeamDTO`) instead of a hand-written one.
|
|
32
|
+
|
|
10
33
|
## [0.8.0] - 2026-09-24
|
|
11
34
|
|
|
12
35
|
### Removed
|
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,
|
|
381
|
+
| `internalTools()` | Server | Built-in tools: plan, memory, widget, finish, skills, meta, remote, knowledge, artifact, agent |
|
|
382
382
|
|
|
383
383
|
```typescript
|
|
384
384
|
import {
|
package/dist/api/tasks.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '../http/client';
|
|
2
2
|
import type { Response } from '../http/response';
|
|
3
|
-
import { TaskDTO as Task, TaskLogsDTO, TaskTimingsDTO, ApiAppRunRequest, CursorListRequest, CursorListResponse } from '../types';
|
|
3
|
+
import { TaskDTO as Task, TaskLogsDTO, TaskTimingsDTO, ApiAppRunRequest, TaskResultDTO, CursorListRequest, CursorListResponse } from '../types';
|
|
4
4
|
/** How to follow a task while it runs; see TasksAPI.watch. */
|
|
5
5
|
export interface WatchOptions {
|
|
6
6
|
/** Callback for real-time status updates */
|
|
@@ -44,9 +44,11 @@ export declare class TasksAPI {
|
|
|
44
44
|
*/
|
|
45
45
|
get(taskId: string): Promise<Response<Task>>;
|
|
46
46
|
/**
|
|
47
|
-
* Create and run a task
|
|
47
|
+
* Create and run a task. POST /apps/run answers with the task result
|
|
48
|
+
* (id, status, output, and the socket for a stream function), not the
|
|
49
|
+
* full task; `get` fetches that.
|
|
48
50
|
*/
|
|
49
|
-
create(data: ApiAppRunRequest): Promise<Response<
|
|
51
|
+
create(data: ApiAppRunRequest): Promise<Response<TaskResultDTO>>;
|
|
50
52
|
/**
|
|
51
53
|
* Delete a task
|
|
52
54
|
*/
|
package/dist/api/tasks.js
CHANGED
|
@@ -42,7 +42,9 @@ export class TasksAPI {
|
|
|
42
42
|
return this.http.request('get', `/tasks/${taskId}`);
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* Create and run a task
|
|
45
|
+
* Create and run a task. POST /apps/run answers with the task result
|
|
46
|
+
* (id, status, output, and the socket for a stream function), not the
|
|
47
|
+
* full task; `get` fetches that.
|
|
46
48
|
*/
|
|
47
49
|
async create(data) {
|
|
48
50
|
return this.http.request('post', '/apps/run', { data });
|
|
@@ -70,18 +72,14 @@ export class TasksAPI {
|
|
|
70
72
|
*/
|
|
71
73
|
async run(params, processedInput, options = {}) {
|
|
72
74
|
const { wait = true } = options;
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
input: processedInput,
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
const task = resp.data;
|
|
80
|
-
// Return immediately if not waiting
|
|
75
|
+
const { data: created } = await this.create({ ...params, input: processedInput });
|
|
76
|
+
// POST /apps/run answers with a TaskResultDTO, not the full task:
|
|
77
|
+
// fetch that when returning now, or let the watch fill it in.
|
|
81
78
|
if (!wait) {
|
|
79
|
+
const { data: task } = await this.get(created.id);
|
|
82
80
|
return stripTask(task);
|
|
83
81
|
}
|
|
84
|
-
return this.watch(
|
|
82
|
+
return this.watch(created, options).done;
|
|
85
83
|
}
|
|
86
84
|
/**
|
|
87
85
|
* Follows a task until it ends. `done` resolves with the task when it
|
package/dist/api/teams.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '../http/client';
|
|
2
2
|
import type { Response } from '../http/response';
|
|
3
|
-
import {
|
|
4
|
-
export interface MeResponse {
|
|
5
|
-
user: UserDTO;
|
|
6
|
-
team?: TeamRelationDTO;
|
|
7
|
-
}
|
|
3
|
+
import { MeResponse, TeamDTO, TeamMemberDTO, TeamInviteDTO, TeamCreateRequest, TeamMemberAddRequest, TeamInviteCreateRequest, AvailabilityResponse } from '../types';
|
|
8
4
|
/**
|
|
9
5
|
* Teams API
|
|
10
6
|
*/
|
|
@@ -18,19 +14,19 @@ export declare class TeamsAPI {
|
|
|
18
14
|
/**
|
|
19
15
|
* List user's teams
|
|
20
16
|
*/
|
|
21
|
-
list(): Promise<Response<
|
|
17
|
+
list(): Promise<Response<TeamDTO[]>>;
|
|
22
18
|
/**
|
|
23
19
|
* Get a team by ID
|
|
24
20
|
*/
|
|
25
|
-
get(teamId: string): Promise<Response<
|
|
21
|
+
get(teamId: string): Promise<Response<TeamDTO>>;
|
|
26
22
|
/**
|
|
27
23
|
* Create a new team
|
|
28
24
|
*/
|
|
29
|
-
create(data: TeamCreateRequest): Promise<Response<
|
|
25
|
+
create(data: TeamCreateRequest): Promise<Response<TeamDTO>>;
|
|
30
26
|
/**
|
|
31
27
|
* Update a team
|
|
32
28
|
*/
|
|
33
|
-
update(teamId: string, data: Partial<TeamCreateRequest>): Promise<Response<
|
|
29
|
+
update(teamId: string, data: Partial<TeamCreateRequest>): Promise<Response<TeamDTO>>;
|
|
34
30
|
/**
|
|
35
31
|
* Delete a team
|
|
36
32
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { FlowRunsAPI } from './api/flow-runs';
|
|
|
17
17
|
export { EnginesAPI } from './api/engines';
|
|
18
18
|
export { KnowledgeAPI, SkillsAPI } from './api/knowledge';
|
|
19
19
|
export { ArtifactsAPI } from './api/artifacts';
|
|
20
|
-
export { TeamsAPI
|
|
20
|
+
export { TeamsAPI } from './api/teams';
|
|
21
21
|
export { SecretsAPI } from './api/secrets';
|
|
22
22
|
export { ApiKeysAPI } from './api/api-keys';
|
|
23
23
|
export { CredentialsAPI } from './api/credentials';
|
package/dist/tool-builder.d.ts
CHANGED
|
@@ -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 */
|
package/dist/tool-builder.js
CHANGED
|
@@ -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
|
-
|
|
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;
|
|
@@ -524,6 +533,22 @@ export interface DeviceAuthPollResponse {
|
|
|
524
533
|
session_token?: string;
|
|
525
534
|
team_id?: string;
|
|
526
535
|
}
|
|
536
|
+
export interface MeResponse {
|
|
537
|
+
user?: UserDTO;
|
|
538
|
+
team?: TeamDTO;
|
|
539
|
+
/**
|
|
540
|
+
* Org of the current team, when the team belongs to one. Team.Role and
|
|
541
|
+
* Org.IsAdmin are left unset: what the caller may do is TeamView.Can
|
|
542
|
+
* and TeamView.Org.Can.
|
|
543
|
+
*/
|
|
544
|
+
org?: OrgDTO;
|
|
545
|
+
/**
|
|
546
|
+
* TeamView is the current team as the caller sees it in settings: kind,
|
|
547
|
+
* governance and capabilities (GET /teams/{id}/view).
|
|
548
|
+
*/
|
|
549
|
+
team_view?: TeamViewDTO;
|
|
550
|
+
diagnostics?: DiagnosticsConfig;
|
|
551
|
+
}
|
|
527
552
|
export interface TeamCreateRequest {
|
|
528
553
|
name: string;
|
|
529
554
|
username: string;
|
|
@@ -2936,6 +2961,20 @@ export interface UpdateNotificationPreferencesRequest {
|
|
|
2936
2961
|
quiet_hours_end?: string;
|
|
2937
2962
|
timezone?: string;
|
|
2938
2963
|
}
|
|
2964
|
+
/**
|
|
2965
|
+
* OrgDTO is the API response for an org (enterprise layer above teams).
|
|
2966
|
+
*/
|
|
2967
|
+
export interface OrgDTO extends BaseModelDTO {
|
|
2968
|
+
slug: string;
|
|
2969
|
+
name: string;
|
|
2970
|
+
avatar_url?: string;
|
|
2971
|
+
default_team_id?: string;
|
|
2972
|
+
/**
|
|
2973
|
+
* IsAdmin: whether the CALLER is on this org's admin grant list. Set on
|
|
2974
|
+
* caller-scoped responses.
|
|
2975
|
+
*/
|
|
2976
|
+
is_admin?: boolean;
|
|
2977
|
+
}
|
|
2939
2978
|
/**
|
|
2940
2979
|
* PageMetadata holds metadata for a page
|
|
2941
2980
|
*/
|
|
@@ -3120,6 +3159,9 @@ export interface ProjectDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
3120
3159
|
parent?: ProjectDTO;
|
|
3121
3160
|
children: (ProjectDTO | undefined)[];
|
|
3122
3161
|
}
|
|
3162
|
+
export interface DiagnosticsConfig {
|
|
3163
|
+
level: number;
|
|
3164
|
+
}
|
|
3123
3165
|
/**
|
|
3124
3166
|
* RefRouteDTO for API responses
|
|
3125
3167
|
*/
|
|
@@ -3714,6 +3756,34 @@ export interface TaskTimingsDTO {
|
|
|
3714
3756
|
groups: TaskTimingGroup[];
|
|
3715
3757
|
events: TaskTimingEvent[];
|
|
3716
3758
|
}
|
|
3759
|
+
/**
|
|
3760
|
+
* TeamDTO is the API response for a full team.
|
|
3761
|
+
*/
|
|
3762
|
+
export interface TeamDTO extends BaseModelDTO {
|
|
3763
|
+
type: TeamType;
|
|
3764
|
+
name: string;
|
|
3765
|
+
username: string;
|
|
3766
|
+
avatar_url: string;
|
|
3767
|
+
email: string;
|
|
3768
|
+
setup_completed: boolean;
|
|
3769
|
+
max_concurrency: number;
|
|
3770
|
+
status: TeamStatus;
|
|
3771
|
+
/**
|
|
3772
|
+
* Role is the CALLER's role on this team (owner/admin/member), set on
|
|
3773
|
+
* caller-scoped responses (/teams, /users/me). Empty when not applicable
|
|
3774
|
+
* (public team views, platform-admin impersonation).
|
|
3775
|
+
*/
|
|
3776
|
+
role?: TeamRole;
|
|
3777
|
+
/**
|
|
3778
|
+
* OrgID of the org this team belongs to ('' = standalone team).
|
|
3779
|
+
*/
|
|
3780
|
+
org_id?: string;
|
|
3781
|
+
/**
|
|
3782
|
+
* UsagePolicyID of the team's own usage policy ('' = inherit the org's,
|
|
3783
|
+
* or ungoverned when standalone, INF-808).
|
|
3784
|
+
*/
|
|
3785
|
+
usage_policy_id?: string;
|
|
3786
|
+
}
|
|
3717
3787
|
/**
|
|
3718
3788
|
* TeamMemberDTO is the API response for a team member.
|
|
3719
3789
|
*/
|
|
@@ -3775,6 +3845,48 @@ export interface TeamInviteCreateRequest {
|
|
|
3775
3845
|
email: string;
|
|
3776
3846
|
role: TeamRole;
|
|
3777
3847
|
}
|
|
3848
|
+
/**
|
|
3849
|
+
* GovernanceSource says who decides one aspect of a team. By is
|
|
3850
|
+
* shared.GovernedBySelf (the team itself) or shared.GovernedByOrg; TeamID is
|
|
3851
|
+
* the deciding team: the team itself, or the org's workspace.
|
|
3852
|
+
*/
|
|
3853
|
+
export interface GovernanceSource {
|
|
3854
|
+
by: string;
|
|
3855
|
+
team_id: string;
|
|
3856
|
+
}
|
|
3857
|
+
/**
|
|
3858
|
+
* TeamGovernance is who decides a team's billing and usage policy.
|
|
3859
|
+
*/
|
|
3860
|
+
export interface TeamGovernance {
|
|
3861
|
+
billing: GovernanceSource;
|
|
3862
|
+
policy: GovernanceSource;
|
|
3863
|
+
}
|
|
3864
|
+
/**
|
|
3865
|
+
* TeamViewOrg is the org a team belongs to, as the caller sees it.
|
|
3866
|
+
*/
|
|
3867
|
+
export interface TeamViewOrg {
|
|
3868
|
+
id: string;
|
|
3869
|
+
name: string;
|
|
3870
|
+
slug: string;
|
|
3871
|
+
avatar_url: string;
|
|
3872
|
+
/**
|
|
3873
|
+
* Can is what the caller may do on the org's workspace, by the same
|
|
3874
|
+
* table as TeamViewDTO.Can: the org's settings and billing live there.
|
|
3875
|
+
*/
|
|
3876
|
+
can: TeamCapability[];
|
|
3877
|
+
}
|
|
3878
|
+
/**
|
|
3879
|
+
* TeamViewDTO is a team as the caller sees it in settings: what kind of
|
|
3880
|
+
* workspace it is, who governs it, and what the caller may do there. Can is computed by the same table the API's route
|
|
3881
|
+
* gates evaluate, so clients read permissions instead of re-deriving them.
|
|
3882
|
+
*/
|
|
3883
|
+
export interface TeamViewDTO {
|
|
3884
|
+
team_id: string;
|
|
3885
|
+
kind: TeamKind;
|
|
3886
|
+
org?: TeamViewOrg;
|
|
3887
|
+
governance: TeamGovernance;
|
|
3888
|
+
can: TeamCapability[];
|
|
3889
|
+
}
|
|
3778
3890
|
export interface TelemetryReportDTO extends BaseModelDTO, PermissionModelDTO {
|
|
3779
3891
|
ip: string;
|
|
3780
3892
|
level: number;
|
|
@@ -4161,7 +4273,7 @@ export declare const PlanStepStatusPending: PlanStepStatus;
|
|
|
4161
4273
|
export declare const PlanStepStatusInProgress: PlanStepStatus;
|
|
4162
4274
|
export declare const PlanStepStatusCompleted: PlanStepStatus;
|
|
4163
4275
|
export declare const PlanStepStatusCancelled: PlanStepStatus;
|
|
4164
|
-
export type ChatMessageRole = "system" | "user" | "assistant" | "tool" | "injection" | "compaction";
|
|
4276
|
+
export type ChatMessageRole = "system" | "user" | "assistant" | "tool" | "injection" | "compaction" | "event";
|
|
4165
4277
|
/**
|
|
4166
4278
|
* LLM wire-protocol roles
|
|
4167
4279
|
*/
|
|
@@ -4172,22 +4284,25 @@ export declare const ChatMessageRoleTool: ChatMessageRole;
|
|
|
4172
4284
|
/**
|
|
4173
4285
|
* Internal bookkeeping roles — never sent to the LLM provider.
|
|
4174
4286
|
* BuildContext folds injections into the user turn and replaces
|
|
4175
|
-
* 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.
|
|
4176
4289
|
*/
|
|
4177
4290
|
export declare const ChatMessageRoleInjection: ChatMessageRole;
|
|
4178
4291
|
export declare const ChatMessageRoleCompaction: ChatMessageRole;
|
|
4292
|
+
export declare const ChatMessageRoleEvent: ChatMessageRole;
|
|
4179
4293
|
export type ChatMessageStatus = "pending" | "queued" | "ready" | "failed" | "cancelled";
|
|
4180
4294
|
export declare const ChatMessageStatusPending: ChatMessageStatus;
|
|
4181
4295
|
export declare const ChatMessageStatusQueued: ChatMessageStatus;
|
|
4182
4296
|
export declare const ChatMessageStatusReady: ChatMessageStatus;
|
|
4183
4297
|
export declare const ChatMessageStatusFailed: ChatMessageStatus;
|
|
4184
4298
|
export declare const ChatMessageStatusCancelled: ChatMessageStatus;
|
|
4185
|
-
export type ChatMessageContentType = "text" | "reasoning" | "image" | "file" | "tool";
|
|
4299
|
+
export type ChatMessageContentType = "text" | "reasoning" | "image" | "file" | "tool" | "event";
|
|
4186
4300
|
export declare const ChatMessageContentTypeText: ChatMessageContentType;
|
|
4187
4301
|
export declare const ChatMessageContentTypeReasoning: ChatMessageContentType;
|
|
4188
4302
|
export declare const ChatMessageContentTypeImage: ChatMessageContentType;
|
|
4189
4303
|
export declare const ChatMessageContentTypeFile: ChatMessageContentType;
|
|
4190
4304
|
export declare const ChatMessageContentTypeTool: ChatMessageContentType;
|
|
4305
|
+
export declare const ChatMessageContentTypeEvent: ChatMessageContentType;
|
|
4191
4306
|
export type ChannelType = "slack" | "discord" | "teams" | "telegram";
|
|
4192
4307
|
export declare const ChannelTypeSlack: ChannelType;
|
|
4193
4308
|
export declare const ChannelTypeDiscord: ChannelType;
|
|
@@ -4221,6 +4336,34 @@ export interface ChatMessageContent {
|
|
|
4221
4336
|
image?: string;
|
|
4222
4337
|
file?: string;
|
|
4223
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;
|
|
4224
4367
|
}
|
|
4225
4368
|
/**
|
|
4226
4369
|
* ChannelContext records which channel a chat or message came through
|
|
@@ -5134,6 +5277,29 @@ export type TeamRole = "owner" | "admin" | "member";
|
|
|
5134
5277
|
export declare const TeamRoleOwner: TeamRole;
|
|
5135
5278
|
export declare const TeamRoleAdmin: TeamRole;
|
|
5136
5279
|
export declare const TeamRoleMember: TeamRole;
|
|
5280
|
+
/**
|
|
5281
|
+
* TeamKind is what a team is from the caller's side of settings: the team
|
|
5282
|
+
* type plus whether it sits inside an org. Capabilities and governance key
|
|
5283
|
+
* on it (see team.Subject).
|
|
5284
|
+
*/
|
|
5285
|
+
export type TeamKind = "personal" | "team" | "org_member" | "org";
|
|
5286
|
+
/**
|
|
5287
|
+
* TeamKindPersonal is an account's own workspace.
|
|
5288
|
+
*/
|
|
5289
|
+
export declare const TeamKindPersonal: TeamKind;
|
|
5290
|
+
/**
|
|
5291
|
+
* TeamKindTeam is a shared workspace outside any org.
|
|
5292
|
+
*/
|
|
5293
|
+
export declare const TeamKindTeam: TeamKind;
|
|
5294
|
+
/**
|
|
5295
|
+
* TeamKindOrgMember is a shared workspace inside an org: billed by the
|
|
5296
|
+
* org and governed by the org's usage policy.
|
|
5297
|
+
*/
|
|
5298
|
+
export declare const TeamKindOrgMember: TeamKind;
|
|
5299
|
+
/**
|
|
5300
|
+
* TeamKindOrg is an org's own workspace (TeamTypeOrg).
|
|
5301
|
+
*/
|
|
5302
|
+
export declare const TeamKindOrg: TeamKind;
|
|
5137
5303
|
/**
|
|
5138
5304
|
* TeamCapability is one thing a caller may do to a team's settings. The set is
|
|
5139
5305
|
* closed; team.Subject.Can is the only place that grants them.
|
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";
|
|
@@ -1069,6 +1073,23 @@ export const TeamStatusTerminated = "terminated";
|
|
|
1069
1073
|
export const TeamRoleOwner = "owner";
|
|
1070
1074
|
export const TeamRoleAdmin = "admin";
|
|
1071
1075
|
export const TeamRoleMember = "member";
|
|
1076
|
+
/**
|
|
1077
|
+
* TeamKindPersonal is an account's own workspace.
|
|
1078
|
+
*/
|
|
1079
|
+
export const TeamKindPersonal = "personal";
|
|
1080
|
+
/**
|
|
1081
|
+
* TeamKindTeam is a shared workspace outside any org.
|
|
1082
|
+
*/
|
|
1083
|
+
export const TeamKindTeam = "team";
|
|
1084
|
+
/**
|
|
1085
|
+
* TeamKindOrgMember is a shared workspace inside an org: billed by the
|
|
1086
|
+
* org and governed by the org's usage policy.
|
|
1087
|
+
*/
|
|
1088
|
+
export const TeamKindOrgMember = "org_member";
|
|
1089
|
+
/**
|
|
1090
|
+
* TeamKindOrg is an org's own workspace (TeamTypeOrg).
|
|
1091
|
+
*/
|
|
1092
|
+
export const TeamKindOrg = "org";
|
|
1072
1093
|
export const TeamCapabilityEditProfile = "edit_profile";
|
|
1073
1094
|
export const TeamCapabilityManageMembers = "manage_members";
|
|
1074
1095
|
export const TeamCapabilityViewMembers = "view_members";
|