@osdk/client 2.87.0 → 2.88.0-main-1c7d042022c0223d9ffbba2b8fbf0420d9d3c64a

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/browser/Client.js +1 -1
  3. package/build/browser/Client.js.map +1 -1
  4. package/build/browser/agents/createAgentSession.js +2 -5
  5. package/build/browser/agents/createAgentSession.js.map +1 -1
  6. package/build/browser/agents/createAgentSessionHandle.js +38 -0
  7. package/build/browser/agents/createAgentSessionHandle.js.map +1 -0
  8. package/build/browser/agents/getAgentSessionState.js +60 -0
  9. package/build/browser/agents/getAgentSessionState.js.map +1 -0
  10. package/build/browser/agents/sendEventToAgentSession.js +1 -1
  11. package/build/browser/agents/sendEventToAgentSession.js.map +1 -1
  12. package/build/browser/public/experimental.js +1 -1
  13. package/build/browser/public/experimental.js.map +1 -1
  14. package/build/browser/util/UserAgent.js +2 -2
  15. package/build/browser/util/UserAgent.js.map +1 -1
  16. package/build/cjs/{applyStreamingQuery-OFE276IY.cjs → applyStreamingQuery-AFZ3BULT.cjs} +8 -8
  17. package/build/cjs/{applyStreamingQuery-OFE276IY.cjs.map → applyStreamingQuery-AFZ3BULT.cjs.map} +1 -1
  18. package/build/cjs/{chunk-HL7TDBEU.cjs → chunk-2ND2USKP.cjs} +5 -5
  19. package/build/cjs/{chunk-HL7TDBEU.cjs.map → chunk-2ND2USKP.cjs.map} +1 -1
  20. package/build/cjs/{chunk-JPO5C5QG.cjs → chunk-4AXGB5BH.cjs} +14 -14
  21. package/build/cjs/{chunk-JPO5C5QG.cjs.map → chunk-4AXGB5BH.cjs.map} +1 -1
  22. package/build/cjs/{chunk-FRZNF77P.cjs → chunk-5CRO5V7A.cjs} +2 -2
  23. package/build/cjs/{chunk-FRZNF77P.cjs.map → chunk-5CRO5V7A.cjs.map} +1 -1
  24. package/build/cjs/{chunk-VK37CUQE.cjs → chunk-E3NRTO7U.cjs} +116 -58
  25. package/build/cjs/chunk-E3NRTO7U.cjs.map +1 -0
  26. package/build/cjs/{chunk-PPEWTL53.cjs → chunk-GCDUGQ3A.cjs} +83 -83
  27. package/build/cjs/{chunk-PPEWTL53.cjs.map → chunk-GCDUGQ3A.cjs.map} +1 -1
  28. package/build/cjs/{chunk-US5WI5KS.cjs → chunk-V33A3DFW.cjs} +8 -8
  29. package/build/cjs/{chunk-US5WI5KS.cjs.map → chunk-V33A3DFW.cjs.map} +1 -1
  30. package/build/cjs/index.cjs +12 -12
  31. package/build/cjs/public/experimental.cjs +14 -10
  32. package/build/cjs/public/experimental.d.cts +1 -1
  33. package/build/cjs/public/internal.cjs +10 -10
  34. package/build/cjs/public/observable.cjs +6 -6
  35. package/build/cjs/public/unstable-do-not-use.cjs +17 -17
  36. package/build/esm/Client.js +1 -1
  37. package/build/esm/Client.js.map +1 -1
  38. package/build/esm/agents/createAgentSession.js +2 -5
  39. package/build/esm/agents/createAgentSession.js.map +1 -1
  40. package/build/esm/agents/createAgentSessionHandle.js +38 -0
  41. package/build/esm/agents/createAgentSessionHandle.js.map +1 -0
  42. package/build/esm/agents/getAgentSessionState.js +60 -0
  43. package/build/esm/agents/getAgentSessionState.js.map +1 -0
  44. package/build/esm/agents/sendEventToAgentSession.js +1 -1
  45. package/build/esm/agents/sendEventToAgentSession.js.map +1 -1
  46. package/build/esm/public/experimental.js +1 -1
  47. package/build/esm/public/experimental.js.map +1 -1
  48. package/build/esm/util/UserAgent.js +2 -2
  49. package/build/esm/util/UserAgent.js.map +1 -1
  50. package/build/types/Client.d.ts +1 -1
  51. package/build/types/agents/createAgentSessionHandle.d.ts +4 -0
  52. package/build/types/agents/createAgentSessionHandle.d.ts.map +1 -0
  53. package/build/types/agents/getAgentSessionState.d.ts +6 -0
  54. package/build/types/agents/getAgentSessionState.d.ts.map +1 -0
  55. package/build/types/agents/sendEventToAgentSession.d.ts +1 -1
  56. package/build/types/public/experimental.d.ts +2 -2
  57. package/build/types/public/experimental.d.ts.map +1 -1
  58. package/package.json +9 -9
  59. package/build/cjs/chunk-VK37CUQE.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @osdk/client
2
2
 
3
+ ## 2.88.0-main-1c7d042022c0223d9ffbba2b8fbf0420d9d3c64a
4
+
5
+ ### Minor Changes
6
+
7
+ - eb1fc8f: Add experimental support for reading agent session state.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [eb1fc8f]
12
+ - @osdk/api@2.88.0-main-1c7d042022c0223d9ffbba2b8fbf0420d9d3c64a
13
+ - @osdk/generator-converters@2.88.0-main-1c7d042022c0223d9ffbba2b8fbf0420d9d3c64a
14
+ - @osdk/shared.test@2.59.1-main-1c7d042022c0223d9ffbba2b8fbf0420d9d3c64a
15
+ - @osdk/client.unstable@2.88.0-main-1c7d042022c0223d9ffbba2b8fbf0420d9d3c64a
16
+
3
17
  ## 2.87.0
4
18
 
5
19
  ### Minor Changes
@@ -21,7 +21,7 @@
21
21
  export const additionalContext = Symbol("additionalContext");
22
22
 
23
23
  // BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.
24
- const MaxOsdkVersion = "2.87.0";
24
+ const MaxOsdkVersion = "2.88.0";
25
25
  // END: THIS IS GENERATED CODE. DO NOT EDIT.
26
26
 
27
27
  const ErrorMessage = Symbol("ErrorMessage");
@@ -1 +1 @@
1
- {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.ts"],"sourcesContent":["/*\n * Copyright 2023 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 */\n\nimport type {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n AgentDefinition,\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\n\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { AgentSignatureFromDef } from \"./agents/types.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> =\n Q extends VersionBound<infer V>\n ? SatisfiesSemver<V, MaxOsdkVersion> extends true\n ? Q\n : Q & {\n [ErrorMessage]: `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n /**\n * Returns the operation surface for the given ontology definition. The shape of the\n * returned value is dispatched on what kind of definition is passed:\n * - object type → the object set type for that ontology object (typically a generated extension of {@link ObjectSet})\n * - interface → a {@link MinimalObjectSet} for the interface\n * - action → a callable with `applyAction` / `batchApplyAction`\n * - query → a callable with `executeFunction`\n * - experiment → the unstable feature surface for that experiment\n *\n * @param o - The object type definition to wrap.\n * @example\n * ```ts\n * const employees = await client(Employee).fetchPage({ $pageSize: 30 });\n * const employee = await client(Employee).fetchOne(12345);\n * ```\n * @returns an object set scoped to all objects of this type.\n */\n <Q extends ObjectTypeDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"]\n ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n /**\n * @param o - The interface definition to wrap.\n * @example\n * ```ts\n * const page = await client(MyInterface).fetchPage({ $pageSize: 30 });\n * ```\n * @returns a minimal object set over all objects implementing the interface.\n */\n <Q extends InterfaceDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"]\n ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n /**\n * @param o - The action definition to invoke.\n * @example\n * ```ts\n * const result = await client(createEmployee).applyAction(\n * { name: \"Jane\", department: \"Engineering\" },\n * { $returnEdits: true },\n * );\n * ```\n * @returns a callable for applying (or batch-applying) the action.\n */\n <Q extends ActionDefinition<any>>(o: Q): ActionSignatureFromDef<Q>;\n\n /**\n * @param o - The query definition to invoke.\n * @example\n * ```ts\n * const result = await client(getEmployeeCount).executeFunction({ department: \"Engineering\" });\n * ```\n * @returns a callable for executing the query function.\n */\n <Q extends QueryDefinition<any>>(o: Q): QuerySignatureFromDef<Q>;\n\n /** @beta */\n <Q extends AgentDefinition<unknown>>(o: Q): AgentSignatureFromDef<Q>;\n\n /**\n * @param experiment - The experiment marker that gates an unstable feature.\n * @example\n * ```ts\n * const employee = await client(__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid)\n * .fetchOneByRid(Employee, \"ri.phonograph2-objects.main.object.1234\");\n * ```\n * @returns the experiment-specific function surface.\n */\n <\n Q extends\n | Experiment<\"2.0.8\">\n | Experiment<\"2.1.0\">\n | Experiment<\"2.59.0\">\n | Experiment<\"2.2.0\">\n | Experiment<\"2.8.0\">\n | Experiment<\"2.19.0\">,\n >(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n /**\n * Fetches runtime metadata for the given ontology definition. The returned shape\n * is dispatched on the kind of definition passed: {@link ObjectMetadata},\n * {@link InterfaceMetadata}, {@link ActionMetadata}, or {@link QueryMetadata}.\n * @param o - The object type, interface, action, or query definition to look up.\n * @example\n * ```ts\n * const meta = await client.fetchMetadata(Employee);\n * console.log(meta.displayName, meta.description);\n * ```\n * @returns a promise resolving to the metadata for the given definition.\n */\n fetchMetadata<\n Q extends\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>,\n >(\n o: Q,\n ): Promise<\n Q extends ObjectTypeDefinition\n ? ObjectMetadata\n : Q extends InterfaceDefinition\n ? InterfaceMetadata\n : Q extends ActionDefinition<any>\n ? ActionMetadata\n : Q extends QueryDefinition<any>\n ? QueryMetadata\n : never\n >;\n\n /** @internal */\n [additionalContext]: MinimalClient;\n}\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext: unique symbol = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.87.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\nexport type MaxOsdkVersion = typeof MaxOsdkVersion;\nconst ErrorMessage: unique symbol = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA6BA;;AAqIA;AACA;AACA,OAAO,MAAMA,iBAAgC,GAAGC,MAAM,CAAC,mBAAmB,CAAC;;AAE3E;AACA,MAAMC,cAAc,GAAG,QAAQ;AAC/B;;AAEA,MAAMC,YAA2B,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.ts"],"sourcesContent":["/*\n * Copyright 2023 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 */\n\nimport type {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n AgentDefinition,\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\n\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { AgentSignatureFromDef } from \"./agents/types.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> =\n Q extends VersionBound<infer V>\n ? SatisfiesSemver<V, MaxOsdkVersion> extends true\n ? Q\n : Q & {\n [ErrorMessage]: `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n /**\n * Returns the operation surface for the given ontology definition. The shape of the\n * returned value is dispatched on what kind of definition is passed:\n * - object type → the object set type for that ontology object (typically a generated extension of {@link ObjectSet})\n * - interface → a {@link MinimalObjectSet} for the interface\n * - action → a callable with `applyAction` / `batchApplyAction`\n * - query → a callable with `executeFunction`\n * - experiment → the unstable feature surface for that experiment\n *\n * @param o - The object type definition to wrap.\n * @example\n * ```ts\n * const employees = await client(Employee).fetchPage({ $pageSize: 30 });\n * const employee = await client(Employee).fetchOne(12345);\n * ```\n * @returns an object set scoped to all objects of this type.\n */\n <Q extends ObjectTypeDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"]\n ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n /**\n * @param o - The interface definition to wrap.\n * @example\n * ```ts\n * const page = await client(MyInterface).fetchPage({ $pageSize: 30 });\n * ```\n * @returns a minimal object set over all objects implementing the interface.\n */\n <Q extends InterfaceDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"]\n ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n /**\n * @param o - The action definition to invoke.\n * @example\n * ```ts\n * const result = await client(createEmployee).applyAction(\n * { name: \"Jane\", department: \"Engineering\" },\n * { $returnEdits: true },\n * );\n * ```\n * @returns a callable for applying (or batch-applying) the action.\n */\n <Q extends ActionDefinition<any>>(o: Q): ActionSignatureFromDef<Q>;\n\n /**\n * @param o - The query definition to invoke.\n * @example\n * ```ts\n * const result = await client(getEmployeeCount).executeFunction({ department: \"Engineering\" });\n * ```\n * @returns a callable for executing the query function.\n */\n <Q extends QueryDefinition<any>>(o: Q): QuerySignatureFromDef<Q>;\n\n /** @beta */\n <Q extends AgentDefinition<unknown>>(o: Q): AgentSignatureFromDef<Q>;\n\n /**\n * @param experiment - The experiment marker that gates an unstable feature.\n * @example\n * ```ts\n * const employee = await client(__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid)\n * .fetchOneByRid(Employee, \"ri.phonograph2-objects.main.object.1234\");\n * ```\n * @returns the experiment-specific function surface.\n */\n <\n Q extends\n | Experiment<\"2.0.8\">\n | Experiment<\"2.1.0\">\n | Experiment<\"2.59.0\">\n | Experiment<\"2.2.0\">\n | Experiment<\"2.8.0\">\n | Experiment<\"2.19.0\">,\n >(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n /**\n * Fetches runtime metadata for the given ontology definition. The returned shape\n * is dispatched on the kind of definition passed: {@link ObjectMetadata},\n * {@link InterfaceMetadata}, {@link ActionMetadata}, or {@link QueryMetadata}.\n * @param o - The object type, interface, action, or query definition to look up.\n * @example\n * ```ts\n * const meta = await client.fetchMetadata(Employee);\n * console.log(meta.displayName, meta.description);\n * ```\n * @returns a promise resolving to the metadata for the given definition.\n */\n fetchMetadata<\n Q extends\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>,\n >(\n o: Q,\n ): Promise<\n Q extends ObjectTypeDefinition\n ? ObjectMetadata\n : Q extends InterfaceDefinition\n ? InterfaceMetadata\n : Q extends ActionDefinition<any>\n ? ActionMetadata\n : Q extends QueryDefinition<any>\n ? QueryMetadata\n : never\n >;\n\n /** @internal */\n [additionalContext]: MinimalClient;\n}\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext: unique symbol = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.88.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\nexport type MaxOsdkVersion = typeof MaxOsdkVersion;\nconst ErrorMessage: unique symbol = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA6BA;;AAqIA;AACA;AACA,OAAO,MAAMA,iBAAgC,GAAGC,MAAM,CAAC,mBAAmB,CAAC;;AAE3E;AACA,MAAMC,cAAc,GAAG,QAAQ;AAC/B;;AAEA,MAAMC,YAA2B,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
@@ -17,7 +17,7 @@
17
17
  import * as Sessions from "@osdk/foundry.agents/AgentSession";
