Skip to content

Commit 6c834b9

Browse files
feat(api): add UserInputMetadata type to agents
1 parent 27772ea commit 6c834b9

5 files changed

Lines changed: 24 additions & 3 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 193
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-0e20f536f7f833dd7205eaadd72826bd527a3ed91fcb006323e3232550abb04e.yml
3-
openapi_spec_hash: 7a96aca1a75735a1664edd091b277940
4-
config_hash: 25c7c72de891ed240ee62c4fb9a99756
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ac173b64bb40160fa60a528c250b18b70b60676d8d639d22065a430a40e6406a.yml
3+
openapi_spec_hash: 10763c4df593dae81fe9729e8a6ff799
4+
config_hash: d579aac01b686dadf777791467e135dd

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ Types:
6868
- <code><a href="./src/resources/agents.ts">Role</a></code>
6969
- <code><a href="./src/resources/agents.ts">Type</a></code>
7070
- <code><a href="./src/resources/agents.ts">UserInputBlock</a></code>
71+
- <code><a href="./src/resources/agents.ts">UserInputMetadata</a></code>
7172
- <code><a href="./src/resources/agents.ts">WakeEvent</a></code>
7273
- <code><a href="./src/resources/agents.ts">AgentCreateExecutionConversationTokenResponse</a></code>
7374
- <code><a href="./src/resources/agents.ts">AgentCreatePromptResponse</a></code>

src/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ import {
154154
Role,
155155
Type,
156156
UserInputBlock,
157+
UserInputMetadata,
157158
WakeEvent,
158159
} from './resources/agents';
159160
import {
@@ -1411,6 +1412,7 @@ export declare namespace Gitpod {
14111412
type Role as Role,
14121413
type Type as Type,
14131414
type UserInputBlock as UserInputBlock,
1415+
type UserInputMetadata as UserInputMetadata,
14141416
type WakeEvent as WakeEvent,
14151417
type AgentCreateExecutionConversationTokenResponse as AgentCreateExecutionConversationTokenResponse,
14161418
type AgentCreatePromptResponse as AgentCreatePromptResponse,

src/resources/agents.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,22 @@ export namespace UserInputBlock {
13211321
}
13221322
}
13231323

1324+
/**
1325+
* UserInputMetadata carries integration-specific context for a user input.
1326+
* Internal only — not exposed in public SDKs. External API consumers should not
1327+
* set these fields; they are populated by integration handlers.
1328+
*/
1329+
export interface UserInputMetadata {
1330+
/**
1331+
* Origin of this input — set by integration handlers to their host (e.g.
1332+
* "github.com", "slack.com"). Empty for non-integration callers. This field drives
1333+
* emission gating: when set, agent responses are only emitted to the matching
1334+
* integration. Treated as trusted input from integration handlers; not validated
1335+
* against registered hosts.
1336+
*/
1337+
source?: string;
1338+
}
1339+
13241340
/**
13251341
* WakeEvent is sent by the backend to wake an agent when a registered interest
13261342
* fires. Delivered via SendToAgentExecution as a new oneof variant.
@@ -1697,6 +1713,7 @@ export declare namespace Agents {
16971713
type Role as Role,
16981714
type Type as Type,
16991715
type UserInputBlock as UserInputBlock,
1716+
type UserInputMetadata as UserInputMetadata,
17001717
type WakeEvent as WakeEvent,
17011718
type AgentCreateExecutionConversationTokenResponse as AgentCreateExecutionConversationTokenResponse,
17021719
type AgentCreatePromptResponse as AgentCreatePromptResponse,

src/resources/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export {
3333
type Role,
3434
type Type,
3535
type UserInputBlock,
36+
type UserInputMetadata,
3637
type WakeEvent,
3738
type AgentCreateExecutionConversationTokenResponse,
3839
type AgentCreatePromptResponse,

0 commit comments

Comments
 (0)