@valon-technologies/gestalt 0.0.1-alpha.17 → 0.0.1-alpha.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valon-technologies/gestalt",
3
- "version": "0.0.1-alpha.17",
3
+ "version": "0.0.1-alpha.18",
4
4
  "description": "TypeScript SDK for Gestalt executable providers",
5
5
  "type": "module",
6
6
  "repository": {
package/src/agent.ts CHANGED
@@ -65,7 +65,9 @@ import {
65
65
  type ListAgentProviderTurnEventsRequest,
66
66
  type ListAgentProviderTurnsRequest,
67
67
  type ListedAgentTool,
68
+ type ResolveAgentConnectionRequest,
68
69
  type ResolveAgentProviderInteractionRequest,
70
+ type ResolvedAgentConnection,
69
71
  type ResolvedAgentTool,
70
72
  type UpdateAgentProviderSessionRequest,
71
73
  } from "./internal/gen/v1/agent_pb.ts";
@@ -114,7 +116,9 @@ export type {
114
116
  ListAgentProviderTurnEventsRequest,
115
117
  ListAgentProviderTurnsRequest,
116
118
  ListedAgentTool,
119
+ ResolveAgentConnectionRequest,
117
120
  ResolveAgentProviderInteractionRequest,
121
+ ResolvedAgentConnection,
118
122
  ResolvedAgentTool,
119
123
  UpdateAgentProviderSessionRequest,
120
124
  };
@@ -461,6 +465,13 @@ export class AgentHost {
461
465
  ): Promise<ListAgentToolsResponse> {
462
466
  return await this.client.listTools(request);
463
467
  }
468
+
469
+ /** Resolves a configured agent connection for the current turn. */
470
+ async resolveConnection(
471
+ request: ResolveAgentConnectionRequest,
472
+ ): Promise<ResolvedAgentConnection> {
473
+ return await this.client.resolveConnection(request);
474
+ }
464
475
  }
465
476
 
466
477
  function agentHostTransportOptions(rawTarget: string): {
package/src/api.ts CHANGED
@@ -26,6 +26,13 @@ export interface Access {
26
26
  role: string;
27
27
  }
28
28
 
29
+ /**
30
+ * Describes public host metadata available to provider code.
31
+ */
32
+ export interface Host {
33
+ publicBaseUrl: string;
34
+ }
35
+
29
36
  /**
30
37
  * Request metadata forwarded to provider handlers by the Gestalt runtime.
31
38
  */
@@ -35,6 +42,7 @@ export interface Request {
35
42
  subject: Subject;
36
43
  credential: Credential;
37
44
  access: Access;
45
+ host: Host;
38
46
  idempotencyKey: string;
39
47
  // Workflow callback metadata uses a JSON-style lowerCamelCase object such as
40
48
  // runId, target.plugin.pluginName, trigger.scheduleId, and trigger.event.specVersion.
@@ -106,6 +114,7 @@ export function request(
106
114
  workflow: Record<string, unknown> = {},
107
115
  invocationToken = "",
108
116
  idempotencyKey = "",
117
+ host: Partial<Host> = {},
109
118
  ): Request {
110
119
  return {
111
120
  token,
@@ -131,6 +140,9 @@ export function request(
131
140
  workflow: {
132
141
  ...workflow,
133
142
  },
143
+ host: {
144
+ publicBaseUrl: host.publicBaseUrl ?? "",
145
+ },
134
146
  invocationToken,
135
147
  idempotencyKey: idempotencyKey.trim(),
136
148
  };
@@ -80,7 +80,8 @@ export class AuthorizationClient {
80
80
  ...(transportOptions.nodeOptions
81
81
  ? {
82
82
  nodeOptions: {
83
- createConnection: () => connect(transportOptions.nodeOptions!.path),
83
+ createConnection: () =>
84
+ connect({ path: transportOptions.nodeOptions!.path }),
84
85
  },
85
86
  }
86
87
  : {}),
package/src/cache.ts CHANGED
@@ -139,7 +139,8 @@ export class Cache {
139
139
  ...(transportOptions.nodeOptions
140
140
  ? {
141
141
  nodeOptions: {
142
- createConnection: () => connect(transportOptions.nodeOptions!.path),
142
+ createConnection: () =>
143
+ connect({ path: transportOptions.nodeOptions!.path }),
143
144
  },
144
145
  }
145
146
  : {}),
@@ -1,4 +1,4 @@
1
- import type { Access, Credential, MaybePromise, Subject } from "./api.ts";
1
+ import type { Access, Credential, Host, MaybePromise, Subject } from "./api.ts";
2
2
 
3
3
  /**
4
4
  * Verified hosted HTTP request metadata passed into optional plugin-local
@@ -26,6 +26,7 @@ export interface HTTPSubjectResolutionContext {
26
26
  subject: Subject;
27
27
  credential: Credential;
28
28
  access: Access;
29
+ host: Host;
29
30
  workflow: Record<string, unknown>;
30
31
  }
31
32
 
@@ -96,6 +97,9 @@ export function cloneHTTPSubjectResolutionContext(
96
97
  access: {
97
98
  ...input.access,
98
99
  },
100
+ host: {
101
+ ...input.host,
102
+ },
99
103
  workflow: {
100
104
  ...input.workflow,
101
105
  },
package/src/index.ts CHANGED
@@ -52,6 +52,7 @@ export {
52
52
  responseBrand,
53
53
  request,
54
54
  type Access,
55
+ type Host,
55
56
  type MaybePromise,
56
57
  type Credential,
57
58
  type OperationResult,
@@ -363,7 +364,9 @@ export {
363
364
  type ListAgentProviderTurnEventsRequest,
364
365
  type ListAgentProviderTurnsRequest,
365
366
  type ListedAgentTool,
367
+ type ResolveAgentConnectionRequest,
366
368
  type ResolveAgentProviderInteractionRequest,
369
+ type ResolvedAgentConnection,
367
370
  type ResolvedAgentTool,
368
371
  type UpdateAgentProviderSessionRequest,
369
372
  } from "./agent.ts";
package/src/indexeddb.ts CHANGED
@@ -536,7 +536,8 @@ export class IndexedDB {
536
536
  ...(transportOptions.nodeOptions
537
537
  ? {
538
538
  nodeOptions: {
539
- createConnection: () => connect(transportOptions.nodeOptions!.path),
539
+ createConnection: () =>
540
+ connect({ path: transportOptions.nodeOptions!.path }),
540
541
  },
541
542
  }
542
543
  : {}),