18
18
  import { addUserAgentHeader } from "../util/addUserAgentHeader.js";
19
19
  import { toDataValueAgents } from "../util/toDataValueAgents.js";
20
- import { sendEventToAgentSession } from "./sendEventToAgentSession.js";
20
+ import { createAgentSessionHandle } from "./createAgentSessionHandle.js";
21
21
  export async function createAgentSession(client, agent, args) {
22
22
  if (client.scenarioRid != null) {
23
23
  throw new Error("Agent sessions are not supported in scenarios");
@@ -46,9 +46,6 @@ export async function createAgentSession(client, agent, args) {
46
46
  }, {
47
47
  preview: true
48
48
  });
49
- return {
50
- id: response.id,
51
- experimental_sendEvent: (event, options) => sendEventToAgentSession(clientWithHeaders, response.id, agentDefinition.eventDefinitions, event, options)
52
- };
49
+ return createAgentSessionHandle(clientWithHeaders, response.id, agentDefinition);
53
50
  }
54
51
  //# sourceMappingURL=createAgentSession.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createAgentSession.js","names":["Sessions","addUserAgentHeader","toDataValueAgents","sendEventToAgentSession","createAgentSession","client","agent","args","scenarioRid","Error","transactionId","branch","clientWithHeaders","ontologyRid","agentDefinition","ontologyProvider","getAgentDefinition","apiName","version","convertedArguments","type","fields","argumentDefinitions","response","create","ontology","agentApiName","agentVersion","arguments","preview","id","experimental_sendEvent","event","options","eventDefinitions"],"sources":["createAgentSession.ts"],"sourcesContent":["/*\n * Copyright 2026 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 */\n\nimport type { AgentDefinition, AgentSession } from \"@osdk/api/unstable\";\nimport * as Sessions from \"@osdk/foundry.agents/AgentSession\";\n\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport { addUserAgentHeader } from \"../util/addUserAgentHeader.js\";\nimport { toDataValueAgents } from \"../util/toDataValueAgents.js\";\nimport { sendEventToAgentSession } from \"./sendEventToAgentSession.js\";\nimport type { AgentSignatureFromDef } from \"./types.js\";\n\nexport async function createAgentSession<D extends AgentDefinition<unknown>>(\n client: MinimalClient,\n agent: D,\n args?: Parameters<AgentSignatureFromDef<D>[\"experimental_createSession\"]>[0],\n): Promise<AgentSession> {\n if (client.scenarioRid != null) {\n throw new Error(\"Agent sessions are not supported in scenarios\");\n }\n if (client.transactionId != null) {\n throw new Error(\"Agent sessions are not supported in transactions\");\n }\n if (client.branch != null) {\n throw new Error(\"Agent sessions are not supported on branches\");\n }\n const clientWithHeaders = addUserAgentHeader(client, agent);\n const ontologyRid = await client.ontologyRid;\n const agentDefinition = await client.ontologyProvider.getAgentDefinition(\n agent.apiName,\n agent.version,\n );\n const convertedArguments = await toDataValueAgents(args ?? {}, client, {\n type: \"struct\",\n fields: agentDefinition.argumentDefinitions,\n });\n const response = await Sessions.create(\n clientWithHeaders,\n {\n agent: {\n type: \"agentApiName\",\n ontology: ontologyRid,\n agentApiName: agent.apiName,\n },\n agentVersion: agent.version,\n arguments: convertedArguments,\n },\n { preview: true },\n );\n return {\n id: response.id,\n experimental_sendEvent: (event, options) =>\n sendEventToAgentSession(\n clientWithHeaders,\n response.id,\n agentDefinition.eventDefinitions,\n event,\n options,\n ),\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAO,KAAKA,QAAQ,MAAM,mCAAmC;AAG7D,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,uBAAuB,QAAQ,8BAA8B;AAGtE,OAAO,eAAeC,kBAAkBA,CACtCC,MAAqB,EACrBC,KAAQ,EACRC,IAA4E,EACrD;EACvB,IAAIF,MAAM,CAACG,WAAW,IAAI,IAAI,EAAE;IAC9B,MAAM,IAAIC,KAAK,CAAC,+CAA+C,CAAC;EAClE;EACA,IAAIJ,MAAM,CAACK,aAAa,IAAI,IAAI,EAAE;IAChC,MAAM,IAAID,KAAK,CAAC,kDAAkD,CAAC;EACrE;EACA,IAAIJ,MAAM,CAACM,MAAM,IAAI,IAAI,EAAE;IACzB,MAAM,IAAIF,KAAK,CAAC,8CAA8C,CAAC;EACjE;EACA,MAAMG,iBAAiB,GAAGX,kBAAkB,CAACI,MAAM,EAAEC,KAAK,CAAC;EAC3D,MAAMO,WAAW,GAAG,MAAMR,MAAM,CAACQ,WAAW;EAC5C,MAAMC,eAAe,GAAG,MAAMT,MAAM,CAACU,gBAAgB,CAACC,kBAAkB,CACtEV,KAAK,CAACW,OAAO,EACbX,KAAK,CAACY,OACR,CAAC;EACD,MAAMC,kBAAkB,GAAG,MAAMjB,iBAAiB,CAACK,IAAI,IAAI,CAAC,CAAC,EAAEF,MAAM,EAAE;IACrEe,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAEP,eAAe,CAACQ;EAC1B,CAAC,CAAC;EACF,MAAMC,QAAQ,GAAG,MAAMvB,QAAQ,CAACwB,MAAM,CACpCZ,iBAAiB,EACjB;IACEN,KAAK,EAAE;MACLc,IAAI,EAAE,cAAc;MACpBK,QAAQ,EAAEZ,WAAW;MACrBa,YAAY,EAAEpB,KAAK,CAACW;IACtB,CAAC;IACDU,YAAY,EAAErB,KAAK,CAACY,OAAO;IAC3BU,SAAS,EAAET;EACb,CAAC,EACD;IAAEU,OAAO,EAAE;EAAK,CAClB,CAAC;EACD,OAAO;IACLC,EAAE,EAAEP,QAAQ,CAACO,EAAE;IACfC,sBAAsB,EAAEA,CAACC,KAAK,EAAEC,OAAO,KACrC9B,uBAAuB,CACrBS,iBAAiB,EACjBW,QAAQ,CAACO,EAAE,EACXhB,eAAe,CAACoB,gBAAgB,EAChCF,KAAK,EACLC,OACF;EACJ,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"createAgentSession.js","names":["Sessions","addUserAgentHeader","toDataValueAgents","createAgentSessionHandle","createAgentSession","client","agent","args","scenarioRid","Error","transactionId","branch","clientWithHeaders","ontologyRid","agentDefinition","ontologyProvider","getAgentDefinition","apiName","version","convertedArguments","type","fields","argumentDefinitions","response","create","ontology","agentApiName","agentVersion","arguments","preview","id"],"sources":["createAgentSession.ts"],"sourcesContent":["/*\n * Copyright 2026 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 */\n\nimport type { AgentDefinition, AgentSession } from \"@osdk/api/unstable\";\nimport * as Sessions from \"@osdk/foundry.agents/AgentSession\";\n\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport { addUserAgentHeader } from \"../util/addUserAgentHeader.js\";\nimport { toDataValueAgents } from \"../util/toDataValueAgents.js\";\nimport { createAgentSessionHandle } from \"./createAgentSessionHandle.js\";\nimport type { AgentSignatureFromDef } from \"./types.js\";\n\nexport async function createAgentSession<D extends AgentDefinition<unknown>>(\n client: MinimalClient,\n agent: D,\n args?: Parameters<AgentSignatureFromDef<D>[\"experimental_createSession\"]>[0],\n): Promise<AgentSession> {\n if (client.scenarioRid != null) {\n throw new Error(\"Agent sessions are not supported in scenarios\");\n }\n if (client.transactionId != null) {\n throw new Error(\"Agent sessions are not supported in transactions\");\n }\n if (client.branch != null) {\n throw new Error(\"Agent sessions are not supported on branches\");\n }\n const clientWithHeaders = addUserAgentHeader(client, agent);\n const ontologyRid = await client.ontologyRid;\n const agentDefinition = await client.ontologyProvider.getAgentDefinition(\n agent.apiName,\n agent.version,\n );\n const convertedArguments = await toDataValueAgents(args ?? {}, client, {\n type: \"struct\",\n fields: agentDefinition.argumentDefinitions,\n });\n const response = await Sessions.create(\n clientWithHeaders,\n {\n agent: {\n type: \"agentApiName\",\n ontology: ontologyRid,\n agentApiName: agent.apiName,\n },\n agentVersion: agent.version,\n arguments: convertedArguments,\n },\n { preview: true },\n );\n return createAgentSessionHandle(\n clientWithHeaders,\n response.id,\n agentDefinition,\n );\n}\n"],"mappings":"AAAA;AACA;AAC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OAAO;IAC3BU,SAAS,EAAET;EACb,CAAC,EACD;IAAEU,OAAO,EAAE;EAAK,CAClB,CAAC;EACD,OAAO1B,wBAAwB,CAC7BS,iBAAiB,EACjBW,QAAQ,CAACO,EAAE,EACXhB,eACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Copyright 2026 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
