@osdk/integration-testing 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/bin/postinstall.mjs +15 -0
  3. package/build/browser/cli-service/CliServiceLauncher.js +220 -0
  4. package/build/browser/cli-service/CliServiceLauncher.js.map +1 -0
  5. package/build/browser/cli-service/FoundryCliService.js +168 -0
  6. package/build/browser/cli-service/FoundryCliService.js.map +1 -0
  7. package/build/browser/cli-service/OntologyServer.js +32 -0
  8. package/build/browser/cli-service/OntologyServer.js.map +1 -0
  9. package/build/browser/cli-service/ServiceDiscoverer.js +100 -0
  10. package/build/browser/cli-service/ServiceDiscoverer.js.map +1 -0
  11. package/build/browser/cli-service/StatusServer.js +91 -0
  12. package/build/browser/cli-service/StatusServer.js.map +1 -0
  13. package/build/browser/createIntegrationClient.js +67 -0
  14. package/build/browser/createIntegrationClient.js.map +1 -0
  15. package/build/browser/createIntegrationServer.js +115 -0
  16. package/build/browser/createIntegrationServer.js.map +1 -0
  17. package/build/browser/createSeedClient.js +77 -0
  18. package/build/browser/createSeedClient.js.map +1 -0
  19. package/build/browser/generated/cli/OntologySeedingService/setSeed.js +28 -0
  20. package/build/browser/generated/cli/OntologySeedingService/setSeed.js.map +1 -0
  21. package/build/browser/generated/cli/OntologySeedingService.js +19 -0
  22. package/build/browser/generated/cli/OntologySeedingService.js.map +1 -0
  23. package/build/browser/generated/cli/StatusService/getStatus.js +25 -0
  24. package/build/browser/generated/cli/StatusService/getStatus.js.map +1 -0
  25. package/build/browser/generated/cli/StatusService/publishStatus.js +26 -0
  26. package/build/browser/generated/cli/StatusService/publishStatus.js.map +1 -0
  27. package/build/browser/generated/cli/StatusService.js +20 -0
  28. package/build/browser/generated/cli/StatusService.js.map +1 -0
  29. package/build/browser/generated/cli/__components.js +2 -0
  30. package/build/browser/generated/cli/__components.js.map +1 -0
  31. package/build/browser/generated/cli/index.js +20 -0
  32. package/build/browser/generated/cli/index.js.map +1 -0
  33. package/build/browser/index.js +27 -0
  34. package/build/browser/index.js.map +1 -0
  35. package/build/browser/scripts/download.js +92 -0
  36. package/build/browser/scripts/download.js.map +1 -0
  37. package/build/browser/scripts/foundry-host.js +59 -0
  38. package/build/browser/scripts/foundry-host.js.map +1 -0
  39. package/build/browser/scripts/foundry-token.js +50 -0
  40. package/build/browser/scripts/foundry-token.js.map +1 -0
  41. package/build/browser/scripts/gitRemote.js +39 -0
  42. package/build/browser/scripts/gitRemote.js.map +1 -0
  43. package/build/browser/scripts/postinstall.js +38 -0
  44. package/build/browser/scripts/postinstall.js.map +1 -0
  45. package/build/browser/test/NoSpawnStatusServer.js +33 -0
  46. package/build/browser/test/NoSpawnStatusServer.js.map +1 -0
  47. package/build/browser/test/StubService.js +61 -0
  48. package/build/browser/test/StubService.js.map +1 -0
  49. package/build/browser/test/emptyOntologyMetadata.js +32 -0
  50. package/build/browser/test/emptyOntologyMetadata.js.map +1 -0
  51. package/build/browser/test/stubStatusServer.js +74 -0
  52. package/build/browser/test/stubStatusServer.js.map +1 -0
  53. package/build/browser/test/writeDiscoveryFile.js +39 -0
  54. package/build/browser/test/writeDiscoveryFile.js.map +1 -0
  55. package/build/browser/types.js +2 -0
  56. package/build/browser/types.js.map +1 -0
  57. package/build/browser/utils/empty-ontology-block.js +61 -0
  58. package/build/browser/utils/empty-ontology-block.js.map +1 -0
  59. package/build/browser/utils/foundry-cli.js +46 -0
  60. package/build/browser/utils/foundry-cli.js.map +1 -0
  61. package/build/browser/utils/process.js +26 -0
  62. package/build/browser/utils/process.js.map +1 -0
  63. package/build/browser/utils/service.js +33 -0
  64. package/build/browser/utils/service.js.map +1 -0
  65. package/build/cjs/index.cjs +841 -0
  66. package/build/cjs/index.cjs.map +1 -0
  67. package/build/cjs/index.d.cts +118 -0
  68. package/build/esm/cli-service/CliServiceLauncher.js +220 -0
  69. package/build/esm/cli-service/CliServiceLauncher.js.map +1 -0
  70. package/build/esm/cli-service/FoundryCliService.js +168 -0
  71. package/build/esm/cli-service/FoundryCliService.js.map +1 -0
  72. package/build/esm/cli-service/OntologyServer.js +32 -0
  73. package/build/esm/cli-service/OntologyServer.js.map +1 -0
  74. package/build/esm/cli-service/ServiceDiscoverer.js +100 -0
  75. package/build/esm/cli-service/ServiceDiscoverer.js.map +1 -0
  76. package/build/esm/cli-service/StatusServer.js +91 -0
  77. package/build/esm/cli-service/StatusServer.js.map +1 -0
  78. package/build/esm/createIntegrationClient.js +67 -0
  79. package/build/esm/createIntegrationClient.js.map +1 -0
  80. package/build/esm/createIntegrationServer.js +115 -0
  81. package/build/esm/createIntegrationServer.js.map +1 -0
  82. package/build/esm/createSeedClient.js +77 -0
  83. package/build/esm/createSeedClient.js.map +1 -0
  84. package/build/esm/generated/cli/OntologySeedingService/setSeed.js +28 -0
  85. package/build/esm/generated/cli/OntologySeedingService/setSeed.js.map +1 -0
  86. package/build/esm/generated/cli/OntologySeedingService.js +19 -0
  87. package/build/esm/generated/cli/OntologySeedingService.js.map +1 -0
  88. package/build/esm/generated/cli/StatusService/getStatus.js +25 -0
  89. package/build/esm/generated/cli/StatusService/getStatus.js.map +1 -0
  90. package/build/esm/generated/cli/StatusService/publishStatus.js +26 -0
  91. package/build/esm/generated/cli/StatusService/publishStatus.js.map +1 -0
  92. package/build/esm/generated/cli/StatusService.js +20 -0
  93. package/build/esm/generated/cli/StatusService.js.map +1 -0
  94. package/build/esm/generated/cli/__components.js +2 -0
  95. package/build/esm/generated/cli/__components.js.map +1 -0
  96. package/build/esm/generated/cli/index.js +20 -0
  97. package/build/esm/generated/cli/index.js.map +1 -0
  98. package/build/esm/index.js +27 -0
  99. package/build/esm/index.js.map +1 -0
  100. package/build/esm/scripts/download.js +92 -0
  101. package/build/esm/scripts/download.js.map +1 -0
  102. package/build/esm/scripts/foundry-host.js +59 -0
  103. package/build/esm/scripts/foundry-host.js.map +1 -0
  104. package/build/esm/scripts/foundry-token.js +50 -0
  105. package/build/esm/scripts/foundry-token.js.map +1 -0
  106. package/build/esm/scripts/gitRemote.js +39 -0
  107. package/build/esm/scripts/gitRemote.js.map +1 -0
  108. package/build/esm/scripts/postinstall.js +38 -0
  109. package/build/esm/scripts/postinstall.js.map +1 -0
  110. package/build/esm/test/NoSpawnStatusServer.js +33 -0
  111. package/build/esm/test/NoSpawnStatusServer.js.map +1 -0
  112. package/build/esm/test/StubService.js +61 -0
  113. package/build/esm/test/StubService.js.map +1 -0
  114. package/build/esm/test/emptyOntologyMetadata.js +32 -0
  115. package/build/esm/test/emptyOntologyMetadata.js.map +1 -0
  116. package/build/esm/test/stubStatusServer.js +74 -0
  117. package/build/esm/test/stubStatusServer.js.map +1 -0
  118. package/build/esm/test/writeDiscoveryFile.js +39 -0
  119. package/build/esm/test/writeDiscoveryFile.js.map +1 -0
  120. package/build/esm/types.js +2 -0
  121. package/build/esm/types.js.map +1 -0
  122. package/build/esm/utils/empty-ontology-block.js +61 -0
  123. package/build/esm/utils/empty-ontology-block.js.map +1 -0
  124. package/build/esm/utils/foundry-cli.js +46 -0
  125. package/build/esm/utils/foundry-cli.js.map +1 -0
  126. package/build/esm/utils/process.js +26 -0
  127. package/build/esm/utils/process.js.map +1 -0
  128. package/build/esm/utils/service.js +33 -0
  129. package/build/esm/utils/service.js.map +1 -0
  130. package/build/types/cli-service/CliServiceLauncher.d.ts +36 -0
  131. package/build/types/cli-service/CliServiceLauncher.d.ts.map +1 -0
  132. package/build/types/cli-service/FoundryCliService.d.ts +60 -0
  133. package/build/types/cli-service/FoundryCliService.d.ts.map +1 -0
  134. package/build/types/cli-service/OntologyServer.d.ts +10 -0
  135. package/build/types/cli-service/OntologyServer.d.ts.map +1 -0
  136. package/build/types/cli-service/ServiceDiscoverer.d.ts +22 -0
  137. package/build/types/cli-service/ServiceDiscoverer.d.ts.map +1 -0
  138. package/build/types/cli-service/StatusServer.d.ts +17 -0
  139. package/build/types/cli-service/StatusServer.d.ts.map +1 -0
  140. package/build/types/createIntegrationClient.d.ts +2 -0
  141. package/build/types/createIntegrationClient.d.ts.map +1 -0
  142. package/build/types/createIntegrationServer.d.ts +2 -0
  143. package/build/types/createIntegrationServer.d.ts.map +1 -0
  144. package/build/types/createSeedClient.d.ts +9 -0
  145. package/build/types/createSeedClient.d.ts.map +1 -0
  146. package/build/types/generated/cli/OntologySeedingService/setSeed.d.ts +9 -0
  147. package/build/types/generated/cli/OntologySeedingService/setSeed.d.ts.map +1 -0
  148. package/build/types/generated/cli/OntologySeedingService.d.ts +1 -0
  149. package/build/types/generated/cli/OntologySeedingService.d.ts.map +1 -0
  150. package/build/types/generated/cli/StatusService/getStatus.d.ts +6 -0
  151. package/build/types/generated/cli/StatusService/getStatus.d.ts.map +1 -0
  152. package/build/types/generated/cli/StatusService/publishStatus.d.ts +7 -0
  153. package/build/types/generated/cli/StatusService/publishStatus.d.ts.map +1 -0
  154. package/build/types/generated/cli/StatusService.d.ts +2 -0
  155. package/build/types/generated/cli/StatusService.d.ts.map +1 -0
  156. package/build/types/generated/cli/__components.d.ts +189 -0
  157. package/build/types/generated/cli/__components.d.ts.map +1 -0
  158. package/build/types/generated/cli/index.d.ts +3 -0
  159. package/build/types/generated/cli/index.d.ts.map +1 -0
  160. package/build/types/index.d.ts +10 -0
  161. package/build/types/index.d.ts.map +1 -0
  162. package/build/types/scripts/download.d.ts +6 -0
  163. package/build/types/scripts/download.d.ts.map +1 -0
  164. package/build/types/scripts/foundry-host.d.ts +7 -0
  165. package/build/types/scripts/foundry-host.d.ts.map +1 -0
  166. package/build/types/scripts/foundry-token.d.ts +5 -0
  167. package/build/types/scripts/foundry-token.d.ts.map +1 -0
  168. package/build/types/scripts/gitRemote.d.ts +9 -0
  169. package/build/types/scripts/gitRemote.d.ts.map +1 -0
  170. package/build/types/scripts/postinstall.d.ts +1 -0
  171. package/build/types/scripts/postinstall.d.ts.map +1 -0
  172. package/build/types/test/NoSpawnStatusServer.d.ts +11 -0
  173. package/build/types/test/NoSpawnStatusServer.d.ts.map +1 -0
  174. package/build/types/test/StubService.d.ts +23 -0
  175. package/build/types/test/StubService.d.ts.map +1 -0
  176. package/build/types/test/emptyOntologyMetadata.d.ts +3 -0
  177. package/build/types/test/emptyOntologyMetadata.d.ts.map +1 -0
  178. package/build/types/test/stubStatusServer.d.ts +14 -0
  179. package/build/types/test/stubStatusServer.d.ts.map +1 -0
  180. package/build/types/test/writeDiscoveryFile.d.ts +8 -0
  181. package/build/types/test/writeDiscoveryFile.d.ts.map +1 -0
  182. package/build/types/types.d.ts +104 -0
  183. package/build/types/types.d.ts.map +1 -0
  184. package/build/types/utils/empty-ontology-block.d.ts +4 -0
  185. package/build/types/utils/empty-ontology-block.d.ts.map +1 -0
  186. package/build/types/utils/foundry-cli.d.ts +13 -0
  187. package/build/types/utils/foundry-cli.d.ts.map +1 -0
  188. package/build/types/utils/process.d.ts +1 -0
  189. package/build/types/utils/process.d.ts.map +1 -0
  190. package/build/types/utils/service.d.ts +4 -0
  191. package/build/types/utils/service.d.ts.map +1 -0
  192. package/package.json +93 -1
