@osdk/foundry.aipagents 2.2.0 → 2.3.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 +11 -0
- package/build/browser/_components.d.ts +216 -0
- package/build/browser/_components.d.ts.map +1 -1
- package/build/browser/_errors.d.ts +198 -0
- package/build/browser/_errors.d.ts.map +1 -1
- package/build/browser/index.d.ts +4 -2
- package/build/browser/index.d.ts.map +1 -1
- package/build/browser/index.js +2 -0
- package/build/browser/index.js.map +1 -1
- package/build/browser/public/Agent.d.ts +17 -0
- package/build/browser/public/Agent.d.ts.map +1 -1
- package/build/browser/public/Agent.js +14 -0
- package/build/browser/public/Agent.js.map +1 -1
- package/build/browser/public/Content.d.ts +20 -0
- package/build/browser/public/Content.d.ts.map +1 -0
- package/build/browser/public/Content.js +30 -0
- package/build/browser/public/Content.js.map +1 -0
- package/build/browser/public/Session.d.ts +139 -0
- package/build/browser/public/Session.d.ts.map +1 -0
- package/build/browser/public/Session.js +126 -0
- package/build/browser/public/Session.js.map +1 -0
- package/build/esm/_components.d.ts +216 -0
- package/build/esm/_components.d.ts.map +1 -1
- package/build/esm/_errors.d.ts +198 -0
- package/build/esm/_errors.d.ts.map +1 -1
- package/build/esm/index.d.ts +4 -2
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +2 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/public/Agent.d.ts +17 -0
- package/build/esm/public/Agent.d.ts.map +1 -1
- package/build/esm/public/Agent.js +14 -0
- package/build/esm/public/Agent.js.map +1 -1
- package/build/esm/public/Content.d.ts +20 -0
- package/build/esm/public/Content.d.ts.map +1 -0
- package/build/esm/public/Content.js +30 -0
- package/build/esm/public/Content.js.map +1 -0
- package/build/esm/public/Session.d.ts +139 -0
- package/build/esm/public/Session.d.ts.map +1 -0
- package/build/esm/public/Session.js +126 -0
- package/build/esm/public/Session.js.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_get","get","$ctx","args"],"sources":["Content.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _get = [0, \"/v2/aipAgents/agents/{0}/sessions/{1}/content\", 2];\n/**\n * Get the conversation content for a session between the calling user and an Agent.\n *\n * @alpha\n *\n * Required Scopes: [api:aip-agents-read]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/content\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,IAAI,GAAG,CAAC,CAAC,EAAE,+CAA+C,EAAE,CAAC,CAAC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,GAAGA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EAC/B,OAAOJ,qBAAqB,CAACG,IAAI,EAAEF,IAAI,EAAE,GAAGG,IAAI,CAAC;AACrD","ignoreList":[]}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type * as _Core from "@osdk/foundry.core";
|
|
2
|
+
import type { SharedClient as $OldClient, SharedClientContext as $OldClientContext } from "@osdk/shared.client";
|
|
3
|
+
import type { SharedClient as $Client, SharedClientContext as $ClientContext } from "@osdk/shared.client2";
|
|
4
|
+
import type * as _AipAgents from "../_components.js";
|
|
5
|
+
/**
|
|
6
|
+
* Create a new conversation session between the calling user and an Agent.
|
|
7
|
+
* Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session.
|
|
8
|
+
*
|
|
9
|
+
* @alpha
|
|
10
|
+
*
|
|
11
|
+
* Required Scopes: [api:aip-agents-write]
|
|
12
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions
|
|
13
|
+
*/
|
|
14
|
+
export declare function create($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
15
|
+
agentRid: _AipAgents.AgentRid,
|
|
16
|
+
$body: _AipAgents.CreateSessionRequest,
|
|
17
|
+
$queryParams?: {
|
|
18
|
+
preview?: _Core.PreviewMode | undefined;
|
|
19
|
+
}
|
|
20
|
+
]): Promise<_AipAgents.Session>;
|
|
21
|
+
/**
|
|
22
|
+
* List all conversation sessions between the calling user and an Agent that were created by this client.
|
|
23
|
+
* This does not list sessions for the user created by other clients. For example, any sessions created by
|
|
24
|
+
* the user in AIP Agent Studio will not be listed here.
|
|
25
|
+
* Sessions are returned in order of most recently updated first.
|
|
26
|
+
*
|
|
27
|
+
* @alpha
|
|
28
|
+
*
|
|
29
|
+
* Required Scopes: [api:aip-agents-read]
|
|
30
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions
|
|
31
|
+
*/
|
|
32
|
+
export declare function list($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
33
|
+
agentRid: _AipAgents.AgentRid,
|
|
34
|
+
$queryParams?: {
|
|
35
|
+
pageSize?: _Core.PageSize | undefined;
|
|
36
|
+
pageToken?: _Core.PageToken | undefined;
|
|
37
|
+
preview?: _Core.PreviewMode | undefined;
|
|
38
|
+
}
|
|
39
|
+
]): Promise<_AipAgents.ListSessionsResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Get details of a conversation session between the calling user and an Agent.
|
|
42
|
+
*
|
|
43
|
+
* @alpha
|
|
44
|
+
*
|
|
45
|
+
* Required Scopes: [api:aip-agents-read]
|
|
46
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}
|
|
47
|
+
*/
|
|
48
|
+
export declare function get($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
49
|
+
agentRid: _AipAgents.AgentRid,
|
|
50
|
+
sessionRid: _AipAgents.SessionRid,
|
|
51
|
+
$queryParams?: {
|
|
52
|
+
preview?: _Core.PreviewMode | undefined;
|
|
53
|
+
}
|
|
54
|
+
]): Promise<_AipAgents.Session>;
|
|
55
|
+
/**
|
|
56
|
+
* Continue a conversation session with an Agent, or add the first exchange to a session after creation.
|
|
57
|
+
* Adds a new exchange to the session with the provided inputs, and generates a response from the Agent.
|
|
58
|
+
* Blocks on returning the result of the added exchange until the response is fully generated.
|
|
59
|
+
* Streamed responses are also supported; see `streamingContinue` for details.
|
|
60
|
+
* Concurrent requests to continue the same session are not supported. Clients should wait
|
|
61
|
+
* to receive a response before sending the next message.
|
|
62
|
+
*
|
|
63
|
+
* @alpha
|
|
64
|
+
*
|
|
65
|
+
* Required Scopes: [api:aip-agents-write]
|
|
66
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue
|
|
67
|
+
*/
|
|
68
|
+
export declare function blockingContinue($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
69
|
+
agentRid: _AipAgents.AgentRid,
|
|
70
|
+
sessionRid: _AipAgents.SessionRid,
|
|
71
|
+
$body: _AipAgents.BlockingContinueSessionRequest,
|
|
72
|
+
$queryParams?: {
|
|
73
|
+
preview?: _Core.PreviewMode | undefined;
|
|
74
|
+
}
|
|
75
|
+
]): Promise<_AipAgents.SessionExchangeResult>;
|
|
76
|
+
/**
|
|
77
|
+
* Continue a conversation session with an Agent, or add the first exchange to a session after creation.
|
|
78
|
+
* Adds a new exchange to the session with the provided inputs, and generates a response from the Agent.
|
|
79
|
+
* Returns a stream of the Agent response text (formatted using markdown) for clients to consume as
|
|
80
|
+
* the response is generated.
|
|
81
|
+
* On completion of the streamed response, clients can load the full details of the exchange that was
|
|
82
|
+
* added to the session by reloading the session content.
|
|
83
|
+
* Streamed exchanges also support cancellation; see `cancel` for details.
|
|
84
|
+
* Concurrent requests to continue the same session are not supported. Clients should wait to receive a
|
|
85
|
+
* response, or cancel the in-progress exchange, before sending the next message.
|
|
86
|
+
*
|
|
87
|
+
* @alpha
|
|
88
|
+
*
|
|
89
|
+
* Required Scopes: [api:aip-agents-write]
|
|
90
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue
|
|
91
|
+
*/
|
|
92
|
+
export declare function streamingContinue($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
93
|
+
agentRid: _AipAgents.AgentRid,
|
|
94
|
+
sessionRid: _AipAgents.SessionRid,
|
|
95
|
+
$body: _AipAgents.StreamingContinueSessionRequest,
|
|
96
|
+
$queryParams?: {
|
|
97
|
+
preview?: _Core.PreviewMode | undefined;
|
|
98
|
+
}
|
|
99
|
+
]): Promise<Blob>;
|
|
100
|
+
/**
|
|
101
|
+
* Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`.
|
|
102
|
+
* Canceling an exchange allows clients to prevent the exchange from being added to the session,
|
|
103
|
+
* or to provide a response to replace the Agent-generated response.
|
|
104
|
+
* Note that canceling an exchange does not terminate the stream returned by `streamingContinue`;
|
|
105
|
+
* clients should close the stream on triggering the cancellation request to stop reading from the stream.
|
|
106
|
+
*
|
|
107
|
+
* @alpha
|
|
108
|
+
*
|
|
109
|
+
* Required Scopes: [api:aip-agents-write]
|
|
110
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel
|
|
111
|
+
*/
|
|
112
|
+
export declare function cancel($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
113
|
+
agentRid: _AipAgents.AgentRid,
|
|
114
|
+
sessionRid: _AipAgents.SessionRid,
|
|
115
|
+
$body: _AipAgents.CancelSessionRequest,
|
|
116
|
+
$queryParams?: {
|
|
117
|
+
preview?: _Core.PreviewMode | undefined;
|
|
118
|
+
}
|
|
119
|
+
]): Promise<_AipAgents.CancelSessionResponse>;
|
|
120
|
+
/**
|
|
121
|
+
* Retrieve relevant [context](https://www.palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message
|
|
122
|
+
* from the data sources configured for the session. This allows clients to pre-retrieve context for a user
|
|
123
|
+
* message before sending it to the Agent with the `contextsOverride` option when continuing a session, to
|
|
124
|
+
* allow any pre-processing of the context before sending it to the Agent.
|
|
125
|
+
*
|
|
126
|
+
* @alpha
|
|
127
|
+
*
|
|
128
|
+
* Required Scopes: [api:aip-agents-write]
|
|
129
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext
|
|
130
|
+
*/
|
|
131
|
+
export declare function ragContext($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
132
|
+
agentRid: _AipAgents.AgentRid,
|
|
133
|
+
sessionRid: _AipAgents.SessionRid,
|
|
134
|
+
$body: _AipAgents.RagContextSessionRequest,
|
|
135
|
+
$queryParams?: {
|
|
136
|
+
preview?: _Core.PreviewMode | undefined;
|
|
137
|
+
}
|
|
138
|
+
]): Promise<_AipAgents.AgentSessionRagContextResponse>;
|
|
139
|
+
//# sourceMappingURL=Session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../../../src/public/Session.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,KAAK,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EACV,YAAY,IAAI,UAAU,EAC1B,mBAAmB,IAAI,iBAAiB,EACzC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,YAAY,IAAI,OAAO,EAC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I,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,QAAQ,EAAE,UAAU,CAAC,QAAQ;IAC7B,UAAU,EAAE,UAAU,CAAC,UAAU;IACjC,KAAK,EAAE,UAAU,CAAC,wBAAwB;IAC1C,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;KAAE;CAC3D,GACA,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAEpD"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { foundryPlatformFetch as $foundryPlatformFetch } from "@osdk/shared.net.platformapi";
|
|
17
|
+
//
|
|
18
|
+
const _create = [1, "/v2/aipAgents/agents/{0}/sessions", 3];
|
|
19
|
+
/**
|
|
20
|
+
* Create a new conversation session between the calling user and an Agent.
|
|
21
|
+
* Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session.
|
|
22
|
+
*
|
|
23
|
+
* @alpha
|
|
24
|
+
*
|
|
25
|
+
* Required Scopes: [api:aip-agents-write]
|
|
26
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions
|
|
27
|
+
*/
|
|
28
|
+
export function create($ctx, ...args) {
|
|
29
|
+
return $foundryPlatformFetch($ctx, _create, ...args);
|
|
30
|
+
}
|
|
31
|
+
const _list = [0, "/v2/aipAgents/agents/{0}/sessions", 2];
|
|
32
|
+
/**
|
|
33
|
+
* List all conversation sessions between the calling user and an Agent that were created by this client.
|
|
34
|
+
* This does not list sessions for the user created by other clients. For example, any sessions created by
|
|
35
|
+
* the user in AIP Agent Studio will not be listed here.
|
|
36
|
+
* Sessions are returned in order of most recently updated first.
|
|
37
|
+
*
|
|
38
|
+
* @alpha
|
|
39
|
+
*
|
|
40
|
+
* Required Scopes: [api:aip-agents-read]
|
|
41
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions
|
|
42
|
+
*/
|
|
43
|
+
export function list($ctx, ...args) {
|
|
44
|
+
return $foundryPlatformFetch($ctx, _list, ...args);
|
|
45
|
+
}
|
|
46
|
+
const _get = [0, "/v2/aipAgents/agents/{0}/sessions/{1}", 2];
|
|
47
|
+
/**
|
|
48
|
+
* Get details of a conversation session between the calling user and an Agent.
|
|
49
|
+
*
|
|
50
|
+
* @alpha
|
|
51
|
+
*
|
|
52
|
+
* Required Scopes: [api:aip-agents-read]
|
|
53
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}
|
|
54
|
+
*/
|
|
55
|
+
export function get($ctx, ...args) {
|
|
56
|
+
return $foundryPlatformFetch($ctx, _get, ...args);
|
|
57
|
+
}
|
|
58
|
+
const _blockingContinue = [1, "/v2/aipAgents/agents/{0}/sessions/{1}/blockingContinue", 3];
|
|
59
|
+
/**
|
|
60
|
+
* Continue a conversation session with an Agent, or add the first exchange to a session after creation.
|
|
61
|
+
* Adds a new exchange to the session with the provided inputs, and generates a response from the Agent.
|
|
62
|
+
* Blocks on returning the result of the added exchange until the response is fully generated.
|
|
63
|
+
* Streamed responses are also supported; see `streamingContinue` for details.
|
|
64
|
+
* Concurrent requests to continue the same session are not supported. Clients should wait
|
|
65
|
+
* to receive a response before sending the next message.
|
|
66
|
+
*
|
|
67
|
+
* @alpha
|
|
68
|
+
*
|
|
69
|
+
* Required Scopes: [api:aip-agents-write]
|
|
70
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue
|
|
71
|
+
*/
|
|
72
|
+
export function blockingContinue($ctx, ...args) {
|
|
73
|
+
return $foundryPlatformFetch($ctx, _blockingContinue, ...args);
|
|
74
|
+
}
|
|
75
|
+
const _streamingContinue = [1, "/v2/aipAgents/agents/{0}/sessions/{1}/streamingContinue", 3,, "application/octet-stream"];
|
|
76
|
+
/**
|
|
77
|
+
* Continue a conversation session with an Agent, or add the first exchange to a session after creation.
|
|
78
|
+
* Adds a new exchange to the session with the provided inputs, and generates a response from the Agent.
|
|
79
|
+
* Returns a stream of the Agent response text (formatted using markdown) for clients to consume as
|
|
80
|
+
* the response is generated.
|
|
81
|
+
* On completion of the streamed response, clients can load the full details of the exchange that was
|
|
82
|
+
* added to the session by reloading the session content.
|
|
83
|
+
* Streamed exchanges also support cancellation; see `cancel` for details.
|
|
84
|
+
* Concurrent requests to continue the same session are not supported. Clients should wait to receive a
|
|
85
|
+
* response, or cancel the in-progress exchange, before sending the next message.
|
|
86
|
+
*
|
|
87
|
+
* @alpha
|
|
88
|
+
*
|
|
89
|
+
* Required Scopes: [api:aip-agents-write]
|
|
90
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue
|
|
91
|
+
*/
|
|
92
|
+
export function streamingContinue($ctx, ...args) {
|
|
93
|
+
return $foundryPlatformFetch($ctx, _streamingContinue, ...args);
|
|
94
|
+
}
|
|
95
|
+
const _cancel = [1, "/v2/aipAgents/agents/{0}/sessions/{1}/cancel", 3];
|
|
96
|
+
/**
|
|
97
|
+
* Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`.
|
|
98
|
+
* Canceling an exchange allows clients to prevent the exchange from being added to the session,
|
|
99
|
+
* or to provide a response to replace the Agent-generated response.
|
|
100
|
+
* Note that canceling an exchange does not terminate the stream returned by `streamingContinue`;
|
|
101
|
+
* clients should close the stream on triggering the cancellation request to stop reading from the stream.
|
|
102
|
+
*
|
|
103
|
+
* @alpha
|
|
104
|
+
*
|
|
105
|
+
* Required Scopes: [api:aip-agents-write]
|
|
106
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel
|
|
107
|
+
*/
|
|
108
|
+
export function cancel($ctx, ...args) {
|
|
109
|
+
return $foundryPlatformFetch($ctx, _cancel, ...args);
|
|
110
|
+
}
|
|
111
|
+
const _ragContext = [2, "/v2/aipAgents/agents/{0}/sessions/{1}/ragContext", 3];
|
|
112
|
+
/**
|
|
113
|
+
* Retrieve relevant [context](https://www.palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message
|
|
114
|
+
* from the data sources configured for the session. This allows clients to pre-retrieve context for a user
|
|
115
|
+
* message before sending it to the Agent with the `contextsOverride` option when continuing a session, to
|
|
116
|
+
* allow any pre-processing of the context before sending it to the Agent.
|
|
117
|
+
*
|
|
118
|
+
* @alpha
|
|
119
|
+
*
|
|
120
|
+
* Required Scopes: [api:aip-agents-write]
|
|
121
|
+
* URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext
|
|
122
|
+
*/
|
|
123
|
+
export function ragContext($ctx, ...args) {
|
|
124
|
+
return $foundryPlatformFetch($ctx, _ragContext, ...args);
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=Session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Session.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_create","create","$ctx","args","_list","list","_get","get","_blockingContinue","blockingContinue","_streamingContinue","streamingContinue","_cancel","cancel","_ragContext","ragContext"],"sources":["Session.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _create = [1, \"/v2/aipAgents/agents/{0}/sessions\", 3];\n/**\n * Create a new conversation session between the calling user and an Agent.\n * Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session.\n *\n * @alpha\n *\n * Required Scopes: [api:aip-agents-write]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions\n */\nexport function create($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _create, ...args);\n}\nconst _list = [0, \"/v2/aipAgents/agents/{0}/sessions\", 2];\n/**\n * List all conversation sessions between the calling user and an Agent that were created by this client.\n * This does not list sessions for the user created by other clients. For example, any sessions created by\n * the user in AIP Agent Studio will not be listed here.\n * Sessions are returned in order of most recently updated first.\n *\n * @alpha\n *\n * Required Scopes: [api:aip-agents-read]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/aipAgents/agents/{0}/sessions/{1}\", 2];\n/**\n * Get details of a conversation session between the calling user and an Agent.\n *\n * @alpha\n *\n * Required Scopes: [api:aip-agents-read]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _blockingContinue = [1, \"/v2/aipAgents/agents/{0}/sessions/{1}/blockingContinue\", 3];\n/**\n * Continue a conversation session with an Agent, or add the first exchange to a session after creation.\n * Adds a new exchange to the session with the provided inputs, and generates a response from the Agent.\n * Blocks on returning the result of the added exchange until the response is fully generated.\n * Streamed responses are also supported; see `streamingContinue` for details.\n * Concurrent requests to continue the same session are not supported. Clients should wait\n * to receive a response before sending the next message.\n *\n * @alpha\n *\n * Required Scopes: [api:aip-agents-write]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue\n */\nexport function blockingContinue($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _blockingContinue, ...args);\n}\nconst _streamingContinue = [\n 1,\n \"/v2/aipAgents/agents/{0}/sessions/{1}/streamingContinue\",\n 3,\n ,\n \"application/octet-stream\",\n];\n/**\n * Continue a conversation session with an Agent, or add the first exchange to a session after creation.\n * Adds a new exchange to the session with the provided inputs, and generates a response from the Agent.\n * Returns a stream of the Agent response text (formatted using markdown) for clients to consume as\n * the response is generated.\n * On completion of the streamed response, clients can load the full details of the exchange that was\n * added to the session by reloading the session content.\n * Streamed exchanges also support cancellation; see `cancel` for details.\n * Concurrent requests to continue the same session are not supported. Clients should wait to receive a\n * response, or cancel the in-progress exchange, before sending the next message.\n *\n * @alpha\n *\n * Required Scopes: [api:aip-agents-write]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue\n */\nexport function streamingContinue($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingContinue, ...args);\n}\nconst _cancel = [1, \"/v2/aipAgents/agents/{0}/sessions/{1}/cancel\", 3];\n/**\n * Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`.\n * Canceling an exchange allows clients to prevent the exchange from being added to the session,\n * or to provide a response to replace the Agent-generated response.\n * Note that canceling an exchange does not terminate the stream returned by `streamingContinue`;\n * clients should close the stream on triggering the cancellation request to stop reading from the stream.\n *\n * @alpha\n *\n * Required Scopes: [api:aip-agents-write]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel\n */\nexport function cancel($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _cancel, ...args);\n}\nconst _ragContext = [2, \"/v2/aipAgents/agents/{0}/sessions/{1}/ragContext\", 3];\n/**\n * Retrieve relevant [context](https://www.palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message\n * from the data sources configured for the session. This allows clients to pre-retrieve context for a user\n * message before sending it to the Agent with the `contextsOverride` option when continuing a session, to\n * allow any pre-processing of the context before sending it to the Agent.\n *\n * @alpha\n *\n * Required Scopes: [api:aip-agents-write]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext\n */\nexport function ragContext($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _ragContext, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,OAAO,GAAG,CAAC,CAAC,EAAE,mCAAmC,EAAE,CAAC,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EAClC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEF,OAAO,EAAE,GAAGG,IAAI,CAAC;AACxD;AACA,MAAMC,KAAK,GAAG,CAAC,CAAC,EAAE,mCAAmC,EAAE,CAAC,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAACH,IAAI,EAAE,GAAGC,IAAI,EAAE;EAChC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEE,KAAK,EAAE,GAAGD,IAAI,CAAC;AACtD;AACA,MAAMG,IAAI,GAAG,CAAC,CAAC,EAAE,uCAAuC,EAAE,CAAC,CAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,GAAGA,CAACL,IAAI,EAAE,GAAGC,IAAI,EAAE;EAC/B,OAAOJ,qBAAqB,CAACG,IAAI,EAAEI,IAAI,EAAE,GAAGH,IAAI,CAAC;AACrD;AACA,MAAMK,iBAAiB,GAAG,CAAC,CAAC,EAAE,wDAAwD,EAAE,CAAC,CAAC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACP,IAAI,EAAE,GAAGC,IAAI,EAAE;EAC5C,OAAOJ,qBAAqB,CAACG,IAAI,EAAEM,iBAAiB,EAAE,GAAGL,IAAI,CAAC;AAClE;AACA,MAAMO,kBAAkB,GAAG,CACvB,CAAC,EACD,yDAAyD,EACzD,CAAC,GAED,0BAA0B,CAC7B;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAACT,IAAI,EAAE,GAAGC,IAAI,EAAE;EAC7C,OAAOJ,qBAAqB,CAACG,IAAI,EAAEQ,kBAAkB,EAAE,GAAGP,IAAI,CAAC;AACnE;AACA,MAAMS,OAAO,GAAG,CAAC,CAAC,EAAE,8CAA8C,EAAE,CAAC,CAAC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAACX,IAAI,EAAE,GAAGC,IAAI,EAAE;EAClC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEU,OAAO,EAAE,GAAGT,IAAI,CAAC;AACxD;AACA,MAAMW,WAAW,GAAG,CAAC,CAAC,EAAE,kDAAkD,EAAE,CAAC,CAAC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAACb,IAAI,EAAE,GAAGC,IAAI,EAAE;EACtC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEY,WAAW,EAAE,GAAGX,IAAI,CAAC;AAC5D","ignoreList":[]}
|
|
@@ -11,6 +11,12 @@ export interface Agent {
|
|
|
11
11
|
metadata: AgentMetadata;
|
|
12
12
|
parameters: Record<ParameterId, Parameter>;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* The final answer for an exchange. Responses are formatted using markdown.
|
|
16
|
+
*
|
|
17
|
+
* Log Safety: UNSAFE
|
|
18
|
+
*/
|
|
19
|
+
export type AgentMarkdownResponse = LooselyBrandedString<"AgentMarkdownResponse">;
|
|
14
20
|
/**
|
|
15
21
|
* Metadata for an Agent.
|
|
16
22
|
*
|
|
@@ -28,6 +34,15 @@ export interface AgentMetadata {
|
|
|
28
34
|
* Log Safety: SAFE
|
|
29
35
|
*/
|
|
30
36
|
export type AgentRid = LooselyBrandedString<"AgentRid">;
|
|
37
|
+
/**
|
|
38
|
+
* Context retrieved from an Agent's configured context data sources which was relevant to the
|
|
39
|
+
supplied user message.
|
|
40
|
+
*
|
|
41
|
+
* Log Safety: SAFE
|
|
42
|
+
*/
|
|
43
|
+
export interface AgentSessionRagContextResponse {
|
|
44
|
+
objectContexts: Array<ObjectContext>;
|
|
45
|
+
}
|
|
31
46
|
/**
|
|
32
47
|
* Log Safety: SAFE
|
|
33
48
|
*/
|
|
@@ -50,6 +65,58 @@ export interface AgentVersionDetails {
|
|
|
50
65
|
* Log Safety: SAFE
|
|
51
66
|
*/
|
|
52
67
|
export type AgentVersionString = LooselyBrandedString<"AgentVersionString">;
|
|
68
|
+
/**
|
|
69
|
+
* A page of results for sessions across all accessible Agents for the calling user.
|
|
70
|
+
Sessions are returned in order of most recently updated first.
|
|
71
|
+
*
|
|
72
|
+
* Log Safety: UNSAFE
|
|
73
|
+
*/
|
|
74
|
+
export interface AgentsSessionsPage {
|
|
75
|
+
nextPageToken?: PageToken;
|
|
76
|
+
data: Array<Session>;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Log Safety: UNSAFE
|
|
80
|
+
*/
|
|
81
|
+
export interface BlockingContinueSessionRequest {
|
|
82
|
+
userInput: UserTextInput;
|
|
83
|
+
parameterInputs: Record<ParameterId, ParameterValue>;
|
|
84
|
+
contextsOverride?: Array<InputContext>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Log Safety: UNSAFE
|
|
88
|
+
*/
|
|
89
|
+
export interface CancelSessionRequest {
|
|
90
|
+
messageId: MessageId;
|
|
91
|
+
response?: AgentMarkdownResponse;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Log Safety: UNSAFE
|
|
95
|
+
*/
|
|
96
|
+
export interface CancelSessionResponse {
|
|
97
|
+
result?: SessionExchangeResult;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Log Safety: UNSAFE
|
|
101
|
+
*/
|
|
102
|
+
export interface Content {
|
|
103
|
+
exchanges: Array<SessionExchange>;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Log Safety: SAFE
|
|
107
|
+
*/
|
|
108
|
+
export interface CreateSessionRequest {
|
|
109
|
+
agentVersion?: AgentVersionString;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Custom retrieved context to provide
|
|
113
|
+
to an Agent for continuing a session.
|
|
114
|
+
*
|
|
115
|
+
* Log Safety: UNSAFE
|
|
116
|
+
*/
|
|
117
|
+
export type InputContext = {
|
|
118
|
+
type: "objectContext";
|
|
119
|
+
} & ObjectContext;
|
|
53
120
|
/**
|
|
54
121
|
* Log Safety: UNSAFE
|
|
55
122
|
*/
|
|
@@ -57,12 +124,54 @@ export interface ListAgentVersionsResponse {
|
|
|
57
124
|
data: Array<AgentVersion>;
|
|
58
125
|
nextPageToken?: _Core.PageToken;
|
|
59
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Log Safety: UNSAFE
|
|
129
|
+
*/
|
|
130
|
+
export interface ListSessionsResponse {
|
|
131
|
+
data: Array<Session>;
|
|
132
|
+
nextPageToken?: _Core.PageToken;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* An ephemeral client-generated Universally Unique Identifier (UUID) to identify a message for streamed session responses.
|
|
136
|
+
This can be used by clients to cancel a streamed exchange.
|
|
137
|
+
*
|
|
138
|
+
* Log Safety: SAFE
|
|
139
|
+
*/
|
|
140
|
+
export type MessageId = string;
|
|
141
|
+
/**
|
|
142
|
+
* Details of relevant retrieved object instances for a user's message to include as
|
|
143
|
+
additional context in the prompt to the Agent.
|
|
144
|
+
*
|
|
145
|
+
* Log Safety: SAFE
|
|
146
|
+
*/
|
|
147
|
+
export interface ObjectContext {
|
|
148
|
+
objectRids: Array<_Core.ObjectRid>;
|
|
149
|
+
propertyTypeRids: Array<_Core.PropertyTypeRid>;
|
|
150
|
+
}
|
|
60
151
|
/**
|
|
61
152
|
* Log Safety: UNSAFE
|
|
62
153
|
*/
|
|
63
154
|
export interface ObjectSetParameter {
|
|
64
155
|
expectedObjectTypes: Array<_Core.ObjectTypeId>;
|
|
65
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Log Safety: SAFE
|
|
159
|
+
*/
|
|
160
|
+
export interface ObjectSetParameterValueUpdate {
|
|
161
|
+
value: _Core.ObjectSetRid;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The maximum number of results to return in a single page.
|
|
165
|
+
*
|
|
166
|
+
* Log Safety: SAFE
|
|
167
|
+
*/
|
|
168
|
+
export type PageSize = number;
|
|
169
|
+
/**
|
|
170
|
+
* The token to use to retrieve a page of results from.
|
|
171
|
+
*
|
|
172
|
+
* Log Safety: SAFE
|
|
173
|
+
*/
|
|
174
|
+
export type PageToken = LooselyBrandedString<"PageToken">;
|
|
66
175
|
/**
|
|
67
176
|
* A parameter configured for an Agent in AIP Agent Studio.
|
|
68
177
|
*
|
|
@@ -94,10 +203,117 @@ export type ParameterType = ({
|
|
|
94
203
|
} & StringParameter) | ({
|
|
95
204
|
type: "objectSet";
|
|
96
205
|
} & ObjectSetParameter);
|
|
206
|
+
/**
|
|
207
|
+
* The value provided for a parameter
|
|
208
|
+
configured on an Agent.
|
|
209
|
+
*
|
|
210
|
+
* Log Safety: UNSAFE
|
|
211
|
+
*/
|
|
212
|
+
export type ParameterValue = {
|
|
213
|
+
type: "string";
|
|
214
|
+
} & StringParameterValue;
|
|
215
|
+
/**
|
|
216
|
+
* A value update for a parameter which was
|
|
217
|
+
generated by the Agent. For StringParameter parameter types, this will be the updated string value. For
|
|
218
|
+
ObjectSetParameter parameter types, this will be a Resource Identifier (RID) for the updated object set.
|
|
219
|
+
*
|
|
220
|
+
* Log Safety: UNSAFE
|
|
221
|
+
*/
|
|
222
|
+
export type ParameterValueUpdate = ({
|
|
223
|
+
type: "string";
|
|
224
|
+
} & StringParameterValue) | ({
|
|
225
|
+
type: "objectSet";
|
|
226
|
+
} & ObjectSetParameterValueUpdate);
|
|
227
|
+
/**
|
|
228
|
+
* Log Safety: UNSAFE
|
|
229
|
+
*/
|
|
230
|
+
export interface RagContextSessionRequest {
|
|
231
|
+
userInput: UserTextInput;
|
|
232
|
+
parameterInputs: Record<ParameterId, ParameterValue>;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Log Safety: UNSAFE
|
|
236
|
+
*/
|
|
237
|
+
export interface Session {
|
|
238
|
+
rid: SessionRid;
|
|
239
|
+
metadata: SessionMetadata;
|
|
240
|
+
agentRid: AgentRid;
|
|
241
|
+
agentVersion: AgentVersionString;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Represents an individual exchange between a user and an Agent in a conversation session.
|
|
245
|
+
*
|
|
246
|
+
* Log Safety: UNSAFE
|
|
247
|
+
*/
|
|
248
|
+
export interface SessionExchange {
|
|
249
|
+
userInput: UserTextInput;
|
|
250
|
+
contexts?: SessionExchangeContexts;
|
|
251
|
+
result: SessionExchangeResult;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Retrieved context which was passed to the Agent as input for the exchange.
|
|
255
|
+
*
|
|
256
|
+
* Log Safety: SAFE
|
|
257
|
+
*/
|
|
258
|
+
export interface SessionExchangeContexts {
|
|
259
|
+
objectContexts: Array<ObjectContext>;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* The returned result from the Agent for a session exchange.
|
|
263
|
+
*
|
|
264
|
+
* Log Safety: UNSAFE
|
|
265
|
+
*/
|
|
266
|
+
export interface SessionExchangeResult {
|
|
267
|
+
agentMarkdownResponse: AgentMarkdownResponse;
|
|
268
|
+
parameterUpdates: Record<ParameterId, ParameterValueUpdate>;
|
|
269
|
+
totalTokensUsed?: number;
|
|
270
|
+
interruptedOutput: boolean;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Metadata for a conversation session with an Agent.
|
|
274
|
+
*
|
|
275
|
+
* Log Safety: UNSAFE
|
|
276
|
+
*/
|
|
277
|
+
export interface SessionMetadata {
|
|
278
|
+
title: string;
|
|
279
|
+
createdTime: string;
|
|
280
|
+
updatedTime: string;
|
|
281
|
+
messageCount: number;
|
|
282
|
+
estimatedExpiresTime: string;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* The Resource Identifier (RID) of the conversation session.
|
|
286
|
+
*
|
|
287
|
+
* Log Safety: SAFE
|
|
288
|
+
*/
|
|
289
|
+
export type SessionRid = LooselyBrandedString<"SessionRid">;
|
|
290
|
+
/**
|
|
291
|
+
* Log Safety: UNSAFE
|
|
292
|
+
*/
|
|
293
|
+
export interface StreamingContinueSessionRequest {
|
|
294
|
+
userInput: UserTextInput;
|
|
295
|
+
parameterInputs: Record<ParameterId, ParameterValue>;
|
|
296
|
+
contextsOverride?: Array<InputContext>;
|
|
297
|
+
messageId?: MessageId;
|
|
298
|
+
}
|
|
97
299
|
/**
|
|
98
300
|
* Log Safety: UNSAFE
|
|
99
301
|
*/
|
|
100
302
|
export interface StringParameter {
|
|
101
303
|
defaultValue?: string;
|
|
102
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* A value passed for StringParameter parameter types.
|
|
307
|
+
*
|
|
308
|
+
* Log Safety: UNSAFE
|
|
309
|
+
*/
|
|
310
|
+
export interface StringParameterValue {
|
|
311
|
+
value: string;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Log Safety: UNSAFE
|
|
315
|
+
*/
|
|
316
|
+
export interface UserTextInput {
|
|
317
|
+
text: string;
|
|
318
|
+
}
|
|
103
319
|
//# sourceMappingURL=_components.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_components.d.ts","sourceRoot":"","sources":["../../src/_components.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAEjD,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,GAAG;IAC5D,aAAa,CAAC,EAAE,CAAC,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,QAAQ,CAAC;IACd,OAAO,EAAE,kBAAkB,CAAC;IAC5B,QAAQ,EAAE,aAAa,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;CAC5C;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC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