+
17
+ import { getAgentSessionState } from "./getAgentSessionState.js";
18
+ import { sendEventToAgentSession } from "./sendEventToAgentSession.js";
19
+ export function createAgentSessionHandle(client, id, agentDefinition) {
20
+ let consistencyKey;
21
+ return {
22
+ id,
23
+ async experimental_sendEvent(event, options) {
24
+ // TODO(mhogberg): Blindly accepting the consistency key here is not correct. If multiple events are being sent
25
+ // concurrently the consistency keys will arrive out-of-order. Consistency keys are not orderable, so there is
26
+ // no way for us to fix this currently.
27
+ consistencyKey = await sendEventToAgentSession(client, id, agentDefinition.eventDefinitions, event, options);
28
+ },
29
+ async experimental_getState(options) {
30
+ const result = await getAgentSessionState(client, id, consistencyKey, options);
31
+ // TODO(mhogberg): Blindly accepting the consistency key here can overwrite a newer key from a concurrent
32
+ // read or send. Consistency keys are not orderable, so there is no way to tell which key is newer.
33
+ consistencyKey = result.consistencyKey;
34
+ return result.state;
35
+ }
36
+ };
37
+ }
38
+ //# sourceMappingURL=createAgentSessionHandle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAgentSessionHandle.js","names":["getAgentSessionState","sendEventToAgentSession","createAgentSessionHandle","client","id","agentDefinition","consistencyKey","experimental_sendEvent","event","options","eventDefinitions","experimental_getState","result","state"],"sources":["createAgentSessionHandle.ts"],"sourcesContent":["/*\n * Copyright 2026 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 */\n\nimport type { AgentSession } from \"@osdk/api/unstable\";\nimport type { AgentDefinitionVersion } from \"@osdk/foundry.agents\";\n\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport { getAgentSessionState } from \"./getAgentSessionState.js\";\nimport { sendEventToAgentSession } from \"./sendEventToAgentSession.js\";\n\nexport function createAgentSessionHandle(\n client: MinimalClient,\n id: string,\n agentDefinition: AgentDefinitionVersion,\n): AgentSession {\n let consistencyKey: string | undefined;\n\n return {\n id,\n async experimental_sendEvent(event, options) {\n // TODO(mhogberg): Blindly accepting the consistency key here is not correct. If multiple events are being sent\n // concurrently the consistency keys will arrive out-of-order. Consistency keys are not orderable, so there is\n // no way for us to fix this currently.\n consistencyKey = await sendEventToAgentSession(\n client,\n id,\n agentDefinition.eventDefinitions,\n event,\n options,\n );\n },\n async experimental_getState(options) {\n const result = await getAgentSessionState(\n client,\n id,\n consistencyKey,\n options,\n );\n // TODO(mhogberg): Blindly accepting the consistency key here can overwrite a newer key from a concurrent\n // read or send. Consistency keys are not orderable, so there is no way to tell which key is newer.\n consistencyKey = result.consistencyKey;\n return result.state;\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,SAASA,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,uBAAuB,QAAQ,8BAA8B;AAEtE,OAAO,SAASC,wBAAwBA,CACtCC,MAAqB,EACrBC,EAAU,EACVC,eAAuC,EACzB;EACd,IAAIC,cAAkC;EAEtC,OAAO;IACLF,EAAE;IACF,MAAMG,sBAAsBA,CAACC,KAAK,EAAEC,OAAO,EAAE;MAC3C;MACA;MACA;MACAH,cAAc,GAAG,MAAML,uBAAuB,CAC5CE,MAAM,EACNC,EAAE,EACFC,eAAe,CAACK,gBAAgB,EAChCF,KAAK,EACLC,OACF,CAAC;IACH,CAAC;IACD,MAAME,qBAAqBA,CAACF,OAAO,EAAE;MACnC,MAAMG,MAAM,GAAG,MAAMZ,oBAAoB,CACvCG,MAAM,EACNC,EAAE,EACFE,cAAc,EACdG,OACF,CAAC;MACD;MACA;MACAH,cAAc,GAAGM,MAAM,CAACN,cAAc;MACtC,OAAOM,MAAM,CAACC,KAAK;IACrB;EACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Copyright 2026 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
+
17
+ import { AgentGetStateTimeoutError } from "@osdk/api/unstable";
18
+ import * as Sessions from "@osdk/foundry.agents/AgentSession";
19
+ export async function getAgentSessionState(client, sessionId, consistencyKey, options) {
20
+ const timeoutMs = options?.$timeoutMs ?? 30_000;
21
+ if (!Number.isFinite(timeoutMs) || timeoutMs < 0) {
22
+ throw new Error("$timeoutMs must be a finite non-negative number");
23
+ }
24
+ const deadline = Date.now() + timeoutMs;
25
+ const pollIntervalMs = options?.$pollIntervalMs ?? 1000;
26
+ if (!Number.isFinite(pollIntervalMs) || pollIntervalMs <= 0) {
27
+ throw new Error("$pollIntervalMs must be a finite positive number");
28
+ }
29
+ for (;;) {
30
+ const response = await Sessions.getSessionState(client, sessionId, {
31
+ consistencyKey,
32
+ preview: true
33
+ });
34
+ if (response.type === "available") {
35
+ const contextItems = Object.fromEntries(Object.entries(response.contextItems).map(([id, item]) => [id, {
36
+ type: item.contextItemType,
37
+ data: item.data
38
+ }]));
39
+ const state = {
40
+ arguments: response.arguments,
41
+ status: response.status.type,
42
+ agentState: {
43
+ data: response.agentState.data
44
+ },
45
+ contextItems,
46
+ contextItemOrder: response.contextItemOrder
47
+ };
48
+ return {
49
+ state,
50
+ consistencyKey: response.consistencyKey
51
+ };
52
+ }
53
+ const remainingMs = deadline - Date.now();
54
+ if (remainingMs <= 0) {
55
+ throw new AgentGetStateTimeoutError();
56
+ }
57
+ await new Promise(resolve => setTimeout(resolve, pollIntervalMs));
58
+ }
59
+ }
60
+ //# sourceMappingURL=getAgentSessionState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAgentSessionState.js","names":["AgentGetStateTimeoutError","Sessions","getAgentSessionState","client","sessionId","consistencyKey","options","timeoutMs","$timeoutMs","Number","isFinite","Error","deadline","Date","now","pollIntervalMs","$pollIntervalMs","response","getSessionState","preview","type","contextItems","Object","fromEntries","entries","map","id","item","contextItemType","data","state","arguments","status","agentState","contextItemOrder","remainingMs","Promise","resolve","setTimeout"],"sources":["getAgentSessionState.ts"],"sourcesContent":["/*\n * Copyright 2026 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 */\n\nimport {\n type AgentGetStateOptions,\n AgentGetStateTimeoutError,\n type AgentSessionState,\n} from \"@osdk/api/unstable\";\nimport * as Sessions from \"@osdk/foundry.agents/AgentSession\";\n\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\n\nexport async function getAgentSessionState(\n client: MinimalClient,\n sessionId: string,\n consistencyKey: string | undefined,\n options?: AgentGetStateOptions,\n): Promise<{ state: AgentSessionState; consistencyKey: string }> {\n const timeoutMs = options?.$timeoutMs ?? 30_000;\n if (!Number.isFinite(timeoutMs) || timeoutMs < 0) {\n throw new Error(\"$timeoutMs must be a finite non-negative number\");\n }\n const deadline = Date.now() + timeoutMs;\n\n const pollIntervalMs = options?.$pollIntervalMs ?? 1000;\n if (!Number.isFinite(pollIntervalMs) || pollIntervalMs <= 0) {\n throw new Error(\"$pollIntervalMs must be a finite positive number\");\n }\n\n for (;;) {\n const response = await Sessions.getSessionState(client, sessionId, {\n consistencyKey,\n preview: true,\n });\n\n if (response.type === \"available\") {\n const contextItems = Object.fromEntries(\n Object.entries(response.contextItems).map(([id, item]) => [\n id,\n { type: item.contextItemType, data: item.data },\n ]),\n );\n\n const state: AgentSessionState = {\n arguments: response.arguments,\n status: response.status.type,\n agentState: {\n data: response.agentState.data,\n },\n contextItems,\n contextItemOrder: response.contextItemOrder,\n };\n\n return { state, consistencyKey: response.consistencyKey };\n }\n\n const remainingMs = deadline - Date.now();\n if (remainingMs <= 0) {\n throw new AgentGetStateTimeoutError();\n }\n\n await new Promise((resolve) => setTimeout(resolve, pollIntervalMs));\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAEEA,yBAAyB,QAEpB,oBAAoB;AAC3B,OAAO,KAAKC,QAAQ,MAAM,mCAAmC;AAI7D,OAAO,eAAeC,oBAAoBA,CACxCC,MAAqB,EACrBC,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,CAACiB;MAC7B,CAAC;MAED,OAAO;QAAEJ,KAAK;QAAEzB,cAAc,EAAEY,QAAQ,CAACZ;MAAe,CAAC;IAC3D;IAEA,MAAM8B,WAAW,GAAGvB,QAAQ,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC;IACzC,IAAIqB,WAAW,IAAI,CAAC,EAAE;MACpB,MAAM,IAAInC,yBAAyB,CAAC,CAAC;IACvC;IAEA,MAAM,IAAIoC,OAAO,CAAEC,OAAO,IAAKC,UAAU,CAACD,OAAO,EAAEtB,cAAc,CAAC,CAAC;EACrE;AACF","ignoreList":[]}
@@ -46,7 +46,7 @@ export async function sendEventToAgentSession(client, sessionId, eventDefinition
46
46
  preview: true
47
47
  });