@@ -0,0 +1,91 @@
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 path from "node:path";
18
+ import invariant from "tiny-invariant";
19
+ import { StatusService } from "../generated/cli/index.js";
20
+ import { FoundryCliService } from "./FoundryCliService.js";
21
+ const HEALTH_REQUEST_TIMEOUT_MS = 2_000;
22
+ /**
23
+ * The local status server, and the health authority for every other service.
24
+ */
25
+ export class StatusServer extends FoundryCliService {
26
+ /** Shared by callers that ask while a fetch is already outstanding. */
27
+ #inFlight;
28
+ constructor(config) {
29
+ super("STATUS_SERVER", config);
30
+ }
31
+ getArgs() {
32
+ // force project path to cwd
33
+ return ["start", "status-server", "--discovery-path", path.resolve(this.getProjectPath(), ".palantir")];
34
+ }
35
+ async checkHealth() {
36
+ const discovery = this.getContext().discoverer.get("STATUS_SERVER");
37
+ if (discovery === undefined) {
38
+ return {
39
+ service: "STATUS_SERVER",
40
+ state: "UNDISCOVERED",
41
+ ready: false,
42
+ terminal: false
43
+ };
44
+ }
45
+ const healthy = await this.#isHealthy(discovery.url);
46
+ return {
47
+ service: "STATUS_SERVER",
48
+ state: healthy ? "READY" : "DISCOVERED",
49
+ ready: healthy,
50
+ terminal: false,
51
+ url: discovery.url
52
+ };
53
+ }
54
+ async #isHealthy(baseUrl) {
55
+ try {
56
+ const response = await fetch(new URL("/api/health", baseUrl), {
57
+ signal: AbortSignal.timeout(HEALTH_REQUEST_TIMEOUT_MS)
58
+ });
59
+ if (!response.ok) {
60
+ return false;
61
+ }
62
+ const body = await response.json();
63
+ return body.status === "healthy";
64
+ } catch {
65
+ return false;
66
+ }
67
+ }
68
+
69
+ /**
70
+ * The lifecycle snapshot for every service.
71
+ */
72
+ async getServiceStatuses() {
73
+ const baseUrl = this.getContext().discoverer.get("STATUS_SERVER")?.url;
74
+ !baseUrl ? process.env.NODE_ENV !== "production" ? invariant(false, "Cannot get service status because the status server is not discovered yet") : invariant(false) : void 0;
75
+ this.#inFlight ??= StatusService.getStatus({
76
+ baseUrl,
77
+ servicePath: ""
78
+ }).catch(() => undefined).finally(() => {
79
+ this.#inFlight = undefined;
80
+ });
81
+ const result = await this.#inFlight;
82
+ return result ?? [];
83
+ }
84
+ async getServiceStatus(name) {
85
+ const statuses = await this.getServiceStatuses();
86
+ return statuses.find(({
87
+ service
88
+ }) => service === name);
89
+ }
90
+ }
91
+ //# sourceMappingURL=StatusServer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusServer.js","names":["path","invariant","StatusService","FoundryCliService","HEALTH_REQUEST_TIMEOUT_MS","StatusServer","inFlight","constructor","config","getArgs","resolve","getProjectPath","checkHealth","discovery","getContext","discoverer","get","undefined","service","state","ready","terminal","healthy","isHealthy","url","#isHealthy","baseUrl","response","fetch","URL","signal","AbortSignal","timeout","ok","body","json","status","getServiceStatuses","process","env","NODE_ENV","getStatus","servicePath","catch","finally","result","getServiceStatus","name","statuses","find"],"sources":["StatusServer.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 path from \"node:path\";\n\nimport invariant from \"tiny-invariant\";\n\nimport {\n type ServiceName,\n type ServiceStatus,\n StatusService,\n} from \"../generated/cli/index.js\";\nimport {\n FoundryCliService,\n type FoundryServiceConfig,\n type ServiceHealth,\n} from \"./FoundryCliService.js\";\n\nconst HEALTH_REQUEST_TIMEOUT_MS = 2_000;\n\nexport type StatusServerConfig = FoundryServiceConfig;\n\n/**\n * The local status server, and the health authority for every other service.\n */\nexport class StatusServer extends FoundryCliService {\n /** Shared by callers that ask while a fetch is already outstanding. */\n #inFlight: Promise<ServiceStatus[] | undefined> | undefined;\n\n constructor(config: StatusServerConfig) {\n super(\"STATUS_SERVER\", config);\n }\n\n protected override getArgs(): readonly string[] {\n // force project path to cwd\n return [\n \"start\",\n \"status-server\",\n \"--discovery-path\",\n path.resolve(this.getProjectPath(), \".palantir\"),\n ];\n }\n\n override async checkHealth(): Promise<ServiceHealth> {\n const discovery = this.getContext().discoverer.get(\"STATUS_SERVER\");\n if (discovery === undefined) {\n return {\n service: \"STATUS_SERVER\",\n state: \"UNDISCOVERED\",\n ready: false,\n terminal: false,\n };\n }\n const healthy = await this.#isHealthy(discovery.url);\n return {\n service: \"STATUS_SERVER\",\n state: healthy ? \"READY\" : \"DISCOVERED\",\n ready: healthy,\n terminal: false,\n url: discovery.url,\n };\n }\n\n async #isHealthy(baseUrl: string): Promise<boolean> {\n try {\n const response = await fetch(new URL(\"/api/health\", baseUrl), {\n signal: AbortSignal.timeout(HEALTH_REQUEST_TIMEOUT_MS),\n });\n if (!response.ok) {\n return false;\n }\n const body: { status?: unknown } = await response.json();\n return body.status === \"healthy\";\n } catch {\n return false;\n }\n }\n\n /**\n * The lifecycle snapshot for every service.\n */\n async getServiceStatuses(): Promise<ServiceStatus[]> {\n const baseUrl = this.getContext().discoverer.get(\"STATUS_SERVER\")?.url;\n invariant(\n baseUrl,\n \"Cannot get service status because the status server is not discovered yet\",\n );\n this.#inFlight ??= StatusService.getStatus({ baseUrl, servicePath: \"\" })\n .catch(() => undefined)\n .finally(() => {\n this.#inFlight = undefined;\n });\n const result = await this.#inFlight;\n return result ?? [];\n }\n\n async getServiceStatus(\n name: ServiceName,\n ): Promise<ServiceStatus | undefined> {\n const statuses = await this.getServiceStatuses();\n return statuses.find(({ service }) => service === name);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,WAAW;AAE5B,OAAOC,SAAS,MAAM,gBAAgB;AAEtC,SAGEC,aAAa,QACR,2BAA2B;AAClC,SACEC,iBAAiB,QAGZ,wBAAwB;AAE/B,MAAMC,yBAAyB,GAAG,KAAK;AAIvC;AACA;AACA;AACA,OAAO,MAAMC,YAAY,SAASF,iBAAiB,CAAC;EAClD;EACA,CAACG,QAAQ;EAETC,WAAWA,CAACC,MAA0B,EAAE;IACtC,KAAK,CAAC,eAAe,EAAEA,MAAM,CAAC;EAChC;EAEm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;IACnD,MAAMX,OAAO,GAAG,IAAI,CAACZ,UAAU,CAAC,CAAC,CAACC,UAAU,CAACC,GAAG,CAAC,eAAe,CAAC,EAAEQ,GAAG;IACtE,CACEE,OAAO,GAAAY,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBADTvC,SAAS,QAEP,2EAA2E,IAF7EA,SAAS;IAIT,IAAI,CAAC,CAACK,QAAQ,KAAKJ,aAAa,CAACuC,SAAS,CAAC;MAAEf,OAAO;MAAEgB,WAAW,EAAE;IAAG,CAAC,CAAC,CACrEC,KAAK,CAAC,MAAM1B,SAAS,CAAC,CACtB2B,OAAO,CAAC,MAAM;MACb,IAAI,CAAC,CAACtC,QAAQ,GAAGW,SAAS;IAC5B,CAAC,CAAC;IACJ,MAAM4B,MAAM,GAAG,MAAM,IAAI,CAAC,CAACvC,QAAQ;IACnC,OAAOuC,MAAM,IAAI,EAAE;EACrB;EAEA,MAAMC,gBAAgBA,CACpBC,IAAiB,EACmB;IACpC,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACX,kBAAkB,CAAC,CAAC;IAChD,OAAOW,QAAQ,CAACC,IAAI,CAAC,CAAC;MAAE/B;IAAQ,CAAC,KAAKA,OAAO,KAAK6B,IAAI,CAAC;EACzD;AACF","ignoreList":[]}
@@ -0,0 +1,67 @@
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 fs from "node:fs/promises";
18
+ import { createClient } from "@osdk/client";
19
+ import { createMockClient } from "@osdk/unit-testing";
20
+ import { fetch as undiciFetch, Agent } from "undici";
21
+
22
+ /** The definition kinds accepted by {@link Client}'s call signatures. */
23
+
24
+ export async function createIntegrationClient(config) {
25
+ const {
26
+ baseUrl,
27
+ metadata,
28
+ caCertPath
29
+ } = config;
30
+ const agent = new Agent({
31
+ connect: caCertPath ? {
32
+ ca: await fs.readFile(caCertPath)
33
+ } : {
34
+ rejectUnauthorized: false
35
+ }
36
+ });
37
+ const realClient = createClient(baseUrl, metadata.ontology.rid, () => Promise.resolve("integration-client-token"), {}, (input, init) => undiciFetch(input, {
38
+ ...init,
39
+ dispatcher: agent
40
+ }));
41
+ const mockClient = createMockClient();
42
+ const client = Object.defineProperties(def => {
43
+ switch (def.type) {
44
+ case "query":
45
+ return mockClient(def);
46
+ case "action":
47
+ return realClient(def);
48
+ case "interface":
49
+ return realClient(def);
50
+ case "object":
51
+ return realClient(def);
52
+ case "experiment":
53
+ default:
54
+ return realClient(def);
55
+ }
56
+ }, {
57
+ ...Object.getOwnPropertyDescriptors(realClient),
58
+ whenQuery: {
59
+ value: mockClient.whenQuery.bind(undefined)
60
+ },
61
+ clearStubs: {
62
+ value: mockClient.clearStubs.bind(undefined)
63
+ }
64
+ });
65
+ return client;
66
+ }
67
+ //# sourceMappingURL=createIntegrationClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createIntegrationClient.js","names":["fs","createClient","createMockClient","fetch","undiciFetch","Agent","createIntegrationClient","config","baseUrl","metadata","caCertPath","agent","connect","ca","readFile","rejectUnauthorized","realClient","ontology","rid","Promise","resolve","input","init","dispatcher","mockClient","client","Object","defineProperties","def","type","getOwnPropertyDescriptors","whenQuery","value","bind","undefined","clearStubs"],"sources":["createIntegrationClient.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 fs from \"node:fs/promises\";\n\nimport type {\n ActionDefinition,\n InterfaceDefinition,\n ObjectTypeDefinition,\n QueryDefinition,\n} from \"@osdk/api\";\nimport type { Experiment } from \"@osdk/api/unstable\";\nimport { createClient, type Client } from \"@osdk/client\";\nimport { createMockClient } from \"@osdk/unit-testing\";\nimport { fetch as undiciFetch, Agent } from \"undici\";\n\nimport type { IntegrationClient, IntegrationClientConfig } from \"./types.js\";\n\n/** The definition kinds accepted by {@link Client}'s call signatures. */\ntype ClientArg =\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition\n | QueryDefinition\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | Experiment<any>;\n\nexport async function createIntegrationClient(\n config: IntegrationClientConfig,\n): Promise<IntegrationClient> {\n const { baseUrl, metadata, caCertPath } = config;\n const agent = new Agent({\n connect: caCertPath\n ? {\n ca: await fs.readFile(caCertPath),\n }\n : {\n rejectUnauthorized: false,\n },\n });\n const fetchWithCert = ((input, init) =>\n undiciFetch(input, {\n ...init,\n dispatcher: agent,\n })) satisfies typeof undiciFetch as unknown as typeof fetch;\n const realClient = createClient(\n baseUrl,\n metadata.ontology.rid,\n () => Promise.resolve(\"integration-client-token\"),\n {},\n fetchWithCert,\n );\n const mockClient = createMockClient();\n const clientInternal = ((def: ClientArg) => {\n switch (def.type) {\n case \"query\":\n return mockClient(def);\n case \"action\":\n return realClient(def);\n case \"interface\":\n return realClient(def);\n case \"object\":\n return realClient(def);\n case \"experiment\":\n default:\n return realClient(def);\n }\n }) as Client;\n const client = Object.defineProperties<IntegrationClient>(\n clientInternal as IntegrationClient,\n {\n ...Object.getOwnPropertyDescriptors(realClient),\n whenQuery: {\n value: mockClient.whenQuery.bind(undefined),\n },\n clearStub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AAQ;QACX,OAAOZ,UAAU,CAACY,GAAG,CAAC;MACxB,KAAK,YAAY;MACjB;QACE,OAAOZ,UAAU,CAACY,GAAG,CAAC;IAC1B;EACF,CAAC,EAGC;IACE,GAAGF,MAAM,CAACI,yBAAyB,CAACd,UAAU,CAAC;IAC/Ce,SAAS,EAAE;MACTC,KAAK,EAAER,UAAU,CAACO,SAAS,CAACE,IAAI,CAACC,SAAS;IAC5C,CAAC;IACDC,UAAU,EAAE;MACVH,KAAK,EAAER,UAAU,CAACW,UAAU,CAACF,IAAI,CAACC,SAAS;IAC7C;EACF,CACF,CAAC;EACD,OAAOT,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1,115 @@
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 fs from "node:fs/promises";
18
+ import path from "node:path";
19
+ import { PreviewOntologyIrConverter } from "@osdk/generator-converters.preview";
20
+ import invariant from "tiny-invariant";
21
+ import { Agent, fetch as undiciFetch } from "undici";
22
+ import { CliServiceLauncher } from "./cli-service/CliServiceLauncher.js";
23
+ import { OntologyServer } from "./cli-service/OntologyServer.js";
24
+ import { createIntegrationClient } from "./createIntegrationClient.js";
25
+ import { createSeedClient } from "./createSeedClient.js";
26
+ import { EMPTY_ONTOLOGY_BLOCK_DATA } from "./utils/empty-ontology-block.js";
27
+ const transformMetadata = metadata => {
28
+ const transformed = PreviewOntologyIrConverter.getPreviewFullMetadataFromBlockData(EMPTY_ONTOLOGY_BLOCK_DATA, metadata);
29
+ return {
30
+ ...transformed,
31
+ ontology: metadata.ontology
32
+ };
33
+ };
34
+ const writeMetadata = async args => {
35
+ const {
36
+ metadataPath,
37
+ previewMetadata
38
+ } = args;
39
+ const stringified = JSON.stringify(previewMetadata);
40
+ await fs.writeFile(metadataPath, stringified);
41
+ };
42
+ export async function createIntegrationServer(config) {
43
+ const {
44
+ metadata,
45
+ projectPath = process.cwd(),
46
+ foundryCliPath
47
+ } = config;
48
+ const testPath = await fs.mkdtemp(path.join(projectPath, ".test-run-"));
49
+ const metadataPath = path.resolve(testPath, "ontology-metadata.json");
50
+ const previewMetadata = transformMetadata(metadata);
51
+ const serviceLauncher = new CliServiceLauncher({
52
+ projectDir: testPath,
53
+ foundryCliPath
54
+ });
55
+ // write metadata to metadataPath for foundry cli to read from
56
+ await writeMetadata({
57
+ previewMetadata,
58
+ metadataPath
59
+ });
60
+ const ontology = serviceLauncher.register(new OntologyServer({
61
+ projectPath: testPath,
62
+ metadataPath,
63
+ foundryCliPath
64
+ }));
65
+
66
+ // stateful cache of client and seed client
67
+ let client;
68
+ let seedClient;
69
+ return {
70
+ getOntologyUrl: () => ontology.getUrl(),
71
+ start: async () => {
72
+ await serviceLauncher.start();
73
+ },
74
+ stop: async () => {
75
+ await serviceLauncher.stop();
76
+ await fs.rm(testPath, {
77
+ recursive: true,
78
+ force: true
79
+ });
80
+ },
81
+ getSeedClient: async () => {
82
+ if (seedClient !== undefined) return seedClient;
83
+ const baseUrl = ontology.getUrl();
84
+ !baseUrl ? process.env.NODE_ENV !== "production" ? invariant(false, "Ontology server is not ready") : invariant(false) : void 0;
85
+ const caCertPath = ontology.getCaCertPath();
86
+ !caCertPath ? process.env.NODE_ENV !== "production" ? invariant(false, "Ontology server is not ready") : invariant(false) : void 0;
87
+ const agent = new Agent({
88
+ connect: caCertPath ? {
89
+ ca: await fs.readFile(caCertPath)
90
+ } : {
91
+ rejectUnauthorized: false
92
+ }
93
+ });
94
+ return seedClient = createSeedClient({
95
+ baseUrl,
96
+ metadata,
97
+ fetchFn: (input, init) => undiciFetch(input, {
98
+ ...init,
99
+ dispatcher: agent
100
+ })
101
+ });
102
+ },
103
+ getClient: async () => {
104
+ if (client !== undefined) return client;
105
+ const baseUrl = ontology.getUrl();
106
+ !baseUrl ? process.env.NODE_ENV !== "production" ? invariant(false, "Ontology server is not ready") : invariant(false) : void 0;
107
+ return client = await createIntegrationClient({
108
+ baseUrl,
109
+ metadata,
110
+ caCertPath: ontology.getCaCertPath()
111
+ });
112
+ }
113
+ };
114
+ }
115
+ //# sourceMappingURL=createIntegrationServer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createIntegrationServer.js","names":["fs","path","PreviewOntologyIrConverter","invariant","Agent","fetch","undiciFetch","CliServiceLauncher","OntologyServer","createIntegrationClient","createSeedClient","EMPTY_ONTOLOGY_BLOCK_DATA","transformMetadata","metadata","transformed","getPreviewFullMetadataFromBlockData","ontology","writeMetadata","args","metadataPath","previewMetadata","stringified","JSON","stringify","writeFile","createIntegrationServer","config","projectPath","process","cwd","foundryCliPath","testPath","mkdtemp","join","resolve","serviceLauncher","projectDir","register","client","seedClient","getOntologyUrl","getUrl","start","stop","rm","recursive","force","getSeedClient","undefined","baseUrl","env","NODE_ENV","caCertPath","getCaCertPath","agent","connect","ca","readFile","rejectUnauthorized","fetchFn","input","init","dispatcher","getClient"],"sources":["createIntegrationServer.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 fs from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport type { OntologyFullMetadata } from \"@osdk/foundry.ontologies\";\nimport type { PreviewOntologyFullMetadata } from \"@osdk/generator-converters.preview\";\nimport { PreviewOntologyIrConverter } from \"@osdk/generator-converters.preview\";\nimport invariant from \"tiny-invariant\";\nimport { Agent, fetch as undiciFetch } from \"undici\";\n\nimport { CliServiceLauncher } from \"./cli-service/CliServiceLauncher.js\";\nimport { OntologyServer } from \"./cli-service/OntologyServer.js\";\nimport { createIntegrationClient } from \"./createIntegrationClient.js\";\nimport { createSeedClient } from \"./createSeedClient.js\";\nimport type {\n IntegrationClient,\n IntegrationServer,\n IntegrationServerConfig,\n SeedClient,\n} from \"./types.js\";\nimport { EMPTY_ONTOLOGY_BLOCK_DATA } from \"./utils/empty-ontology-block.js\";\n\nconst transformMetadata = (\n metadata: OntologyFullMetadata,\n): PreviewOntologyFullMetadata => {\n const transformed =\n PreviewOntologyIrConverter.getPreviewFullMetadataFromBlockData(\n EMPTY_ONTOLOGY_BLOCK_DATA,\n metadata,\n );\n return {\n ...transformed,\n ontology: metadata.ontology,\n };\n};\n\nconst writeMetadata = async (args: {\n metadataPath: string;\n previewMetadata: PreviewOntologyFullMetadata;\n}) => {\n const { metadataPath, previewMetadata } = args;\n const stringified = JSON.stringify(previewMetadata);\n await fs.writeFile(metadataPath, stringified);\n};\nexport async function createIntegrationServer(\n config: IntegrationServerConfig,\n): Promise<IntegrationServer> {\n const { metadata, projectPath = process.cwd(), foundryCliPath } = config;\n\n const testPath = await fs.mkdtemp(path.join(projectPath, \".test-run-\"));\n const metadataPath = path.resolve(testPath, \"ontology-metadata.json\");\n const previewMetadata = transformMetadata(metadata);\n\n const serviceLauncher = new CliServiceLauncher({\n projectDir: testPath,\n foundryCliPath,\n });\n // write metadata to metadataPath for foundry cli to read from\n await writeMetadata({\n previewMetadata,\n metadataPath,\n });\n\n const ontology = serviceLauncher.register(\n new OntologyServer({\n projectPath: testPath,\n metadataPath,\n foundryCliPath,\n }),\n );\n\n // stateful cache of client and seed client\n let client: IntegrationClient | undefined;\n let seedClient: SeedClient | undefined;\n\n return {\n getOntologyUrl: () => ontology.getUrl(),\n start: async () => {\n await serviceLauncher.start();\n },\n stop: async () => {\n await serviceLauncher.stop();\n await fs.rm(testPath, { recursive: true, force: true });\n },\n getSeedClient: async () => {\n if (seedClient !== undefined) return seedClient;\n const baseUrl = ontology.getUrl();\n invariant(baseUrl, \"Ontology server is not ready\");\n const caCertPath = ontology.getCaCertPath();\n invariant(caCertPath, \"Ontology server is not ready\");\n const agent = new Agent({\n connect: caCertPath\n ? {\n ca: await fs.readFile(caCertPath),\n }\n : {\n rejectUnauthorized: false,\n },\n });\n const fetchWithCert = ((input, init) =>\n undiciFetch(input, {\n ...init,\n dispatcher: agent,\n })) satisfies typeof undiciFetch as unknown as typeof fetch;\n return (seedClient = createSeedClient({\n baseUrl,\n metadata,\n fetchFn: fetchWithCert,\n }));\n },\n getClient: async () => {\n if (client !== undefined) return client;\n const baseUrl = ontology.getUrl();\n invariant(baseUrl, \"Ontology server is not ready\");\n return (client = await createIntegrationClient({\n baseUrl,\n metadata,\n caCertPath: ontology.getCaCertPath(),\n }));\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,EAAE,MAAM,kBAAkB;AACjC,OAAOC,IAAI,MAAM,WAAW;AAI5B,SAASC,0BAA0B,QAAQ,oCAAoC;AAC/E,OAAOC,SAAS,MAAM,gBAAgB;AACtC,SAASC,KAAK,EAAEC,KAAK,IAAIC,WAAW,QAAQ,QAAQ;AAEpD,SAASC,kBAAkB,QAAQ,qCAAqC;AACxE,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,uBAAuB,QAAQ,8BAA8B;AACtE,SAASC,gBAAgB,QAAQ,uBAAuB;AAOxD,SAASC,yBAAyB,QAAQ,iCAAiC;AAE3E,MAAMC,iBAAiB,GACrBC,QAA8B,IACE;EAChC,MAAMC,WAAW,GACfZ,0BAA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S,EAAE,OAAOV,MAAM;MACvC,MAAMW,OAAO,GAAGjC,QAAQ,CAACyB,MAAM,CAAC,CAAC;MACjC,CAAUQ,OAAO,GAAArB,OAAA,CAAAsB,GAAA,CAAAC,QAAA,oBAAjBhD,SAAS,QAAU,8BAA8B,IAAjDA,SAAS;MACT,OAAQmC,MAAM,GAAG,MAAM7B,uBAAuB,CAAC;QAC7CwC,OAAO;QACPpC,QAAQ;QACRuC,UAAU,EAAEpC,QAAQ,CAACqC,aAAa,CAAC;MACrC,CAAC,CAAC;IACJ;EACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,77 @@
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 { SeedBuilder } from "@osdk/seed-helpers";
18
+ import { OntologySeedingService } from "./generated/cli/index.js";
19
+ export function createSeedClient(config) {
20
+ const {
21
+ baseUrl,
22
+ metadata,
23
+ fetchFn
24
+ } = config;
25
+ const builder = new SeedBuilder(metadata);
26
+ const applySeed = async seed => {
27
+ const res = await OntologySeedingService.setSeed({
28
+ baseUrl,
29
+ servicePath: "/api",
30
+ fetchFn
31
+ }, seed);
32
+ return res;
33
+ };
34
+ return Object.defineProperties(async seed => {
35
+ let result;
36
+ if (typeof seed === "function") {
37
+ result = seed(builder);
38
+ } else {
39
+ builder.addAll(seed);
40
+ }
41
+ await applySeed(builder.build());
42
+ return result;
43
+ }, Object.getOwnPropertyDescriptors({
44
+ ref: (o, pk) => builder.ref(o, pk),
45
+ addAll: async output => {
46
+ builder.addAll(output);
47
+ await applySeed(builder.build());
48
+ },
49
+ set: async output => {
50
+ builder.set(output);
51
+ await applySeed(builder.build());
52
+ },
53
+ create: async (o, props) => {
54
+ const ref = builder.create(o, props);
55
+ await applySeed(builder.build());
56
+ return ref;
57
+ },
58
+ update: async (ref, props) => {
59
+ const returnedRef = builder.update(ref, props);
60
+ await applySeed(builder.build());
61
+ return returnedRef;
62
+ },
63
+ delete: async ref => {
64
+ builder.delete(ref);
65
+ await applySeed(builder.build());
66
+ },
67
+ link: async (source, apiName, target) => {
68
+ builder.link(source, apiName, target);
69
+ await applySeed(builder.build());
70
+ },
71
+ unlink: async (source, apiName, target) => {
72
+ builder.unlink(source, apiName, target);
73
+ await applySeed(builder.build());
74
+ }
75
+ }));
76
+ }
77
+ //# sourceMappingURL=createSeedClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSeedClient.js","names":["SeedBuilder","OntologySeedingService","createSeedClient","config","baseUrl","metadata","fetchFn","builder","applySeed","seed","res","setSeed","servicePath","Object","defineProperties","result","addAll","build","getOwnPropertyDescriptors","ref","o","pk","output","set","create","props","update","returnedRef","delete","link","source","apiName","target","unlink"],"sources":["createSeedClient.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 * as Ontology from \"@osdk/foundry.ontologies\";\nimport {\n SeedBuilder,\n type SeedFunction,\n type SeedOutput,\n} from \"@osdk/seed-helpers\";\n\nimport { OntologySeedingService } from \"./generated/cli/index.js\";\nimport type { SeedClient } from \"./types.js\";\n\ntype SeedClientConfig = {\n baseUrl: string;\n metadata: Ontology.OntologyFullMetadata;\n fetchFn?: typeof fetch;\n};\n\ntype PropsOf<T> = { [K in keyof T]: T[K] };\ntype SeedClientProps = PropsOf<SeedClient>;\n\nexport function createSeedClient(config: SeedClientConfig): SeedClient {\n const { baseUrl, metadata, fetchFn } = config;\n const builder = new SeedBuilder(metadata);\n const seedClientFunction = async <T = void>(\n seed: SeedFunction<T> | SeedOutput,\n ): Promise<T> => {\n let result;\n if (typeof seed === \"function\") {\n result = seed(builder);\n } else {\n builder.addAll(seed);\n }\n await applySeed(builder.build());\n return result as T;\n };\n const applySeed = async (seed: SeedOutput) => {\n const res = await OntologySeedingService.setSeed(\n {\n baseUrl,\n servicePath: \"/api\",\n fetchFn,\n },\n seed,\n );\n return res;\n };\n const seedClientUtils: SeedClientProps = {\n ref: (o, pk) => builder.ref(o, pk),\n addAll: async (output) => {\n builder.addAll(output);\n await applySeed(builder.build());\n },\n set: async (output) => {\n builder.set(output);\n await applySeed(builder.build());\n },\n create: async (o, props) => {\n const ref = builder.create(o, props);\n await applySeed(builder.build());\n return ref;\n },\n update: async (ref, props) => {\n const returnedRef = builder.update(ref, props);\n await applySeed(builder.build());\n return returnedRef;\n },\n delete: async (ref) => {\n builder.delete(ref);\n await applySeed(builder.build());\n },\n link: async (source, apiName, target) => {\n builder.link(source, apiName, target);\n await applySeed(builder.build());\n },\n unlink: async (source, apiName, target) => {\n builder.unlink(source, apiName, target);\n await applySeed(builder.build());\n },\n };\n return Object.defineProperties<SeedClient>(\n seedClientFunction as SeedClient,\n Object.getOwnPropertyDescriptors(seedClientUtils),\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SACEA,WAAW,QAGN,oBAAoB;AAE3B,SAASC,sBAAsB,QAAQ,0BAA0B;AAYjE,OAAO,SAASC,gBAAgBA,CAACC,MAAwB,EAAc;EACrE,MAAM;I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K,CAAC;MACpC,MAAMjB,SAAS,CAACD,OAAO,CAACU,KAAK,CAAC,CAAC,CAAC;MAChC,OAAOE,GAAG;IACZ,CAAC;IACDO,MAAM,EAAE,MAAAA,CAAOP,GAAG,EAAEM,KAAK,KAAK;MAC5B,MAAME,WAAW,GAAGpB,OAAO,CAACmB,MAAM,CAACP,GAAG,EAAEM,KAAK,CAAC;MAC9C,MAAMjB,SAAS,CAACD,OAAO,CAACU,KAAK,CAAC,CAAC,CAAC;MAChC,OAAOU,WAAW;IACpB,CAAC;IACDC,MAAM,EAAE,MAAOT,GAAG,IAAK;MACrBZ,OAAO,CAACqB,MAAM,CAACT,GAAG,CAAC;MACnB,MAAMX,SAAS,CAACD,OAAO,CAACU,KAAK,CAAC,CAAC,CAAC;IAClC,CAAC;IACDY,IAAI,EAAE,MAAAA,CAAOC,MAAM,EAAEC,OAAO,EAAEC,MAAM,KAAK;MACvCzB,OAAO,CAACsB,IAAI,CAACC,MAAM,EAAEC,OAAO,EAAEC,MAAM,CAAC;MACrC,MAAMxB,SAAS,CAACD,OAAO,CAACU,KAAK,CAAC,CAAC,CAAC;IAClC,CAAC;IACDgB,MAAM,EAAE,MAAAA,CAAOH,MAAM,EAAEC,OAAO,EAAEC,MAAM,KAAK;MACzCzB,OAAO,CAAC0B,MAAM,CAACH,MAAM,EAAEC,OAAO,EAAEC,MAAM,CAAC;MACvC,MAAMxB,SAAS,CAACD,OAAO,CAACU,KAAK,CAAC,CAAC,CAAC;IAClC;EACF,CAGkD,CAClD,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,28 @@
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
+ /**/
18
+ import { conjureFetch } from "conjure-lite";
19
+ /**
20
+ * Sets the seed state of the local ontology server. Succeeds with an
21
+ * empty `200` response; failures surface as errors: 400 for a malformed
22
+ * request body, 503 while the server is still starting, and 500 (with
23
+ * the underlying detail) for seeding failures.
24
+ */
25
+ export async function setSeed(ctx, seed) {
26
+ return conjureFetch(ctx, `/seed`, "PUT", seed);
27
+ }
28
+ //# sourceMappingURL=setSeed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setSeed.js","names":["conjureFetch","setSeed","ctx","seed"],"sources":["setSeed.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\n/**/\nimport { conjureFetch, type ConjureContext } from \"conjure-lite\";\n\nimport type {\n OntologySeed as _OntologySeed,\n SetSeedResponse as _SetSeedResponse,\n} from \"../__components.js\";\n\n/**\n * Sets the seed state of the local ontology server. Succeeds with an\n * empty `200` response; failures surface as errors: 400 for a malformed\n * request body, 503 while the server is still starting, and 500 (with\n * the underlying detail) for seeding failures.\n */\nexport async function setSeed(\n ctx: ConjureContext,\n seed: _OntologySeed,\n): Promise<_SetSeedResponse> {\n return conjureFetch(ctx, `/seed`, \"PUT\", seed);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,YAAY,QAA6B,cAAc;AAOhE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,OAAOA,CAC3BC,GAAmB,EACnBC,IAAmB,EACQ;EAC3B,OAAOH,YAAY,CAACE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAEC,IAAI,CAAC;AAChD","ignoreList":[]}
@@ -0,0 +1,19 @@
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
+ /**/
18
+ export { setSeed } from "./OntologySeedingService/setSeed.js";
19
+ //# sourceMappingURL=OntologySeedingService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OntologySeedingService.js","names":["setSeed"],"sources":["OntologySeedingService.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\n/**/\nexport { setSeed } from \"./OntologySeedingService/setSeed.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,OAAO,QAAQ,qCAAqC","ignoreList":[]}
@@ -0,0 +1,25 @@
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
+ /**/
18
+ import { conjureFetch } from "conjure-lite";
19
+ /**
20
+ * Return the current status of all services.
21
+ */
22
+ export async function getStatus(ctx) {
23
+ return conjureFetch(ctx, `/status`, "GET");
24
+ }
25
+ //# sourceMappingURL=getStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getStatus.js","names":["conjureFetch","getStatus","ctx"],"sources":["getStatus.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\n/**/\nimport { conjureFetch, type ConjureContext } from \"conjure-lite\";\n\nimport type { ServiceStatus as _ServiceStatus } from \"../__components.js\";\n\n/**\n * Return the current status of all services.\n */\nexport async function getStatus(\n ctx: ConjureContext,\n): Promise<Array<_ServiceStatus>> {\n return conjureFetch(ctx, `/status`, \"GET\");\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,YAAY,QAA6B,cAAc;AAIhE;AACA;AACA;AACA,OAAO,eAAeC,SAASA,CAC7BC,GAAmB,EACa;EAChC,OAAOF,YAAY,CAACE,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC;AAC5C","ignoreList":[]}
@@ -0,0 +1,26 @@
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
+ /**/
18
+ import { conjureFetch } from "conjure-lite";
19
+ /**
20
+ * Publish a lifecycle event. Called by services whenever a status
21
+ * transition occurs.
22
+ */
23
+ export async function publishStatus(ctx, status) {
24
+ return conjureFetch(ctx, `/status`, "POST", status);
25
+ }
26
+ //# sourceMappingURL=publishStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publishStatus.js","names":["conjureFetch","publishStatus","ctx","status"],"sources":["publishStatus.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\n/**/\nimport { conjureFetch, type ConjureContext } from \"conjure-lite\";\n\nimport type { ServiceStatus as _ServiceStatus } from \"../__components.js\";\n\n/**\n * Publish a lifecycle event. Called by services whenever a status\n * transition occurs.\n */\nexport async function publishStatus(\n ctx: ConjureContext,\n status: _ServiceStatus,\n): Promise<void> {\n return conjureFetch(ctx, `/status`, \"POST\", status);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,YAAY,QAA6B,cAAc;AAIhE;AACA;AACA;AACA;AACA,OAAO,eAAeC,aAAaA,CACjCC,GAAmB,EACnBC,MAAsB,EACP;EACf,OAAOH,YAAY,CAACE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAEC,MAAM,CAAC;AACrD","ignoreList":[]}
@@ -0,0 +1,20 @@
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
+ /**/
18
+ export { publishStatus } from "./StatusService/publishStatus.js";
19
+ export { getStatus } from "./StatusService/getStatus.js";
20
+ //# sourceMappingURL=StatusService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusService.js","names":["publishStatus","getStatus"],"sources":["StatusService.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\n/**/\nexport { publishStatus } from \"./StatusService/publishStatus.js\";\nexport { getStatus } from \"./StatusService/getStatus.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,aAAa,QAAQ,kCAAkC;AAChE,SAASC,SAAS,QAAQ,8BAA8B","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=__components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__components.js","names":[],"sources":["__components.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\n/**/\n\n/**\n * Marketplace bundling settings; CLI flags override these values when provided\n */\nexport interface BundleConfig {\n associatedRid?: string | null | undefined;\n description: string;\n installMode: InstallMode;\n mavenCoordinate?: string | null | undefined;\n name: string;\n salt?: string | null | undefined;\n}\n/**\n * A single component declared in a superrepo's `foundry.yml`.\n */\nexport interface Component {\n path: string;\n type: ServiceName;\n}\n/**\n * Runtime metadata published by a started preview service so\n * other services in the superrepo can locate it. Each running\n * service writes a file at\n * `<foundry.yml dir>/.palantir/.<service-name>-discovery.json`\n * (kebab-cased `ServiceName`). Readers treat the file as stale\n * if the recorded process is no longer alive.\n */\nexport interface ComponentDiscovery {\n caCertPath?: string | null | undefined;\n pid: number;\n processStartTimeSecs: number;\n url: string;\n}\nexport interface FoundryBackendError {\n backtrace?: string | null | undefined;\n errorInstanceId?: string | null | undefined;\n errorName: string;\n message: string;\n}\n/**\n * Project-level configuration loaded from `foundry.yml`.\n * Contains repo-wide settings and a list of products. Single-product\n * foundry.yml files (with top-level `components`) are normalized into\n * this shape at load time with one product.\n */\nexport interface FoundryConfig {\n functionsTypescriptRuntimeVersion?: string | null | undefined;\n minCliVersion: string;\n platformApiProxy?: PlatformApiProxyConfig | null | undefined;\n products: Array<ProductConfig>;\n}\nexport interface GenericFoundryCliError {\n errorName: string;\n message: string;\n}\n/**\n * A single import entry. All fields are optional so the schema can\n * be extended with new import kinds without breaking existing\n * manifests.\n */\nexport interface ImportConfig {\n ontology?: string | null | undefined;\n}\n/**\n * Install strategy for a marketplace block set.\n */\nexport type InstallMode = \"PRODUCTION\" | \"BOOTSTRAP\" | \"SINGLETON\";\n\n/**\n * A single seed object's property bag: keys are property API names,\n * values are the corresponding property values. Serializes to\n * `Record<string, unknown>` in the OSDK `SeedOutput`.\n */\nexport type ObjectSeed = Record<string, SeedPropertyValue>;\n\n/**\n * The seed state of a local ontology. Mirrors the `SeedOutput`\n * shape produced by the OSDK seed helpers (palantir/osdk-ts,\n * `packages/seed-helpers/src/types.ts`): the seed objects keyed by\n * object-type API name, plus the links between them.\n */\nexport interface OntologySeed {\n links: Array<SeedLinkEntry>;\n objects: Record<string, Array<ObjectSeed>>;\n}\n/**\n * Routing rules consumed by `foundry start platform-api-proxy`.\n * Both lists default to empty when omitted.\n */\nexport interface PlatformApiProxyConfig {\n ontologyFoundryFallback: Array<PlatformApiProxyRoute>;\n passthrough: Array<PlatformApiProxyRoute>;\n}\n/**\n * A path glob plus the HTTP methods that may match.\n */\nexport interface PlatformApiProxyRoute {\n methods: Array<string>;\n path: string;\n}\n/**\n * A single product within a superrepo.\n */\nexport interface ProductConfig {\n apiNamespace: string;\n bundle?: BundleConfig | null | undefined;\n components: Array<Component>;\n contentSecurityPolicyAdditions?:\n | Record<string, Array<string>>\n | null\n | undefined;\n imports?: Array<ImportConfig> | null | undefined;\n includeInBundle?: boolean | null | undefined;\n osdkOutput: string;\n}\nexport interface PythonArtifactsChannel {\n channel: string;\n name: string;\n}\nexport interface PythonDependencyChannels {\n conda: Array<PythonArtifactsChannel>;\n pip: Array<PythonArtifactsChannel>;\n}\n/**\n * A single link instance between two seeded objects.\n */\nexport interface SeedLinkEntry {\n linkType: string;\n name: string;\n sourceKey: string;\n sourceObjectType: string;\n targetKey: string;\n targetObjectType: string;\n}\n/**\n * A single property value within a seed object. Opaque JSON whose\n * concrete shape depends on the object type's property definitions.\n */\nexport type SeedPropertyValue = any;\nexport interface SerializableFoundryCliError_foundryBackendError {\n type: \"foundryBackendError\";\n foundryBackendError: FoundryBackendError;\n}\n\nexport interface SerializableFoundryCliError_genericFoundryCliError {\n type: \"genericFoundryCliError\";\n genericFoundryCliError: GenericFoundryCliError;\n}\n\nexport interface SerializableFoundryCliError_unsupportedFeaturesError {\n type: \"unsupportedFeaturesError\";\n unsupportedFeaturesError: UnsupportedFeaturesError;\n}\n\nexport interface SerializableFoundryCliError_unsupportedTemplateTypeError {\n type: \"unsupportedTemplateTypeError\";\n unsupportedTemplateTypeError: UnsupportedTemplateTypeError;\n}\nexport type SerializableFoundryCliError =\n | SerializableFoundryCliError_foundryBackendError\n | SerializableFoundryCliError_genericFoundryCliError\n | SerializableFoundryCliError_unsupportedFeaturesError\n | SerializableFoundryCliError_unsupportedTemplateTypeError;\n\n/**\n * Unified lifecycle stages shared by all services. Each service uses\n * the stages that apply to it.\n */\nexport type ServiceLifecycle =\n | \"PREPARING\"\n | \"READY\"\n | \"FAILED\"\n | \"STARTING\"\n | \"STOPPED\";\n\n/**\n * The kinds of services managed by Foundry. ONTOLOGY,\n * TYPESCRIPT_FUNCTIONS, PYTHON_FUNCTIONS, and APP are user-owned\n * component types declared in `foundry.yml`. STATUS_SERVER and\n * PLATFORM_API_PROXY are internal Foundry-managed services started\n * implicitly by the CLI and must not be declared in `foundry.yml`.\n */\nexport type ServiceName =\n | \"ONTOLOGY\"\n | \"TYPESCRIPT_FUNCTIONS\"\n | \"PYTHON_FUNCTIONS\"\n | \"APP\"\n | \"STATUS_SERVER\"\n | \"PLATFORM_API_PROXY\";\n\n/**\n * The status of a service. Published by services on lifecycle\n * transitions (POST /status), and returned by the server as the\n * current snapshot (GET /status).\n */\nexport interface ServiceStatus {\n level: StatusLevel;\n message?: string | null | undefined;\n service: ServiceName;\n status: ServiceLifecycle;\n timestamp: string;\n}\n/**\n * Result of a successful `setSeed` call.\n */\nexport interface SetSeedResponse {}\n/**\n * Severity of a status.\n */\nexport type StatusLevel = \"INFO\" | \"WARN\" | \"ERROR\";\nexport interface UnsupportedFeaturesError {\n messages: Array<string>;\n}\nexport interface UnsupportedTemplateTypeError {\n message: string;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,20 @@
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
+ /**/
18
+ export * as OntologySeedingService from "./OntologySeedingService.js";
19
+ export * as StatusService from "./StatusService.js";
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["OntologySeedingService","StatusService"],"sources":["index.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\n/**/\nexport * as OntologySeedingService from \"./OntologySeedingService.js\";\nexport * as StatusService from \"./StatusService.js\";\n\nexport type {\n BundleConfig,\n Component,\n ComponentDiscovery,\n FoundryBackendError,\n FoundryConfig,\n GenericFoundryCliError,\n ImportConfig,\n InstallMode,\n ObjectSeed,\n OntologySeed,\n PlatformApiProxyConfig,\n PlatformApiProxyRoute,\n ProductConfig,\n PythonArtifactsChannel,\n PythonDependencyChannels,\n SeedLinkEntry,\n SeedPropertyValue,\n SerializableFoundryCliError,\n ServiceLifecycle,\n ServiceName,\n ServiceStatus,\n SetSeedResponse,\n StatusLevel,\n UnsupportedFeaturesError,\n UnsupportedTemplateTypeError,\n} from \"./__components.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,KAAKA,sBAAsB,MAAM,6BAA6B;AACrE,OAAO,KAAKC,aAAa,MAAM,oBAAoB","ignoreList":[]}