48
48
  if (response.result.type === "accepted") {
49
- return;
49
+ return response.result.consistencyKey;
50
50
  }
51
51
  const remainingMs = deadline - Date.now();
52
52
  if (remainingMs <= 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"sendEventToAgentSession.js","names":["AgentSendEventTimeoutError","Sessions","toDataValueAgents","sendEventToAgentSession","client","sessionId","eventDefinitions","event","options","keys","Object","length","Error","eventType","timeoutMs","$timeoutMs","Number","isFinite","deadline","Date","now","pollIntervalMs","$pollIntervalMs","id","globalThis","crypto","randomUUID","payloadType","find","definition","payload","response","sendEvent","preview","result","type","remainingMs","Promise","resolve","setTimeout"],"sources":["sendEventToAgentSession.ts"],"sourcesContent":["/*\n * Copyright 2026 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 */\n\nimport {\n type AgentSendEventOptions,\n AgentSendEventTimeoutError,\n} from \"@osdk/api/unstable\";\nimport type { AgentDefinitionVersion } from \"@osdk/foundry.agents\";\nimport * as Sessions from \"@osdk/foundry.agents/AgentSession\";\n\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport { toDataValueAgents } from \"../util/toDataValueAgents.js\";\n\ndeclare const process: {\n env: { TARGET: \"browser\" | \"node\" | undefined };\n};\n\nexport async function sendEventToAgentSession(\n client: MinimalClient,\n sessionId: string,\n eventDefinitions: AgentDefinitionVersion[\"eventDefinitions\"],\n event: Record<string, unknown>,\n options?: AgentSendEventOptions,\n): Promise<void> {\n const keys = Object.keys(event);\n if (keys.length !== 1) {\n throw new Error(\"experimental_sendEvent requires exactly one event\");\n }\n const eventType = keys[0];\n\n const timeoutMs = options?.$timeoutMs ?? 30_000;\n if (!Number.isFinite(timeoutMs) || timeoutMs < 0) {\n throw new Error(\"$timeoutMs must be a finite non-negative number\");\n }\n const deadline = Date.now() + timeoutMs;\n\n const pollIntervalMs = options?.$pollIntervalMs ?? 1000;\n if (!Number.isFinite(pollIntervalMs) || pollIntervalMs <= 0) {\n throw new Error(\"$pollIntervalMs must be a finite positive number\");\n }\n\n const id =\n process.env.TARGET === \"browser\"\n ? globalThis.crypto.randomUUID()\n : (await import(\"node:crypto\")).randomUUID();\n\n const payloadType = eventDefinitions.find(\n (definition) => definition.eventType === eventType,\n )?.payloadType;\n const payload = payloadType\n ? await toDataValueAgents(event[eventType], client, payloadType)\n : event[eventType];\n\n for (;;) {\n const response = await Sessions.sendEvent(\n client,\n sessionId,\n { event: { id, eventType, payload } },\n { preview: true },\n );\n\n if (response.result.type === \"accepted\") {\n return;\n }\n\n const remainingMs = deadline - Date.now();\n if (remainingMs <= 0) {\n throw new AgentSendEventTimeoutError();\n }\n\n await new Promise((resolve) => setTimeout(resolve, pollIntervalMs));\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAEEA,0BAA0B,QACrB,oBAAoB;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,MAAMkB,QAAQ,GAAG,MAAM9B,QAAQ,CAAC+B,SAAS,CACvC5B,MAAM,EACNC,SAAS,EACT;MAAEE,KAAK,EAAE;QAAEgB,EAAE;QAAEV,SAAS;QAAEiB;MAAQ;IAAE,CAAC,EACrC;MAAEG,OAAO,EAAE;IAAK,CAClB,CAAC;IAED,IAAIF,QAAQ,CAACG,MAAM,CAACC,IAAI,KAAK,UAAU,EAAE;MACvC;IACF;IAEA,MAAMC,WAAW,GAAGlB,QAAQ,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC;IACzC,IAAIgB,WAAW,IAAI,CAAC,EAAE;MACpB,MAAM,IAAIpC,0BAA0B,CAAC,CAAC;IACxC;IAEA,MAAM,IAAIqC,OAAO,CAAEC,OAAO,IAAKC,UAAU,CAACD,OAAO,EAAEjB,cAAc,CAAC,CAAC;EACrE;AACF","ignoreList":[]}
1
+ {"version":3,"file":"sendEventToAgentSession.js","names":["AgentSendEventTimeoutError","Sessions","toDataValueAgents","sendEventToAgentSession","client","sessionId","eventDefinitions","event","options","keys","Object","length","Error","eventType","timeoutMs","$timeoutMs","Number","isFinite","deadline","Date","now","pollIntervalMs","$pollIntervalMs","id","globalThis","crypto","randomUUID","payloadType","find","definition","payload","response","sendEvent","preview","result","type","consistencyKey","remainingMs","Promise","resolve","setTimeout"],"sources":["sendEventToAgentSession.ts"],"sourcesContent":["/*\n * Copyright 2026 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 */\n\nimport {\n type AgentSendEventOptions,\n AgentSendEventTimeoutError,\n} from \"@osdk/api/unstable\";\nimport type { AgentDefinitionVersion } from \"@osdk/foundry.agents\";\nimport * as Sessions from \"@osdk/foundry.agents/AgentSession\";\n\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport { toDataValueAgents } from \"../util/toDataValueAgents.js\";\n\ndeclare const process: {\n env: { TARGET: \"browser\" | \"node\" | undefined };\n};\n\nexport async function sendEventToAgentSession(\n client: MinimalClient,\n sessionId: string,\n eventDefinitions: AgentDefinitionVersion[\"eventDefinitions\"],\n event: Record<string, unknown>,\n options?: AgentSendEventOptions,\n): Promise<string> {\n const keys = Object.keys(event);\n if (keys.length !== 1) {\n throw new Error(\"experimental_sendEvent requires exactly one event\");\n }\n const eventType = keys[0];\n\n const timeoutMs = options?.$timeoutMs ?? 30_000;\n if (!Number.isFinite(timeoutMs) || timeoutMs < 0) {\n throw new Error(\"$timeoutMs must be a finite non-negative number\");\n }\n const deadline = Date.now() + timeoutMs;\n\n const pollIntervalMs = options?.$pollIntervalMs ?? 1000;\n if (!Number.isFinite(pollIntervalMs) || pollIntervalMs <= 0) {\n throw new Error(\"$pollIntervalMs must be a finite positive number\");\n }\n\n const id =\n process.env.TARGET === \"browser\"\n ? globalThis.crypto.randomUUID()\n : (await import(\"node:crypto\")).randomUUID();\n\n const payloadType = eventDefinitions.find(\n (definition) => definition.eventType === eventType,\n )?.payloadType;\n const payload = payloadType\n ? await toDataValueAgents(event[eventType], client, payloadType)\n : event[eventType];\n\n for (;;) {\n const response = await Sessions.sendEvent(\n client,\n sessionId,\n { event: { id, eventType, payload } },\n { preview: true },\n );\n\n if (response.result.type === \"accepted\") {\n return response.result.consistencyKey;\n }\n\n const remainingMs = deadline - Date.now();\n if (remainingMs <= 0) {\n throw new AgentSendEventTimeoutError();\n }\n\n await new Promise((resolve) => setTimeout(resolve, pollIntervalMs));\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAEEA,0BAA0B,QACrB,oBAAoB;AAE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AMkB,QAAQ,GAAG,MAAM9B,QAAQ,CAAC+B,SAAS,CACvC5B,MAAM,EACNC,SAAS,EACT;MAAEE,KAAK,EAAE;QAAEgB,EAAE;QAAEV,SAAS;QAAEiB;MAAQ;IAAE,CAAC,EACrC;MAAEG,OAAO,EAAE;IAAK,CAClB,CAAC;IAED,IAAIF,QAAQ,CAACG,MAAM,CAACC,IAAI,KAAK,UAAU,EAAE;MACvC,OAAOJ,QAAQ,CAACG,MAAM,CAACE,cAAc;IACvC;IAEA,MAAMC,WAAW,GAAGnB,QAAQ,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC;IACzC,IAAIiB,WAAW,IAAI,CAAC,EAAE;MACpB,MAAM,IAAIrC,0BAA0B,CAAC,CAAC;IACxC;IAEA,MAAM,IAAIsC,OAAO,CAAEC,OAAO,IAAKC,UAAU,CAACD,OAAO,EAAElB,cAAc,CAAC,CAAC;EACrE;AACF","ignoreList":[]}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export { AgentSendEventTimeoutError } from "@osdk/api/unstable";
17
+ export { AgentGetStateTimeoutError, AgentSendEventTimeoutError } from "@osdk/api/unstable";
18
18
  export { createClientWithTransaction } from "../createClient.js";
19
19
  export { createClientFromWriteableClient } from "../createClientFromWriteableClient.js";
20
20
  export { createScenario } from "../scenarios/createScenario.js";
@@ -1 +1 @@
1
- {"version":3,"file":"experimental.js","names":["AgentSendEventTimeoutError","createClientWithTransaction","createClientFromWriteableClient","createScenario","withScenario"],"sources":["experimental.ts"],"sourcesContent":["/*\n * Copyright 2026 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 */\n\nexport type {\n AgentDefinition,\n AgentParam,\n AgentSendEventOptions,\n AgentSession,\n} from \"@osdk/api/unstable\";\n\nexport { AgentSendEventTimeoutError } from \"@osdk/api/unstable\";\n\nexport { createClientWithTransaction } from \"../createClient.js\";\nexport { createClientFromWriteableClient } from \"../createClientFromWriteableClient.js\";\n\nexport { createScenario } from \"../scenarios/createScenario.js\";\nexport type { EXPERIMENTAL_ScenarioClient } from \"../scenarios/ScenarioClient.js\";\nexport { withScenario } from \"../scenarios/withScenario.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,SAASA,0BAA0B,QAAQ,oBAAoB;AAE/D,SAASC,2BAA2B,QAAQ,oBAAoB;AAChE,SAASC,+BAA+B,QAAQ,uCAAuC;AAEvF,SAASC,cAAc,QAAQ,gCAAgC;AAE/D,SAASC,YAAY,QAAQ,8BAA8B","ignoreList":[]}
1
+ {"version":3,"file":"experimental.js","names":["AgentGetStateTimeoutError","AgentSendEventTimeoutError","createClientWithTransaction","createClientFromWriteableClient","createScenario","withScenario"],"sources":["experimental.ts"],"sourcesContent":["/*\n * Copyright 2026 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 */\n\nexport type {\n AgentDefinition,\n AgentParam,\n AgentContextItem,\n AgentGetStateOptions,\n AgentSessionState,\n AgentSessionStatus,\n AgentSendEventOptions,\n AgentSession,\n} from \"@osdk/api/unstable\";\n\nexport {\n AgentGetStateTimeoutError,\n AgentSendEventTimeoutError,\n} from \"@osdk/api/unstable\";\n\nexport { createClientWithTransaction } from \"../createClient.js\";\nexport { createClientFromWriteableClient } from \"../createClientFromWriteableClient.js\";\n\nexport { createScenario } from \"../scenarios/createScenario.js\";\nexport type { EXPERIMENTAL_ScenarioClient } from \"../scenarios/ScenarioClient.js\";\nexport { withScenario } from \"../scenarios/withScenario.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA,SACEA,yBAAyB,EACzBC,0BAA0B,QACrB,oBAAoB;AAE3B,SAASC,2BAA2B,QAAQ,oBAAoB;AAChE,SAASC,+BAA+B,QAAQ,uCAAuC;AAEvF,SAASC,cAAc,QAAQ,gCAAgC;AAE/D,SAASC,YAAY,QAAQ,8BAA8B","ignoreList":[]}
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export const USER_AGENT = `osdk-client/${"2.87.0"}`;
18
- export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.87.0"}`;
17
+ export const USER_AGENT = `osdk-client/${"2.88.0-main-1c7d042022c0223d9ffbba2b8fbf0420d9d3c64a"}`;
18
+ export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.88.0-main-1c7d042022c0223d9ffbba2b8fbf0420d9d3c64a"}`;
19
19
  //# sourceMappingURL=UserAgent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserAgent.js","names":["USER_AGENT","OBSERVABLE_USER_AGENT"],"sources":["UserAgent.ts"],"sourcesContent":["/*\n * Copyright 2023 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 */\n\nexport const USER_AGENT: string = `osdk-client/${process.env.PACKAGE_VERSION}`;\nexport const OBSERVABLE_USER_AGENT: string = `osdk-observable-client/${process.env.PACKAGE_VERSION}`;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,UAAkB,GAAG,yBAA4C;AAC9E,OAAO,MAAMC,qBAA6B,GAAG,oCAAuD","ignoreList":[]}
1
+ {"version":3,"file":"UserAgent.js","names":["USER_AGENT","OBSERVABLE_USER_AGENT"],"sources":["UserAgent.ts"],"sourcesContent":["/*\n * Copyright 2023 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 */\n\nexport const USER_AGENT: string = `osdk-client/${process.env.PACKAGE_VERSION}`;\nexport const OBSERVABLE_USER_AGENT: string = `osdk-observable-client/${process.env.PACKAGE_VERSION}`;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,UAAkB,GAAG,uEAA4C;AAC9E,OAAO,MAAMC,qBAA6B,GAAG,kFAAuD","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkJPO5C5QG_cjs = require('./chunk-JPO5C5QG.cjs');
4
- var chunkFRZNF77P_cjs = require('./chunk-FRZNF77P.cjs');
3
+ var chunk4AXGB5BH_cjs = require('./chunk-4AXGB5BH.cjs');
4
+ var chunk5CRO5V7A_cjs = require('./chunk-5CRO5V7A.cjs');
5
5
  var chunkB4UCZI2Z_cjs = require('./chunk-B4UCZI2Z.cjs');
6
6
  require('./chunk-Q7SFCCGT.cjs');
7
7
 
@@ -17,19 +17,19 @@ async function* applyStreamingQuery(client, query, params) {
17
17
  if (client.flushEdits != null) {
18
18
  await client.flushEdits();
19
19
  }
20
- const response = await streamingExecute(chunkFRZNF77P_cjs.addUserAgentHeader(client, query), query.apiName, {
20
+ const response = await streamingExecute(chunk5CRO5V7A_cjs.addUserAgentHeader(client, query), query.apiName, {
21
21
  ontology: await client.ontologyRid,
22
- parameters: params ? await chunkJPO5C5QG_cjs.remapQueryParams(params, client, qd.parameters) : {},
22
+ parameters: params ? await chunk4AXGB5BH_cjs.remapQueryParams(params, client, qd.parameters) : {},
23
23
  version: query.isFixedVersion ? query.version : void 0,
24
24
  branch: client.branch
25
25
  }, {
26
26
  transactionId: client.transactionId,
27
27
  preview: true
28
28
  });
29
- const definitions = await chunkJPO5C5QG_cjs.getRequiredDefinitions(qd.output, client);
29
+ const definitions = await chunk4AXGB5BH_cjs.getRequiredDefinitions(qd.output, client);
30
30
  for await (const event of response) {
31
31
  if (event.type !== "data") continue;
32
- const remapped = await chunkJPO5C5QG_cjs.remapQueryResponse(client, qd.output, event.value, definitions);
32
+ const remapped = await chunk4AXGB5BH_cjs.remapQueryResponse(client, qd.output, event.value, definitions);
33
33
  if (qd.output.type === "array" && Array.isArray(remapped)) {
34
34
  for (const item of remapped) {
35
35
  yield item;
@@ -41,5 +41,5 @@ async function* applyStreamingQuery(client, query, params) {
41
41
  }
42
42
 
43
43
  exports.applyStreamingQuery = applyStreamingQuery;
44
- //# sourceMappingURL=applyStreamingQuery-OFE276IY.cjs.map
45
- //# sourceMappingURL=applyStreamingQuery-OFE276IY.cjs.map
44
+ //# sourceMappingURL=applyStreamingQuery-AFZ3BULT.cjs.map
45
+ //# sourceMappingURL=applyStreamingQuery-AFZ3BULT.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.functions@2.87.0/node_modules/@osdk/foundry.functions/build/esm/v2/public/Query.js","../../src/queries/applyStreamingQuery.ts"],"names":["foundryPlatformFetch","addUserAgentHeader","remapQueryParams","getRequiredDefinitions","remapQueryResponse"],"mappings":";;;;;;;;AAgFA,IAAM,oBAAoB,CAAC,CAAA,EAAG,4CAAA,EAA8C,CAAA,IAAI,mBAAmB,CAAA;AA2B5F,SAAS,gBAAA,CAAiB,SAAS,IAAA,EAAM;AAC9C,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,iBAAA,EAAmB,GAAG,IAAI,CAAA;AAC/D;;;AC1FA,gBAAuB,mBAAA,CAAoB,MAAA,EAAQ,KAAA,EAAO,MAAA,EAAQ;AAChE,EAAA,MAAM,EAAA,GAAK,MAAM,MAAA,CAAO,gBAAA,CAAiB,kBAAA,CAAmB,KAAA,CAAM,OAAA,EAAS,KAAA,CAAM,cAAA,GAAiB,KAAA,CAAM,OAAA,GAAU,MAAS,CAAA;AAC3H,EAAA,IAAI,MAAA,CAAO,cAAc,IAAA,EAAM;AAC7B,IAAA,MAAM,OAAO,UAAA,EAAW;AAAA,EAC1B;AACA,EAAA,MAAM,QAAA,GAAW,MAAgB,gBAAA,CAAiBC,oCAAA,CAAmB,QAAQ,KAAK,CAAA,EAAG,MAAM,OAAA,EAAS;AAAA,IAClG,QAAA,EAAU,MAAM,MAAA,CAAO,WAAA;AAAA,IACvB,UAAA,EAAY,SAAS,MAAMC,kCAAA,CAAiB,QAAQ,MAAA,EAAQ,EAAA,CAAG,UAAU,CAAA,GAAI,EAAC;AAAA,IAC9E,OAAA,EAAS,KAAA,CAAM,cAAA,GAAiB,KAAA,CAAM,OAAA,GAAU,MAAA;AAAA,IAChD,QAAQ,MAAA,CAAO;AAAA,GACjB,EAAG;AAAA,IACD,eAAe,MAAA,CAAO,aAAA;AAAA,IACtB,OAAA,EAAS;AAAA,GACV,CAAA;AACD,EAAA,MAAM,WAAA,GAAc,MAAMC,wCAAA,CAAuB,EAAA,CAAG,QAAQ,MAAM,CAAA;AAClE,EAAA,WAAA,MAAiB,SAAS,QAAA,EAAU;AAClC,IAAA,IAAI,KAAA,CAAM,SAAS,MAAA,EAAQ;AAC3B,IAAA,MAAM,QAAA,GAAW,MAAMC,oCAAA,CAAmB,MAAA,EAAQ,GAAG,MAAA,EAAQ,KAAA,CAAM,OAAO,WAAW,CAAA;AACrF,IAAA,IAAI,GAAG,MAAA,CAAO,IAAA,KAAS,WAAW,KAAA,CAAM,OAAA,CAAQ,QAAQ,CAAA,EAAG;AACzD,MAAA,KAAA,MAAW,QAAQ,QAAA,EAAU;AAC3B,QAAA,MAAM,IAAA;AAAA,MACR;AAAA,IACF,CAAA,MAAO;AACL,MAAA,MAAM,QAAA;AAAA,IACR;AAAA,EACF;AACF","file":"applyStreamingQuery-OFE276IY.cjs","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/functions/queries/{0}\", 2];\n/**\n * Gets a specific query type with the given API name. By default, this returns the highest semantic\n * version of the query, excluding pre-release versions. To resolve the most recently published version\n * instead, including pre-release versions, set `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * @beta\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getByRid = [0, \"/v2/functions/queries/getByRid\", 2];\n/**\n * Gets a specific query type with the given RID. By default, this gets the latest version of the query.\n *\n * @beta\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/getByRid\n */\nexport function getByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRid, ...args);\n}\nconst _getByRidBatch = [1, \"/v2/functions/queries/getByRidBatch\", 3];\n/**\n * Gets a list of query types by RID in bulk. By default, this gets the latest version of each query.\n *\n * Queries are filtered from the response if they don't exist or the requesting token lacks the required\n * permissions.\n *\n * The maximum batch size for this endpoint is 100.\n *\n * @beta\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/getByRidBatch\n */\nexport function getByRidBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRidBatch, ...args);\n}\nconst _execute = [1, \"/v2/functions/queries/{0}/execute\", 7];\n/**\n * Executes a Query and returns the result as a single JSON object. By default, this executes\n * the highest semantic version of the query, excluding pre-release versions. To resolve the\n * most recently published version instead, including pre-release versions, set\n * `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * This endpoint executes global (non-ontology-scoped) query functions. For ontology-scoped\n * functions, use the equivalent endpoint under\n * `/v2/ontologies/{ontology}/queries/{queryApiName}/execute`. For streaming or incremental\n * result delivery, use `streamingExecute`.\n *\n * @beta\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...args);\n}\nconst _streamingExecute = [1, \"/v2/functions/queries/{0}/streamingExecute\", 7,, \"text/event-stream\"];\n/**\n * Executes a Query and returns results as a Server-Sent Events (`text/event-stream`) stream.\n * By default, this executes the highest semantic version of the query, excluding pre-release\n * versions. To resolve the most recently published version instead, including pre-release\n * versions, set `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * This endpoint supports all Query functions. Each SSE event's `data` field is a JSON-encoded\n * `StreamingExecuteQueryResponse` – either a data batch (`type: data`) carrying one or more\n * result values, or an error (`type: error`) emitted before stream termination if execution\n * fails. Non-streaming functions emit a single data event containing the entire result;\n * streaming functions emit a data event per batch as results become available.\n *\n * Per the Server-Sent Events specification, each event is terminated by a blank line:\n *\n * ```\n * data: {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-001\",\"price\":29.99}]}\n *\n * data: {\"type\":\"error\",\"errorCode\":\"INVALID_ARGUMENT\",\"errorName\":\"QueryRuntimeError\",\"errorInstanceId\":\"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c\",\"errorDescription\":\"Division by zero\",\"parameters\":{}}\n *\n * ```\n *\n * @beta\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/streamingExecute\n */\nexport function streamingExecute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingExecute, ...args);\n}\nconst _streamingExecuteEvents = [1, \"/v2/functions/queries/{0}/streamingExecuteEvents\", 7,, \"text/event-stream\"];\n/**\n * Executes a Query and returns results as a Server-Sent Events (`text/event-stream`) stream.\n * By default, this executes the highest semantic version of the query, excluding pre-release\n * versions. To resolve the most recently published version instead, including pre-release\n * versions, set `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * This endpoint supports all Query functions. Each SSE event's `data` field is a JSON-encoded\n * `StreamingExecuteQueryResponse` – either a data batch (`type: data`) carrying one or more\n * result values, or an error (`type: error`) emitted before stream termination if execution\n * fails. Non-streaming functions emit a single data event containing the entire result;\n * streaming functions emit a data event per batch as results become available.\n *\n * Per the Server-Sent Events specification, each event is terminated by a blank line:\n *\n * ```\n * data: {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-001\",\"price\":29.99}]}\n *\n * data: {\"type\":\"error\",\"errorCode\":\"INVALID_ARGUMENT\",\"errorName\":\"QueryRuntimeError\",\"errorInstanceId\":\"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c\",\"errorDescription\":\"Division by zero\",\"parameters\":{}}\n *\n * ```\n *\n * @alpha\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/streamingExecuteEvents\n */\nexport function streamingExecuteEvents($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingExecuteEvents, ...args);\n}\nconst _executeAsync = [1, \"/v2/functions/queries/{0}/executeAsync\", 7];\n/**\n * Submits a Query for asynchronous execution. Returns either an execution ID\n * for polling, or the complete result if execution finished immediately.\n *\n * Use the Execution resource's getResult endpoint to poll for the\n * result of a submitted execution.\n *\n * Supports maps represented as arrays of key/value entries, including nested maps.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/executeAsync\n */\nexport function executeAsync($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _executeAsync, ...args);\n}","/*\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 */\n\nimport * as Functions from \"@osdk/foundry.functions/Query\";\nimport { addUserAgentHeader } from \"../util/addUserAgentHeader.js\";\nimport { getRequiredDefinitions, remapQueryParams, remapQueryResponse } from \"./applyQuery.js\";\nexport async function* applyStreamingQuery(client, query, params) {\n const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : undefined);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const response = await Functions.streamingExecute(addUserAgentHeader(client, query), query.apiName, {\n ontology: await client.ontologyRid,\n parameters: params ? await remapQueryParams(params, client, qd.parameters) : {},\n version: query.isFixedVersion ? query.version : undefined,\n branch: client.branch\n }, {\n transactionId: client.transactionId,\n preview: true\n });\n const definitions = await getRequiredDefinitions(qd.output, client);\n for await (const event of response) {\n if (event.type !== \"data\") continue;\n const remapped = await remapQueryResponse(client, qd.output, event.value, definitions);\n if (qd.output.type === \"array\" && Array.isArray(remapped)) {\n for (const item of remapped) {\n yield item;\n }\n } else {\n yield remapped;\n }\n }\n}"]}
1
+ {"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.functions@2.87.0/node_modules/@osdk/foundry.functions/build/esm/v2/public/Query.js","../../src/queries/applyStreamingQuery.ts"],"names":["foundryPlatformFetch","addUserAgentHeader","remapQueryParams","getRequiredDefinitions","remapQueryResponse"],"mappings":";;;;;;;;AAgFA,IAAM,oBAAoB,CAAC,CAAA,EAAG,4CAAA,EAA8C,CAAA,IAAI,mBAAmB,CAAA;AA2B5F,SAAS,gBAAA,CAAiB,SAAS,IAAA,EAAM;AAC9C,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,iBAAA,EAAmB,GAAG,IAAI,CAAA;AAC/D;;;AC1FA,gBAAuB,mBAAA,CAAoB,MAAA,EAAQ,KAAA,EAAO,MAAA,EAAQ;AAChE,EAAA,MAAM,EAAA,GAAK,MAAM,MAAA,CAAO,gBAAA,CAAiB,kBAAA,CAAmB,KAAA,CAAM,OAAA,EAAS,KAAA,CAAM,cAAA,GAAiB,KAAA,CAAM,OAAA,GAAU,MAAS,CAAA;AAC3H,EAAA,IAAI,MAAA,CAAO,cAAc,IAAA,EAAM;AAC7B,IAAA,MAAM,OAAO,UAAA,EAAW;AAAA,EAC1B;AACA,EAAA,MAAM,QAAA,GAAW,MAAgB,gBAAA,CAAiBC,oCAAA,CAAmB,QAAQ,KAAK,CAAA,EAAG,MAAM,OAAA,EAAS;AAAA,IAClG,QAAA,EAAU,MAAM,MAAA,CAAO,WAAA;AAAA,IACvB,UAAA,EAAY,SAAS,MAAMC,kCAAA,CAAiB,QAAQ,MAAA,EAAQ,EAAA,CAAG,UAAU,CAAA,GAAI,EAAC;AAAA,IAC9E,OAAA,EAAS,KAAA,CAAM,cAAA,GAAiB,KAAA,CAAM,OAAA,GAAU,MAAA;AAAA,IAChD,QAAQ,MAAA,CAAO;AAAA,GACjB,EAAG;AAAA,IACD,eAAe,MAAA,CAAO,aAAA;AAAA,IACtB,OAAA,EAAS;AAAA,GACV,CAAA;AACD,EAAA,MAAM,WAAA,GAAc,MAAMC,wCAAA,CAAuB,EAAA,CAAG,QAAQ,MAAM,CAAA;AAClE,EAAA,WAAA,MAAiB,SAAS,QAAA,EAAU;AAClC,IAAA,IAAI,KAAA,CAAM,SAAS,MAAA,EAAQ;AAC3B,IAAA,MAAM,QAAA,GAAW,MAAMC,oCAAA,CAAmB,MAAA,EAAQ,GAAG,MAAA,EAAQ,KAAA,CAAM,OAAO,WAAW,CAAA;AACrF,IAAA,IAAI,GAAG,MAAA,CAAO,IAAA,KAAS,WAAW,KAAA,CAAM,OAAA,CAAQ,QAAQ,CAAA,EAAG;AACzD,MAAA,KAAA,MAAW,QAAQ,QAAA,EAAU;AAC3B,QAAA,MAAM,IAAA;AAAA,MACR;AAAA,IACF,CAAA,MAAO;AACL,MAAA,MAAM,QAAA;AAAA,IACR;AAAA,EACF;AACF","file":"applyStreamingQuery-AFZ3BULT.cjs","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/functions/queries/{0}\", 2];\n/**\n * Gets a specific query type with the given API name. By default, this returns the highest semantic\n * version of the query, excluding pre-release versions. To resolve the most recently published version\n * instead, including pre-release versions, set `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * @beta\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getByRid = [0, \"/v2/functions/queries/getByRid\", 2];\n/**\n * Gets a specific query type with the given RID. By default, this gets the latest version of the query.\n *\n * @beta\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/getByRid\n */\nexport function getByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRid, ...args);\n}\nconst _getByRidBatch = [1, \"/v2/functions/queries/getByRidBatch\", 3];\n/**\n * Gets a list of query types by RID in bulk. By default, this gets the latest version of each query.\n *\n * Queries are filtered from the response if they don't exist or the requesting token lacks the required\n * permissions.\n *\n * The maximum batch size for this endpoint is 100.\n *\n * @beta\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/getByRidBatch\n */\nexport function getByRidBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRidBatch, ...args);\n}\nconst _execute = [1, \"/v2/functions/queries/{0}/execute\", 7];\n/**\n * Executes a Query and returns the result as a single JSON object. By default, this executes\n * the highest semantic version of the query, excluding pre-release versions. To resolve the\n * most recently published version instead, including pre-release versions, set\n * `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * This endpoint executes global (non-ontology-scoped) query functions. For ontology-scoped\n * functions, use the equivalent endpoint under\n * `/v2/ontologies/{ontology}/queries/{queryApiName}/execute`. For streaming or incremental\n * result delivery, use `streamingExecute`.\n *\n * @beta\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...args);\n}\nconst _streamingExecute = [1, \"/v2/functions/queries/{0}/streamingExecute\", 7,, \"text/event-stream\"];\n/**\n * Executes a Query and returns results as a Server-Sent Events (`text/event-stream`) stream.\n * By default, this executes the highest semantic version of the query, excluding pre-release\n * versions. To resolve the most recently published version instead, including pre-release\n * versions, set `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * This endpoint supports all Query functions. Each SSE event's `data` field is a JSON-encoded\n * `StreamingExecuteQueryResponse` – either a data batch (`type: data`) carrying one or more\n * result values, or an error (`type: error`) emitted before stream termination if execution\n * fails. Non-streaming functions emit a single data event containing the entire result;\n * streaming functions emit a data event per batch as results become available.\n *\n * Per the Server-Sent Events specification, each event is terminated by a blank line:\n *\n * ```\n * data: {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-001\",\"price\":29.99}]}\n *\n * data: {\"type\":\"error\",\"errorCode\":\"INVALID_ARGUMENT\",\"errorName\":\"QueryRuntimeError\",\"errorInstanceId\":\"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c\",\"errorDescription\":\"Division by zero\",\"parameters\":{}}\n *\n * ```\n *\n * @beta\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/streamingExecute\n */\nexport function streamingExecute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingExecute, ...args);\n}\nconst _streamingExecuteEvents = [1, \"/v2/functions/queries/{0}/streamingExecuteEvents\", 7,, \"text/event-stream\"];\n/**\n * Executes a Query and returns results as a Server-Sent Events (`text/event-stream`) stream.\n * By default, this executes the highest semantic version of the query, excluding pre-release\n * versions. To resolve the most recently published version instead, including pre-release\n * versions, set `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * This endpoint supports all Query functions. Each SSE event's `data` field is a JSON-encoded\n * `StreamingExecuteQueryResponse` – either a data batch (`type: data`) carrying one or more\n * result values, or an error (`type: error`) emitted before stream termination if execution\n * fails. Non-streaming functions emit a single data event containing the entire result;\n * streaming functions emit a data event per batch as results become available.\n *\n * Per the Server-Sent Events specification, each event is terminated by a blank line:\n *\n * ```\n * data: {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-001\",\"price\":29.99}]}\n *\n * data: {\"type\":\"error\",\"errorCode\":\"INVALID_ARGUMENT\",\"errorName\":\"QueryRuntimeError\",\"errorInstanceId\":\"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c\",\"errorDescription\":\"Division by zero\",\"parameters\":{}}\n *\n * ```\n *\n * @alpha\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/streamingExecuteEvents\n */\nexport function streamingExecuteEvents($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingExecuteEvents, ...args);\n}\nconst _executeAsync = [1, \"/v2/functions/queries/{0}/executeAsync\", 7];\n/**\n * Submits a Query for asynchronous execution. Returns either an execution ID\n * for polling, or the complete result if execution finished immediately.\n *\n * Use the Execution resource's getResult endpoint to poll for the\n * result of a submitted execution.\n *\n * Supports maps represented as arrays of key/value entries, including nested maps.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/executeAsync\n */\nexport function executeAsync($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _executeAsync, ...args);\n}","/*\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 */\n\nimport * as Functions from \"@osdk/foundry.functions/Query\";\nimport { addUserAgentHeader } from \"../util/addUserAgentHeader.js\";\nimport { getRequiredDefinitions, remapQueryParams, remapQueryResponse } from \"./applyQuery.js\";\nexport async function* applyStreamingQuery(client, query, params) {\n const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : undefined);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const response = await Functions.streamingExecute(addUserAgentHeader(client, query), query.apiName, {\n ontology: await client.ontologyRid,\n parameters: params ? await remapQueryParams(params, client, qd.parameters) : {},\n version: query.isFixedVersion ? query.version : undefined,\n branch: client.branch\n }, {\n transactionId: client.transactionId,\n preview: true\n });\n const definitions = await getRequiredDefinitions(qd.output, client);\n for await (const event of response) {\n if (event.type !== \"data\") continue;\n const remapped = await remapQueryResponse(client, qd.output, event.value, definitions);\n if (qd.output.type === \"array\" && Array.isArray(remapped)) {\n for (const item of remapped) {\n yield item;\n }\n } else {\n yield remapped;\n }\n }\n}"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkFRZNF77P_cjs = require('./chunk-FRZNF77P.cjs');
3
+ var chunk5CRO5V7A_cjs = require('./chunk-5CRO5V7A.cjs');
4
4
 
5
5
  // src/logger/BaseLogger.ts
6
6
  function noop() {
@@ -71,8 +71,8 @@ var MinimalLogger = class _MinimalLogger extends BaseLogger {
71
71
 
72
72
  // src/objectSet/createTemporaryObjectSet.ts
73
73
  async function createTemporaryObjectSet(client, objectSet) {
74
- const response = await chunkFRZNF77P_cjs.createTemporary(client, await client.ontologyRid, {
75
- objectSet: await chunkFRZNF77P_cjs.normalizeInterfaceLinkSearchArounds(client, chunkFRZNF77P_cjs.isWireObjectSet(objectSet) ? objectSet : chunkFRZNF77P_cjs.getWireObjectSet(objectSet))
74
+ const response = await chunk5CRO5V7A_cjs.createTemporary(client, await client.ontologyRid, {
75
+ objectSet: await chunk5CRO5V7A_cjs.normalizeInterfaceLinkSearchArounds(client, chunk5CRO5V7A_cjs.isWireObjectSet(objectSet) ? objectSet : chunk5CRO5V7A_cjs.getWireObjectSet(objectSet))
76
76
  }, {
77
77
  branch: client.branch
78
78
  });
@@ -82,5 +82,5 @@ async function createTemporaryObjectSet(client, objectSet) {
82
82
  exports.BaseLogger = BaseLogger;
83
83
  exports.MinimalLogger = MinimalLogger;
84
84
  exports.createTemporaryObjectSet = createTemporaryObjectSet;
85
- //# sourceMappingURL=chunk-HL7TDBEU.cjs.map
86
- //# sourceMappingURL=chunk-HL7TDBEU.cjs.map
85
+ //# sourceMappingURL=chunk-2ND2USKP.cjs.map
86
+ //# sourceMappingURL=chunk-2ND2USKP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/logger/BaseLogger.ts","../../src/logger/MinimalLogger.ts","../../src/objectSet/createTemporaryObjectSet.ts"],"names":["createTemporary","normalizeInterfaceLinkSearchArounds","isWireObjectSet","getWireObjectSet"],"mappings":";;;;;AAgBO,SAAS,IAAA,GAAO;AAAC;AACxB,IAAM,MAAA,GAAS;AAAA,EACb,KAAA,EAAO,EAAA;AAAA,EACP,KAAA,EAAO,EAAA;AAAA,EACP,IAAA,EAAM,EAAA;AAAA,EACN,IAAA,EAAM,EAAA;AAAA,EACN,KAAA,EAAO,EAAA;AAAA,EACP,KAAA,EAAO;AACT,CAAA;AACO,IAAM,aAAN,MAAiB;AAAA,EACtB,QAAA;AAAA,EACA,WAAA,CAAY,QAAA,EAAU,OAAA,EAAS,OAAA,EAAS;AACtC,IAAA,IAAA,CAAK,QAAA,GAAW,QAAA;AAChB,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AACf,IAAA,IAAA,CAAK,QAAA,GAAW,OAAA;AAChB,IAAA,KAAA,MAAW,CAAA,IAAK,CAAC,OAAA,EAAS,OAAA,EAAS,QAAQ,MAAA,EAAQ,OAAA,EAAS,OAAO,CAAA,EAAG;AACpE,MAAA,IAAI,KAAK,OAAA,EAAS,KAAA,IAAS,CAAC,IAAA,CAAK,cAAA,CAAe,CAAC,CAAA,EAAG;AAClD,QAAA;AAAA,MACF;AACA,MAAA,IAAA,CAAK,CAAC,CAAA,GAAI,IAAA,CAAK,eAAA,CAAgB,GAAG,QAAQ,CAAA;AAAA,IAC5C;AAAA,EACF;AAAA,EACA,KAAA,GAAQ,IAAA;AAAA,EACR,KAAA,GAAQ,IAAA;AAAA,EACR,IAAA,GAAO,IAAA;AAAA,EACP,IAAA,GAAO,IAAA;AAAA,EACP,KAAA,GAAQ,IAAA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C5D,MAAA,IAAA,CAAK,IAAA,CAAK,CAAA,CAAA,EAAI,QAAA,CAAS,UAAU,CAAA,EAAA,CAAI,CAAA;AAAA,IACvC;AACA,IAAA,OAAO,IAAI,IAAA,KAAS;AAElB,MAAA,OAAA,CAAQ,IAAA,KAAS,OAAA,GAAU,OAAA,GAAU,IAAI,CAAA,CAAE,KAAK,IAAA,CAAK,GAAG,CAAA,EAAG,GAAG,IAAI,CAAA;AAAA,IACpE,CAAA;AAAA,EACF;AACF;;;ACjBA,eAAsB,wBAAA,CAAyB,QAAQ,SAAA,EAAW;AAChE,EAAA,MAAM,WAAW,MAAyBA,iCAAA,CAAgB,MAAA,EAAQ,MAAM,OAAO,WAAA,EAAa;AAAA,IAC1F,SAAA,EAAW,MAAMC,qDAAA,CAAoC,MAAA,EAAQC,iCAAA,CAAgB,SAAS,CAAA,GAAI,SAAA,GAAYC,kCAAA,CAAiB,SAAS,CAAC;AAAA,GACnI,EAAG;AAAA,IACD,QAAQ,MAAA,CAAO;AAAA,GAChB,CAAA;AACD,EAAA,OAAO,QAAA,CAAS,YAAA;AAClB","file":"chunk-HL7TDBEU.cjs","sourcesContent":["/*\n * Copyright 2025 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 */\n\nexport function noop() {}\nconst levels = {\n trace: 10,\n debug: 20,\n info: 30,\n warn: 40,\n error: 50,\n fatal: 60\n};\nexport class BaseLogger {\n #factory;\n constructor(bindings, options, factory) {\n this.bindings = bindings;\n this.options = options;\n this.#factory = factory;\n for (const k of [\"trace\", \"debug\", \"info\", \"warn\", \"error\", \"fatal\"]) {\n if (this.options?.level && !this.isLevelEnabled(k)) {\n continue;\n }\n this[k] = this.createLogMethod(k, bindings);\n }\n }\n trace = noop;\n debug = noop;\n warn = noop;\n info = noop;\n error = noop;\n fatal = noop;\n child(bindings, options) {\n return new this.#factory({\n ...this.bindings,\n ...bindings\n }, {\n level: options?.level ?? this.options?.level,\n msgPrefix: [this.options?.msgPrefix, options?.msgPrefix].filter(x => x).join(\" \")\n });\n }\n isLevelEnabled(level) {\n const ourLevel = this.options?.level ?? \"info\";\n return level in levels && ourLevel in levels && levels[level] >= levels[ourLevel];\n }\n}","/*\n * Copyright 2025 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 */\n\nimport { BaseLogger } from \"./BaseLogger.js\";\nexport class MinimalLogger extends BaseLogger {\n constructor(bindings = {}, options = {}) {\n super(bindings, {\n ...options,\n level: options.level ?? \"error\"\n }, MinimalLogger);\n }\n createLogMethod(name, bindings) {\n const msgs = [name];\n if (this.options?.msgPrefix) {\n msgs.push(this.options.msgPrefix);\n }\n if (typeof bindings === \"object\" && \"methodName\" in bindings) {\n msgs.push(`.${bindings.methodName}()`);\n }\n return (...args) => {\n // eslint-disable-next-line no-console\n console[name === \"fatal\" ? \"error\" : name](msgs.join(\" \"), ...args);\n };\n }\n}","/*\n * Copyright 2026 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 */\n\nimport * as OntologyObjectSets from \"@osdk/foundry.ontologies/OntologyObjectSet\";\nimport { normalizeInterfaceLinkSearchArounds } from \"../util/normalizeInterfaceLinkSearchArounds.js\";\nimport { isWireObjectSet } from \"../util/WireObjectSet.js\";\nimport { getWireObjectSet } from \"./createObjectSet.js\";\nexport async function createTemporaryObjectSet(client, objectSet) {\n const response = await OntologyObjectSets.createTemporary(client, await client.ontologyRid, {\n objectSet: await normalizeInterfaceLinkSearchArounds(client, isWireObjectSet(objectSet) ? objectSet : getWireObjectSet(objectSet))\n }, {\n branch: client.branch\n });\n return response.objectSetRid;\n}"]}
1
+ {"version":3,"sources":["../../src/logger/BaseLogger.ts","../../src/logger/MinimalLogger.ts","../../src/objectSet/createTemporaryObjectSet.ts"],"names":["createTemporary","normalizeInterfaceLinkSearchArounds","isWireObjectSet","getWireObjectSet"],"mappings":";;;;;AAgBO,SAAS,IAAA,GAAO;AAAC;AACxB,IAAM,MAAA,GAAS;AAAA,EACb,KAAA,EAAO,EAAA;AAAA,EACP,KAAA,EAAO,EAAA;AAAA,EACP,IAAA,EAAM,EAAA;AAAA,EACN,IAAA,EAAM,EAAA;AAAA,EACN,KAAA,EAAO,EAAA;AAAA,EACP,KAAA,EAAO;AACT,CAAA;AACO,IAAM,aAAN,MAAiB;AAAA,EACtB,QAAA;AAAA,EACA,WAAA,CAAY,QAAA,EAAU,OAAA,EAAS,OAAA,EAAS;AACtC,IAAA,IAAA,CAAK,QAAA,GAAW,QAAA;AAChB,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AACf,IAAA,IAAA,CAAK,QAAA,GAAW,OAAA;AAChB,IAAA,KAAA,MAAW,CAAA,IAAK,CAAC,OAAA,EAAS,OAAA,EAAS,QAAQ,MAAA,EAAQ,OAAA,EAAS,OAAO,CAAA,EAAG;AACpE,MAAA,IAAI,KAA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AQ,KAAA,IAAS;AAAA,OACvB,cAAa,CAAA;AAAA,EAClB;AAAA,EACA,eAAA,CAAgB,MAAM,QAAA,EAAU;AAC9B,IAAA,MAAM,IAAA,GAAO,CAAC,IAAI,CAAA;AAClB,IAAA,IAAI,IAAA,CAAK,SAAS,SAAA,EAAW;AAC3B,MAAA,IAAA,CAAK,IAAA,CAAK,IAAA,CAAK,OAAA,CAAQ,SAAS,CAAA;AAAA,IAClC;AACA,IAAA,IAAI,OAAO,QAAA,KAAa,QAAA,IAAY,YAAA,IAAgB,QAAA,EAAU;AAC5D,MAAA,IAAA,CAAK,IAAA,CAAK,CAAA,CAAA,EAAI,QAAA,CAAS,UAAU,CAAA,EAAA,CAAI,CAAA;AAAA,IACvC;AACA,IAAA,OAAO,IAAI,IAAA,KAAS;AAElB,MAAA,OAAA,CAAQ,IAAA,KAAS,OAAA,GAAU,OAAA,GAAU,IAAI,CAAA,CAAE,KAAK,IAAA,CAAK,GAAG,CAAA,EAAG,GAAG,IAAI,CAAA;AAAA,IACpE,CAAA;AAAA,EACF;AACF;;;ACjBA,eAAsB,wBAAA,CAAyB,QAAQ,SAAA,EAAW;AAChE,EAAA,MAAM,WAAW,MAAyBA,iCAAA,CAAgB,MAAA,EAAQ,MAAM,OAAO,WAAA,EAAa;AAAA,IAC1F,SAAA,EAAW,MAAMC,qDAAA,CAAoC,MAAA,EAAQC,iCAAA,CAAgB,SAAS,CAAA,GAAI,SAAA,GAAYC,kCAAA,CAAiB,SAAS,CAAC;AAAA,GACnI,EAAG;AAAA,IACD,QAAQ,MAAA,CAAO;AAAA,GAChB,CAAA;AACD,EAAA,OAAO,QAAA,CAAS,YAAA;AAClB","file":"chunk-2ND2USKP.cjs","sourcesContent":["/*\n * Copyright 2025 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 */\n\nexport function noop() {}\nconst levels = {\n trace: 10,\n debug: 20,\n info: 30,\n warn: 40,\n error: 50,\n fatal: 60\n};\nexport class BaseLogger {\n #factory;\n constructor(bindings, options, factory) {\n this.bindings = bindings;\n this.options = options;\n this.#factory = factory;\n for (const k of [\"trace\", \"debug\", \"info\", \"warn\", \"error\", \"fatal\"]) {\n if (this.options?.level && !this.isLevelEnabled(k)) {\n continue;\n }\n this[k] = this.createLogMethod(k, bindings);\n }\n }\n trace = noop;\n debug = noop;\n warn = noop;\n info = noop;\n error = noop;\n fatal = noop;\n child(bindings, options) {\n return new this.#factory({\n ...this.bindings,\n ...bindings\n }, {\n level: options?.level ?? this.options?.level,\n msgPrefix: [this.options?.msgPrefix, options?.msgPrefix].filter(x => x).join(\" \")\n });\n }\n isLevelEnabled(level) {\n const ourLevel = this.options?.level ?? \"info\";\n return level in levels && ourLevel in levels && levels[level] >= levels[ourLevel];\n }\n}","/*\n * Copyright 2025 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 */\n\nimport { BaseLogger } from \"./BaseLogger.js\";\nexport class MinimalLogger extends BaseLogger {\n constructor(bindings = {}, options = {}) {\n super(bindings, {\n ...options,\n level: options.level ?? \"error\"\n }, MinimalLogger);\n }\n createLogMethod(name, bindings) {\n const msgs = [name];\n if (this.options?.msgPrefix) {\n msgs.push(this.options.msgPrefix);\n }\n if (typeof bindings === \"object\" && \"methodName\" in bindings) {\n msgs.push(`.${bindings.methodName}()`);\n }\n return (...args) => {\n // eslint-disable-next-line no-console\n console[name === \"fatal\" ? \"error\" : name](msgs.join(\" \"), ...args);\n };\n }\n}","/*\n * Copyright 2026 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 */\n\nimport * as OntologyObjectSets from \"@osdk/foundry.ontologies/OntologyObjectSet\";\nimport { normalizeInterfaceLinkSearchArounds } from \"../util/normalizeInterfaceLinkSearchArounds.js\";\nimport { isWireObjectSet } from \"../util/WireObjectSet.js\";\nimport { getWireObjectSet } from \"./createObjectSet.js\";\nexport async function createTemporaryObjectSet(client, objectSet) {\n const response = await OntologyObjectSets.createTemporary(client, await client.ontologyRid, {\n objectSet: await normalizeInterfaceLinkSearchArounds(client, isWireObjectSet(objectSet) ? objectSet : getWireObjectSet(objectSet))\n }, {\n branch: client.branch\n });\n return response.objectSetRid;\n}"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkFRZNF77P_cjs = require('./chunk-FRZNF77P.cjs');
3
+ var chunk5CRO5V7A_cjs = require('./chunk-5CRO5V7A.cjs');
4
4
  var chunkB4UCZI2Z_cjs = require('./chunk-B4UCZI2Z.cjs');
5
5
  var invariant = require('tiny-invariant');
6
6
 
@@ -89,13 +89,13 @@ async function toDataValueQueries(value, client, desiredType) {
89
89
  switch (desiredType.type) {
90
90
  case "attachment": {
91
91
  if (isAttachmentUpload(value)) {
92
- const attachment = await chunkFRZNF77P_cjs.upload(client, value.data, {
92
+ const attachment = await chunk5CRO5V7A_cjs.upload(client, value.data, {
93
93
  filename: value.name
94
94
  });
95
95
  return attachment.rid;
96
96
  }
97
97
  if (isAttachmentFile(value)) {
98
- const attachment = await chunkFRZNF77P_cjs.upload(client, value, {
98
+ const attachment = await chunk5CRO5V7A_cjs.upload(client, value, {
99
99
  filename: value.name
100
100
  });
101
101
  return attachment.rid;
@@ -150,11 +150,11 @@ async function toDataValueQueries(value, client, desiredType) {
150
150
  }
151
151
  case "objectSet":
152
152
  case "interfaceObjectSet": {
153
- if (chunkFRZNF77P_cjs.isWireObjectSet(value)) {
154
- return chunkFRZNF77P_cjs.normalizeInterfaceLinkSearchArounds(client, value);
153
+ if (chunk5CRO5V7A_cjs.isWireObjectSet(value)) {
154
+ return chunk5CRO5V7A_cjs.normalizeInterfaceLinkSearchArounds(client, value);
155
155
  }
156
- if (chunkFRZNF77P_cjs.isObjectSet(value)) {
157
- return chunkFRZNF77P_cjs.normalizeInterfaceLinkSearchArounds(client, chunkFRZNF77P_cjs.getWireObjectSet(value));
156
+ if (chunk5CRO5V7A_cjs.isObjectSet(value)) {
157
+ return chunk5CRO5V7A_cjs.normalizeInterfaceLinkSearchArounds(client, chunk5CRO5V7A_cjs.getWireObjectSet(value));
158
158
  }
159
159
  break;
160
160
  }
@@ -199,7 +199,7 @@ async function applyQuery(client, query, params) {
199
199
  if (client.flushEdits != null) {
200
200
  await client.flushEdits();
201
201
  }
202
- const response = await execute(chunkFRZNF77P_cjs.addUserAgentHeader(client, query), await client.ontologyRid, query.apiName, {
202
+ const response = await execute(chunk5CRO5V7A_cjs.addUserAgentHeader(client, query), await client.ontologyRid, query.apiName, {
203
203
  parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
204
204
  }, {
205
205
  version: query.isFixedVersion ? query.version : void 0,
@@ -243,10 +243,10 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
243
243
  return responseValue;
244
244
  }
245
245
  case "attachment": {
246
- return chunkFRZNF77P_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
246
+ return chunk5CRO5V7A_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
247
247
  }
248
248
  case "mediaReference": {
249
- return chunkFRZNF77P_cjs.createMediaFromReferenceInternal(client, responseValue);
249
+ return chunk5CRO5V7A_cjs.createMediaFromReferenceInternal(client, responseValue);
250
250
  }
251
251
  case "object": {
252
252
  const def = definitions.get(responseDataType.object);
@@ -268,7 +268,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
268
268
  throw new Error(`Missing definition for ${responseDataType.objectSet}`);
269
269
  }
270
270
  if (typeof responseValue === "string") {
271
- return chunkFRZNF77P_cjs.createObjectSet(def, client, {
271
+ return chunk5CRO5V7A_cjs.createObjectSet(def, client, {
272
272
  type: "intersect",
273
273
  objectSets: [{
274
274
  type: "base",
@@ -279,7 +279,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
279
279
  }]
280
280
  });
281
281
  }
282
- return chunkFRZNF77P_cjs.createObjectSet(def, client, responseValue);
282
+ return chunk5CRO5V7A_cjs.createObjectSet(def, client, responseValue);
283
283
  }
284
284
  case "struct": {
285
285
  for (const [key, subtype] of Object.entries(responseDataType.struct)) {
@@ -462,5 +462,5 @@ exports.isMediaUpload = isMediaUpload;
462
462
  exports.isObjectSpecifiersObject = isObjectSpecifiersObject;
463
463
  exports.remapQueryParams = remapQueryParams;
464
464
  exports.remapQueryResponse = remapQueryResponse;
465
- //# sourceMappingURL=chunk-JPO5C5QG.cjs.map
466
- //# sourceMappingURL=chunk-JPO5C5QG.cjs.map
465
+ //# sourceMappingURL=chunk-4AXGB5BH.cjs.map
466
+ //# sourceMappingURL=chunk-4AXGB5BH.cjs.map