@try-works/dsh-model-as-tool 0.1.3 → 0.4.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 (260) hide show
  1. package/bin/dsh-tool-mode-credentials.mjs +20 -0
  2. package/bin/dsh-tool-mode.mjs +202 -0
  3. package/catalog/desert-ant-models.json +693 -693
  4. package/client/client.model-tools.js +614 -0
  5. package/client/index.js +1717 -0
  6. package/lib/adapters/index.d.ts.map +1 -1
  7. package/lib/adapters/index.js +4 -4
  8. package/lib/bindings.d.ts.map +1 -1
  9. package/lib/bindings.js +26 -25
  10. package/lib/capability.d.ts.map +1 -1
  11. package/lib/capability.js +17 -0
  12. package/lib/capture-path.d.ts +97 -0
  13. package/lib/capture-path.d.ts.map +1 -0
  14. package/lib/capture-path.js +152 -0
  15. package/lib/diagnostics.d.ts +166 -0
  16. package/lib/diagnostics.d.ts.map +1 -0
  17. package/lib/diagnostics.js +135 -0
  18. package/lib/extension-dependencies.d.ts +325 -0
  19. package/lib/extension-dependencies.d.ts.map +1 -0
  20. package/lib/extension-dependencies.js +858 -0
  21. package/lib/extension-dispatch.d.ts +117 -0
  22. package/lib/extension-dispatch.d.ts.map +1 -0
  23. package/lib/extension-dispatch.js +124 -0
  24. package/lib/extension-registrar.d.ts +100 -0
  25. package/lib/extension-registrar.d.ts.map +1 -0
  26. package/lib/extension-registrar.js +134 -0
  27. package/lib/extensions-api.d.ts +221 -0
  28. package/lib/extensions-api.d.ts.map +1 -0
  29. package/lib/extensions-api.js +17 -0
  30. package/lib/extensions-remote.d.ts +54 -0
  31. package/lib/extensions-remote.d.ts.map +1 -0
  32. package/lib/extensions-remote.js +66 -0
  33. package/lib/extensions-service.d.ts +367 -0
  34. package/lib/extensions-service.d.ts.map +1 -0
  35. package/lib/extensions-service.js +1527 -0
  36. package/lib/harness-llm.d.ts +138 -0
  37. package/lib/harness-llm.d.ts.map +1 -0
  38. package/lib/harness-llm.js +218 -0
  39. package/lib/harness-serving.d.ts +95 -0
  40. package/lib/harness-serving.d.ts.map +1 -0
  41. package/lib/harness-serving.js +157 -0
  42. package/lib/headless.d.ts +97 -0
  43. package/lib/headless.d.ts.map +1 -0
  44. package/lib/headless.js +349 -0
  45. package/lib/http-acquisition.d.ts +27 -0
  46. package/lib/http-acquisition.d.ts.map +1 -0
  47. package/lib/http-acquisition.js +136 -0
  48. package/lib/index.d.ts +271 -7
  49. package/lib/index.d.ts.map +1 -1
  50. package/lib/index.js +2644 -70
  51. package/lib/invocation-accounting.d.ts +169 -0
  52. package/lib/invocation-accounting.d.ts.map +1 -0
  53. package/lib/invocation-accounting.js +148 -0
  54. package/lib/legacy-migration.d.ts +95 -0
  55. package/lib/legacy-migration.d.ts.map +1 -0
  56. package/lib/legacy-migration.js +429 -0
  57. package/lib/managed-workers.d.ts +151 -0
  58. package/lib/managed-workers.d.ts.map +1 -0
  59. package/lib/managed-workers.js +249 -0
  60. package/lib/mcp/client-grant.d.ts +74 -0
  61. package/lib/mcp/client-grant.d.ts.map +1 -0
  62. package/lib/mcp/client-grant.js +60 -0
  63. package/lib/mcp/credential-cli.d.ts +38 -0
  64. package/lib/mcp/credential-cli.d.ts.map +1 -0
  65. package/lib/mcp/credential-cli.js +148 -0
  66. package/lib/mcp/credential-store.d.ts +143 -0
  67. package/lib/mcp/credential-store.d.ts.map +1 -0
  68. package/lib/mcp/credential-store.js +454 -0
  69. package/lib/mcp/host-binding.d.ts +25 -0
  70. package/lib/mcp/host-binding.d.ts.map +1 -1
  71. package/lib/mcp/host-binding.js +107 -14
  72. package/lib/mcp/http.d.ts +68 -18
  73. package/lib/mcp/http.d.ts.map +1 -1
  74. package/lib/mcp/http.js +390 -62
  75. package/lib/mcp/oauth.d.ts +149 -0
  76. package/lib/mcp/oauth.d.ts.map +1 -0
  77. package/lib/mcp/oauth.js +396 -0
  78. package/lib/mcp/protocol.d.ts +46 -7
  79. package/lib/mcp/protocol.d.ts.map +1 -1
  80. package/lib/mcp/protocol.js +63 -16
  81. package/lib/mcp/rate-limit.d.ts +68 -0
  82. package/lib/mcp/rate-limit.d.ts.map +1 -0
  83. package/lib/mcp/rate-limit.js +114 -0
  84. package/lib/mcp/sdk-v2.d.ts +17 -0
  85. package/lib/mcp/sdk-v2.d.ts.map +1 -0
  86. package/lib/mcp/sdk-v2.js +181 -0
  87. package/lib/mcp/server.d.ts +11 -1
  88. package/lib/mcp/server.d.ts.map +1 -1
  89. package/lib/mcp/server.js +80 -13
  90. package/lib/mcp/stdio.d.ts.map +1 -1
  91. package/lib/mcp/stdio.js +9 -1
  92. package/lib/mcp/subscriptions.d.ts +43 -1
  93. package/lib/mcp/subscriptions.d.ts.map +1 -1
  94. package/lib/mcp/subscriptions.js +90 -9
  95. package/lib/model-qualification.d.ts +192 -0
  96. package/lib/model-qualification.d.ts.map +1 -0
  97. package/lib/model-qualification.js +178 -0
  98. package/lib/planning.d.ts +246 -0
  99. package/lib/planning.d.ts.map +1 -0
  100. package/lib/planning.js +457 -0
  101. package/lib/prepared-assets.d.ts +178 -0
  102. package/lib/prepared-assets.d.ts.map +1 -0
  103. package/lib/prepared-assets.js +286 -0
  104. package/lib/provider-bridge.d.ts +37 -0
  105. package/lib/provider-bridge.d.ts.map +1 -1
  106. package/lib/provider-bridge.js +189 -12
  107. package/lib/ptc-authority.d.ts +140 -0
  108. package/lib/ptc-authority.d.ts.map +1 -0
  109. package/lib/ptc-authority.js +216 -0
  110. package/lib/ptc-runtime.d.ts +156 -0
  111. package/lib/ptc-runtime.d.ts.map +1 -0
  112. package/lib/ptc-runtime.js +191 -0
  113. package/lib/publication.d.ts +2 -1
  114. package/lib/publication.d.ts.map +1 -1
  115. package/lib/publication.js +13 -5
  116. package/lib/receipt.d.ts.map +1 -1
  117. package/lib/receipt.js +8 -0
  118. package/lib/title-proposal.d.ts +194 -0
  119. package/lib/title-proposal.d.ts.map +1 -0
  120. package/lib/title-proposal.js +244 -0
  121. package/lib/tool-mode-run.d.ts +235 -0
  122. package/lib/tool-mode-run.d.ts.map +1 -0
  123. package/lib/tool-mode-run.js +283 -0
  124. package/lib/types.d.ts +3 -1
  125. package/lib/types.d.ts.map +1 -1
  126. package/lib/update-surface.d.ts +79 -0
  127. package/lib/update-surface.d.ts.map +1 -0
  128. package/lib/update-surface.js +224 -0
  129. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/standard.d.ts +38 -0
  130. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/standard.d.ts.map +1 -0
  131. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/standard.js +445 -0
  132. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-embed.d.ts +14 -0
  133. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-embed.d.ts.map +1 -0
  134. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-embed.js +63 -0
  135. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-rerank.d.ts +14 -0
  136. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-rerank.d.ts.map +1 -0
  137. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-rerank.js +76 -0
  138. package/node_modules/@try-works/tool-mode-contracts/lib/dsh.d.ts.map +1 -1
  139. package/node_modules/@try-works/tool-mode-contracts/lib/dsh.js +69 -55
  140. package/node_modules/@try-works/tool-mode-contracts/lib/index.d.ts +4 -1
  141. package/node_modules/@try-works/tool-mode-contracts/lib/index.d.ts.map +1 -1
  142. package/node_modules/@try-works/tool-mode-contracts/lib/index.js +26 -2
  143. package/node_modules/@try-works/tool-mode-contracts/lib/registry.d.ts +28 -2
  144. package/node_modules/@try-works/tool-mode-contracts/lib/registry.d.ts.map +1 -1
  145. package/node_modules/@try-works/tool-mode-contracts/lib/registry.js +93 -10
  146. package/node_modules/@try-works/tool-mode-contracts/package.json +0 -1
  147. package/node_modules/@try-works/tool-mode-extension-sdk/bin/dsh-tool-mode.mjs +20 -0
  148. package/node_modules/@try-works/tool-mode-extension-sdk/lib/cli.d.ts +80 -0
  149. package/node_modules/@try-works/tool-mode-extension-sdk/lib/cli.d.ts.map +1 -0
  150. package/node_modules/@try-works/tool-mode-extension-sdk/lib/cli.js +533 -0
  151. package/node_modules/@try-works/tool-mode-extension-sdk/lib/declarative-recipes.d.ts +83 -0
  152. package/node_modules/@try-works/tool-mode-extension-sdk/lib/declarative-recipes.d.ts.map +1 -0
  153. package/node_modules/@try-works/tool-mode-extension-sdk/lib/declarative-recipes.js +125 -0
  154. package/node_modules/@try-works/tool-mode-extension-sdk/lib/discovery.d.ts +70 -0
  155. package/node_modules/@try-works/tool-mode-extension-sdk/lib/discovery.d.ts.map +1 -0
  156. package/node_modules/@try-works/tool-mode-extension-sdk/lib/discovery.js +201 -0
  157. package/node_modules/@try-works/tool-mode-extension-sdk/lib/errors.d.ts +57 -0
  158. package/node_modules/@try-works/tool-mode-extension-sdk/lib/errors.d.ts.map +1 -0
  159. package/node_modules/@try-works/tool-mode-extension-sdk/lib/errors.js +83 -0
  160. package/node_modules/@try-works/tool-mode-extension-sdk/lib/index.d.ts +32 -0
  161. package/node_modules/@try-works/tool-mode-extension-sdk/lib/index.d.ts.map +1 -0
  162. package/node_modules/@try-works/tool-mode-extension-sdk/lib/index.js +32 -0
  163. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/archive.d.ts +86 -0
  164. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/archive.d.ts.map +1 -0
  165. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/archive.js +191 -0
  166. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/dependencies.d.ts +126 -0
  167. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/dependencies.d.ts.map +1 -0
  168. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/dependencies.js +297 -0
  169. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/lifecycle.d.ts +216 -0
  170. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/lifecycle.d.ts.map +1 -0
  171. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/lifecycle.js +800 -0
  172. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/migration.d.ts +210 -0
  173. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/migration.d.ts.map +1 -0
  174. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/migration.js +368 -0
  175. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/runtime-link.d.ts +63 -0
  176. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/runtime-link.d.ts.map +1 -0
  177. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/runtime-link.js +149 -0
  178. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/source-directory.d.ts +35 -0
  179. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/source-directory.d.ts.map +1 -0
  180. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/source-directory.js +179 -0
  181. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/staged.d.ts +179 -0
  182. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/staged.d.ts.map +1 -0
  183. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/staged.js +235 -0
  184. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/store.d.ts +367 -0
  185. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/store.d.ts.map +1 -0
  186. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/store.js +807 -0
  187. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/tar-gzip-source.d.ts +44 -0
  188. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/tar-gzip-source.d.ts.map +1 -0
  189. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/tar-gzip-source.js +243 -0
  190. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/update-flow.d.ts +185 -0
  191. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/update-flow.d.ts.map +1 -0
  192. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/update-flow.js +504 -0
  193. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/zip-source.d.ts +17 -0
  194. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/zip-source.d.ts.map +1 -0
  195. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/zip-source.js +80 -0
  196. package/node_modules/@try-works/tool-mode-extension-sdk/lib/load.d.ts +52 -0
  197. package/node_modules/@try-works/tool-mode-extension-sdk/lib/load.d.ts.map +1 -0
  198. package/node_modules/@try-works/tool-mode-extension-sdk/lib/load.js +102 -0
  199. package/node_modules/@try-works/tool-mode-extension-sdk/lib/manifest.d.ts +171 -0
  200. package/node_modules/@try-works/tool-mode-extension-sdk/lib/manifest.d.ts.map +1 -0
  201. package/node_modules/@try-works/tool-mode-extension-sdk/lib/manifest.js +271 -0
  202. package/node_modules/@try-works/tool-mode-extension-sdk/lib/runtime.d.ts +242 -0
  203. package/node_modules/@try-works/tool-mode-extension-sdk/lib/runtime.d.ts.map +1 -0
  204. package/node_modules/@try-works/tool-mode-extension-sdk/lib/runtime.js +58 -0
  205. package/node_modules/@try-works/tool-mode-extension-sdk/lib/state.d.ts +118 -0
  206. package/node_modules/@try-works/tool-mode-extension-sdk/lib/state.d.ts.map +1 -0
  207. package/node_modules/@try-works/tool-mode-extension-sdk/lib/state.js +113 -0
  208. package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker/worker-child.d.ts +2 -0
  209. package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker/worker-child.d.ts.map +1 -0
  210. package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker/worker-child.js +351 -0
  211. package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker.d.ts +150 -0
  212. package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker.d.ts.map +1 -0
  213. package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker.js +670 -0
  214. package/node_modules/@try-works/tool-mode-extension-sdk/package.json +53 -0
  215. package/node_modules/@try-works/tool-mode-extension-sdk/schema/extension-manifest-1.1.0.schema.json +253 -0
  216. package/node_modules/@try-works/tool-mode-recipes/bin/tool-mode-recipe.mjs +15 -0
  217. package/node_modules/@try-works/tool-mode-recipes/lib/broker.d.ts +427 -0
  218. package/node_modules/@try-works/tool-mode-recipes/lib/broker.d.ts.map +1 -0
  219. package/node_modules/@try-works/tool-mode-recipes/lib/broker.js +592 -0
  220. package/node_modules/@try-works/tool-mode-recipes/lib/cli.d.ts +60 -0
  221. package/node_modules/@try-works/tool-mode-recipes/lib/cli.d.ts.map +1 -0
  222. package/node_modules/@try-works/tool-mode-recipes/lib/cli.js +936 -0
  223. package/node_modules/@try-works/tool-mode-recipes/lib/dsh-adapter.d.ts +237 -0
  224. package/node_modules/@try-works/tool-mode-recipes/lib/dsh-adapter.d.ts.map +1 -0
  225. package/node_modules/@try-works/tool-mode-recipes/lib/dsh-adapter.js +200 -0
  226. package/node_modules/@try-works/tool-mode-recipes/lib/fixture-provider.d.ts +85 -0
  227. package/node_modules/@try-works/tool-mode-recipes/lib/fixture-provider.d.ts.map +1 -0
  228. package/node_modules/@try-works/tool-mode-recipes/lib/fixture-provider.js +176 -0
  229. package/node_modules/@try-works/tool-mode-recipes/lib/images.d.ts +105 -0
  230. package/node_modules/@try-works/tool-mode-recipes/lib/images.d.ts.map +1 -0
  231. package/node_modules/@try-works/tool-mode-recipes/lib/images.js +129 -0
  232. package/node_modules/@try-works/tool-mode-recipes/lib/index.d.ts +25 -0
  233. package/node_modules/@try-works/tool-mode-recipes/lib/index.d.ts.map +1 -0
  234. package/node_modules/@try-works/tool-mode-recipes/lib/index.js +25 -0
  235. package/node_modules/@try-works/tool-mode-recipes/lib/recipe-format.d.ts +325 -0
  236. package/node_modules/@try-works/tool-mode-recipes/lib/recipe-format.d.ts.map +1 -0
  237. package/node_modules/@try-works/tool-mode-recipes/lib/recipe-format.js +1310 -0
  238. package/node_modules/@try-works/tool-mode-recipes/lib/templates.d.ts +51 -0
  239. package/node_modules/@try-works/tool-mode-recipes/lib/templates.d.ts.map +1 -0
  240. package/node_modules/@try-works/tool-mode-recipes/lib/templates.js +310 -0
  241. package/node_modules/@try-works/tool-mode-recipes/lib/titles.d.ts +227 -0
  242. package/node_modules/@try-works/tool-mode-recipes/lib/titles.d.ts.map +1 -0
  243. package/node_modules/@try-works/tool-mode-recipes/lib/titles.js +407 -0
  244. package/node_modules/@try-works/tool-mode-recipes/package.json +56 -0
  245. package/node_modules/@try-works/tool-mode-recipes/recipes/describe-image.json +38 -0
  246. package/node_modules/@try-works/tool-mode-recipes/recipes/text-title.json +45 -0
  247. package/node_modules/@try-works/tool-mode-recipes/schema/harness-model-recipe.schema.json +273 -0
  248. package/package.json +43 -15
  249. package/remote/spec.mjs +462 -0
  250. package/remote/typert.host.mjs +14 -0
  251. package/remote/typert.remote-client.mjs +16 -0
  252. package/lib/adapters/tongue.d.ts +0 -31
  253. package/lib/adapters/tongue.d.ts.map +0 -1
  254. package/lib/adapters/tongue.js +0 -93
  255. package/lib/adapters/voz.d.ts +0 -28
  256. package/lib/adapters/voz.d.ts.map +0 -1
  257. package/lib/adapters/voz.js +0 -102
  258. /package/{lib → node_modules/@try-works/tool-mode-extension-sdk/lib}/licensing.d.ts +0 -0
  259. /package/{lib → node_modules/@try-works/tool-mode-extension-sdk/lib}/licensing.d.ts.map +0 -0
  260. /package/{lib → node_modules/@try-works/tool-mode-extension-sdk/lib}/licensing.js +0 -0
@@ -0,0 +1,140 @@
1
+ /**
2
+ * The authorized tool bindings a PTC program may call (CODE-03, ARCH-01, SEC-03).
3
+ *
4
+ * The directive is specific about this, and about what NOT to do:
5
+ *
6
+ * "ONE authorized-tool-pipeline function feeding both native PTC and external
7
+ * `tool_mode_run` — intersect requested names with the grant and the visible tool set,
8
+ * REJECT unknown/forbidden rather than omit."
9
+ *
10
+ * **Reject rather than omit** is the whole design. A program that asks for a tool it may
11
+ * not have must fail loudly: silently handing it a smaller namespace produces a program
12
+ * that runs, quietly does something other than what it says, and reports success. That is
13
+ * worse than a refusal, because the caller cannot tell the difference.
14
+ *
15
+ * The bindings themselves are built with a **null prototype**, so a program cannot reach
16
+ * `Object.prototype` through a binding name — `toString`, `constructor` and `__proto__`
17
+ * stop being reachable as if they were tools.
18
+ *
19
+ * @module @try-works/dsh-model-as-tool/ptc-authority
20
+ */
21
+ /**
22
+ * One binding a program may call.
23
+ *
24
+ * The shape is what a PTC runtime expects: a function that takes already-validated
25
+ * arguments and returns the tool's canonical value.
26
+ */
27
+ export type ToolBinding = (args: Record<string, unknown>) => Promise<unknown>;
28
+ /** What a program asked for. */
29
+ export interface ProgramRequest {
30
+ /** The tool names the generated program declares it will call. */
31
+ readonly requested: readonly string[];
32
+ }
33
+ /** What the caller is permitted to reach. */
34
+ export interface ProgramAuthority {
35
+ /**
36
+ * The tool names the caller's grant admits.
37
+ *
38
+ * This is the AUTHORIZATION half. A tool absent here is forbidden regardless of whether
39
+ * it is registered.
40
+ */
41
+ readonly granted: readonly string[];
42
+ /**
43
+ * The tool names actually registered right now.
44
+ *
45
+ * This is the AVAILABILITY half, and it is separate: a granted tool whose owning
46
+ * extension is deactivated is not available, while a registered tool the caller has no
47
+ * grant for is not permitted. Only the INTERSECTION is bindable.
48
+ */
49
+ readonly visible: readonly string[];
50
+ }
51
+ /** Why one requested name was refused. */
52
+ export interface BindingRejection {
53
+ readonly name: string;
54
+ readonly reason:
55
+ /** No such tool is registered. */
56
+ 'unknown'
57
+ /** Registered, but the caller's grant does not admit it. */
58
+ | 'forbidden'
59
+ /** Requested more than once, which makes the program ambiguous. */
60
+ | 'duplicate'
61
+ /** Not a usable identifier as a binding name. */
62
+ | 'invalid-name'
63
+ /** CODE-07: never bindable inside a program, regardless of grant. */
64
+ | 'excluded';
65
+ /** What the caller can do about it, when anything. */
66
+ readonly remedy: string;
67
+ }
68
+ /** The outcome of authorizing a program's requested tools. */
69
+ export type AuthorityDecision = {
70
+ readonly ok: true;
71
+ /** The bindings, with a null prototype. */
72
+ readonly bindings: Record<string, ToolBinding>;
73
+ /** The names that were bound, in request order. */
74
+ readonly bound: readonly string[];
75
+ } | {
76
+ readonly ok: false;
77
+ /**
78
+ * EVERY rejection, not the first.
79
+ *
80
+ * A program asking for three tools it cannot have should learn all three in one
81
+ * round rather than being handed the next one each time.
82
+ */
83
+ readonly rejections: readonly BindingRejection[];
84
+ };
85
+ /**
86
+ * Whether a name is usable as a binding.
87
+ *
88
+ * A generated program references bindings as identifiers, so a name that is not a plain
89
+ * identifier cannot be bound — and `__proto__` in particular must never become a key on
90
+ * the map, since assigning it would change the object's prototype rather than add a field.
91
+ * @param name - the candidate name.
92
+ * @returns whether it is usable.
93
+ */
94
+ export declare function isBindableName(name: string): boolean;
95
+ /**
96
+ * Tool names a program binding must NEVER expose, regardless of grant (CODE-07).
97
+ *
98
+ * `tool_mode_run` is the recursive composition door: a program could nest programs, which
99
+ * the requirement forbids in v1. The management surface (`model_tools` and the extension
100
+ * install/activation controls) is operator territory: EXT-32 excludes installer and
101
+ * administration bindings from Code Mode, and SEC-09 keeps installation approval separate
102
+ * from tool-use permission, so a program that could reach them would hold the management
103
+ * grant by proxy.
104
+ *
105
+ * EXPORTED so the planning surface (NDL-02) reuses the SAME names: a `tools_plan`
106
+ * proposal must never target the composition door or the management surface either, and a
107
+ * second, independently maintained copy of this list would drift the first time one of
108
+ * them was edited. One set, two consumers, both refused by name.
109
+ *
110
+ * SEALED AS A FROZEN ARRAY, deliberately not a frozen `Set`: freezing a `Set` does NOT
111
+ * prevent `add`/`delete` (those methods mutate internal slots without consulting
112
+ * extensibility), so a frozen Set would only LOOK immutable. A frozen array throws on
113
+ * every mutation in strict mode, so neither consumer — nor any code holding a
114
+ * reference — can add or remove a name at runtime and silently desynchronize the two
115
+ * surfaces that depend on it.
116
+ */
117
+ export declare const EXCLUDED_BINDINGS: readonly string[];
118
+ /**
119
+ * Build the bindings a program may call (CODE-03, SEC-03).
120
+ *
121
+ * Intersects the requested names with BOTH the grant and the visible set, and refuses the
122
+ * whole request if anything is unattainable — so a program never runs against a smaller
123
+ * namespace than it declared.
124
+ *
125
+ * @param request - what the program asked for.
126
+ * @param authority - what is granted and what is available.
127
+ * @param resolve - resolves one bound name to its implementation.
128
+ * @returns the bindings, or every rejection.
129
+ */
130
+ export declare function authorizeProgramTools(request: ProgramRequest, authority: ProgramAuthority, resolve: (name: string) => ToolBinding | undefined): AuthorityDecision;
131
+ /**
132
+ * Describe a refusal for a caller (CODE-03).
133
+ *
134
+ * Names every rejection and why, because a program author who is told only that the
135
+ * request failed cannot fix it.
136
+ * @param rejections - the refusals.
137
+ * @returns a readable summary.
138
+ */
139
+ export declare function describeRejections(rejections: readonly BindingRejection[]): string;
140
+ //# sourceMappingURL=ptc-authority.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ptc-authority.d.ts","sourceRoot":"","sources":["../src/ptc-authority.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;AAE7E,gCAAgC;AAChC,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;CACtC;AAED,6CAA6C;AAC7C,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CACpC;AAED,0CAA0C;AAC1C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM;IACb,kCAAkC;IAChC,SAAS;IACX,4DAA4D;OAC1D,WAAW;IACb,mEAAmE;OACjE,WAAW;IACb,iDAAiD;OAC/C,cAAc;IAChB,qEAAqE;OACnE,UAAU,CAAA;IACd,sDAAsD;IACtD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,8DAA8D;AAC9D,MAAM,MAAM,iBAAiB,GACzB;IACA,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;IACjB,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IAC9C,mDAAmD;IACnD,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAClC,GACC;IACA,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAA;IAClB;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,SAAS,gBAAgB,EAAE,CAAA;CACjD,CAAA;AAEH;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQpD;AAgCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAAqG,CAAA;AAEpJ;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,WAAW,GAAG,SAAS,GACjD,iBAAiB,CAsGnB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,SAAS,gBAAgB,EAAE,GAAG,MAAM,CAGlF"}
@@ -0,0 +1,216 @@
1
+ /**
2
+ * The authorized tool bindings a PTC program may call (CODE-03, ARCH-01, SEC-03).
3
+ *
4
+ * The directive is specific about this, and about what NOT to do:
5
+ *
6
+ * "ONE authorized-tool-pipeline function feeding both native PTC and external
7
+ * `tool_mode_run` — intersect requested names with the grant and the visible tool set,
8
+ * REJECT unknown/forbidden rather than omit."
9
+ *
10
+ * **Reject rather than omit** is the whole design. A program that asks for a tool it may
11
+ * not have must fail loudly: silently handing it a smaller namespace produces a program
12
+ * that runs, quietly does something other than what it says, and reports success. That is
13
+ * worse than a refusal, because the caller cannot tell the difference.
14
+ *
15
+ * The bindings themselves are built with a **null prototype**, so a program cannot reach
16
+ * `Object.prototype` through a binding name — `toString`, `constructor` and `__proto__`
17
+ * stop being reachable as if they were tools.
18
+ *
19
+ * @module @try-works/dsh-model-as-tool/ptc-authority
20
+ */
21
+ /**
22
+ * Whether a name is usable as a binding.
23
+ *
24
+ * A generated program references bindings as identifiers, so a name that is not a plain
25
+ * identifier cannot be bound — and `__proto__` in particular must never become a key on
26
+ * the map, since assigning it would change the object's prototype rather than add a field.
27
+ * @param name - the candidate name.
28
+ * @returns whether it is usable.
29
+ */
30
+ export function isBindableName(name) {
31
+ if (name.length === 0 || name.length > 64)
32
+ return false;
33
+ if (!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(name))
34
+ return false;
35
+ // Reserved words would produce a program that cannot be generated.
36
+ if (RESERVED_WORDS.has(name))
37
+ return false;
38
+ // Globals a binding must never shadow, because the runtime supplies them.
39
+ if (RESERVED_BINDING_GLOBALS.has(name))
40
+ return false;
41
+ return true;
42
+ }
43
+ /** Words that cannot appear as bindings in the generated language. */
44
+ const RESERVED_WORDS = new Set([
45
+ 'await', 'break', 'case', 'catch', 'class', 'const', 'continue', 'debugger', 'default',
46
+ 'delete', 'do', 'else', 'enum', 'export', 'extends', 'false', 'finally', 'for',
47
+ 'function', 'if', 'import', 'in', 'instanceof', 'new', 'null', 'return', 'super',
48
+ 'switch', 'this', 'throw', 'true', 'try', 'typeof', 'var', 'void', 'while', 'with',
49
+ 'yield', 'let', 'static', 'implements', 'interface', 'package', 'private', 'protected',
50
+ 'public',
51
+ ]);
52
+ /** Globals the runtime supplies, which a binding must not replace. */
53
+ const RESERVED_BINDING_GLOBALS = new Set([
54
+ 'console', 'globalThis', 'process', 'require', 'module', 'exports', 'JSON', 'Math',
55
+ 'Promise', 'Object', 'Array', 'String', 'Number', 'Boolean', 'Date', 'RegExp', 'Error',
56
+ 'Map', 'Set', 'Symbol', 'BigInt', 'Reflect', 'Proxy', 'undefined', 'NaN', 'Infinity',
57
+ 'eval', 'Function', 'arguments', 'prototype', 'constructor', '__proto__',
58
+ /**
59
+ * EVERY `Object.prototype` member, named explicitly.
60
+ *
61
+ * These are not globals and not reserved words, so a check for those two categories
62
+ * alone lets them through — and they are exactly the names a program probes for. Even
63
+ * with a null-prototype map, refusing them BY NAME means a name that resolves to
64
+ * inherited behaviour can never be bound, rather than depending on the map's prototype
65
+ * staying null forever.
66
+ */
67
+ 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf',
68
+ 'propertyIsEnumerable', '__defineGetter__', '__defineSetter__', '__lookupGetter__',
69
+ '__lookupSetter__',
70
+ ]);
71
+ /**
72
+ * Tool names a program binding must NEVER expose, regardless of grant (CODE-07).
73
+ *
74
+ * `tool_mode_run` is the recursive composition door: a program could nest programs, which
75
+ * the requirement forbids in v1. The management surface (`model_tools` and the extension
76
+ * install/activation controls) is operator territory: EXT-32 excludes installer and
77
+ * administration bindings from Code Mode, and SEC-09 keeps installation approval separate
78
+ * from tool-use permission, so a program that could reach them would hold the management
79
+ * grant by proxy.
80
+ *
81
+ * EXPORTED so the planning surface (NDL-02) reuses the SAME names: a `tools_plan`
82
+ * proposal must never target the composition door or the management surface either, and a
83
+ * second, independently maintained copy of this list would drift the first time one of
84
+ * them was edited. One set, two consumers, both refused by name.
85
+ *
86
+ * SEALED AS A FROZEN ARRAY, deliberately not a frozen `Set`: freezing a `Set` does NOT
87
+ * prevent `add`/`delete` (those methods mutate internal slots without consulting
88
+ * extensibility), so a frozen Set would only LOOK immutable. A frozen array throws on
89
+ * every mutation in strict mode, so neither consumer — nor any code holding a
90
+ * reference — can add or remove a name at runtime and silently desynchronize the two
91
+ * surfaces that depend on it.
92
+ */
93
+ export const EXCLUDED_BINDINGS = Object.freeze(['tool_mode_run', 'model_tools', 'tool_mode_list', 'tool_mode_describe']);
94
+ /**
95
+ * Build the bindings a program may call (CODE-03, SEC-03).
96
+ *
97
+ * Intersects the requested names with BOTH the grant and the visible set, and refuses the
98
+ * whole request if anything is unattainable — so a program never runs against a smaller
99
+ * namespace than it declared.
100
+ *
101
+ * @param request - what the program asked for.
102
+ * @param authority - what is granted and what is available.
103
+ * @param resolve - resolves one bound name to its implementation.
104
+ * @returns the bindings, or every rejection.
105
+ */
106
+ export function authorizeProgramTools(request, authority, resolve) {
107
+ const granted = new Set(authority.granted);
108
+ const visible = new Set(authority.visible);
109
+ const rejections = [];
110
+ const seen = new Set();
111
+ const bound = [];
112
+ for (const name of request.requested) {
113
+ if (!isBindableName(name)) {
114
+ rejections.push({
115
+ name,
116
+ reason: 'invalid-name',
117
+ remedy: 'A binding name must be a plain identifier that is not a reserved word, a runtime global or __proto__.',
118
+ });
119
+ continue;
120
+ }
121
+ if (seen.has(name)) {
122
+ rejections.push({
123
+ name,
124
+ reason: 'duplicate',
125
+ remedy: 'Request each tool once; a repeated name makes the generated bindings ambiguous.',
126
+ });
127
+ continue;
128
+ }
129
+ seen.add(name);
130
+ /**
131
+ * CODE-07 EXCLUSIONS ARE CHECKED FIRST.
132
+ *
133
+ * These names are un-bindable by policy, not by grant state: whether the caller's
134
+ * grant admits them is irrelevant, because a program must never hold the composition
135
+ * door or the management surface regardless of who authorizes it.
136
+ */
137
+ if (EXCLUDED_BINDINGS.includes(name)) {
138
+ rejections.push({
139
+ name,
140
+ reason: 'excluded',
141
+ remedy: `"${name}" cannot be called from a program: recursive composition and management bindings are excluded from Code Mode (CODE-07).`,
142
+ });
143
+ continue;
144
+ }
145
+ /**
146
+ * FORBIDDEN IS CHECKED BEFORE UNKNOWN, deliberately.
147
+ *
148
+ * A caller probing for names it has no grant for must be told "forbidden" rather than
149
+ * "unknown": telling it a tool does not exist would let it infer the difference
150
+ * between a name that is absent and a name it may not use, and the second is
151
+ * information the caller has not earned.
152
+ */
153
+ if (!granted.has(name)) {
154
+ rejections.push({
155
+ name,
156
+ reason: 'forbidden',
157
+ remedy: 'Request only tools this invocation is authorized for; the grant is not widened by asking.',
158
+ });
159
+ continue;
160
+ }
161
+ if (!visible.has(name)) {
162
+ rejections.push({
163
+ name,
164
+ reason: 'unknown',
165
+ remedy: 'The tool is authorized but not currently registered; its owning extension may be deactivated.',
166
+ });
167
+ continue;
168
+ }
169
+ if (resolve(name) === undefined) {
170
+ rejections.push({
171
+ name,
172
+ reason: 'unknown',
173
+ remedy: 'No implementation is bound for this name.',
174
+ });
175
+ continue;
176
+ }
177
+ bound.push(name);
178
+ }
179
+ if (rejections.length > 0) {
180
+ // ALL OR NOTHING. Binding the reachable subset would run a program that does not do
181
+ // what it declares, which is the failure mode this refusal exists to prevent.
182
+ return { ok: false, rejections };
183
+ }
184
+ /**
185
+ * A NULL-PROTOTYPE map, built with `defineProperty`.
186
+ *
187
+ * A plain object literal would inherit `toString`, `constructor` and friends, so a
188
+ * program referencing `toString()` would reach `Object.prototype` instead of failing.
189
+ * A null prototype removes that path entirely rather than filtering the names that use
190
+ * it.
191
+ */
192
+ const bindings = Object.create(null);
193
+ for (const name of bound) {
194
+ const binding = resolve(name);
195
+ Object.defineProperty(bindings, name, {
196
+ value: binding,
197
+ enumerable: true,
198
+ writable: false,
199
+ configurable: false,
200
+ });
201
+ }
202
+ return { ok: true, bindings, bound };
203
+ }
204
+ /**
205
+ * Describe a refusal for a caller (CODE-03).
206
+ *
207
+ * Names every rejection and why, because a program author who is told only that the
208
+ * request failed cannot fix it.
209
+ * @param rejections - the refusals.
210
+ * @returns a readable summary.
211
+ */
212
+ export function describeRejections(rejections) {
213
+ const lines = rejections.map(entry => ` ${entry.name}: ${entry.reason} — ${entry.remedy}`);
214
+ return `the program requested tools it may not use:\n${lines.join('\n')}`;
215
+ }
216
+ //# sourceMappingURL=ptc-authority.js.map
@@ -0,0 +1,156 @@
1
+ /**
2
+ * PTC runtime integration: a guarded mount and the ONE authorized tool pipeline.
3
+ *
4
+ * The directive is explicit that this is repository work, not a missing upstream product:
5
+ *
6
+ * "Use the existing `@deepseek-ai/dsh-ptc-runtime` interface and a compatible
7
+ * `@deepseek-ai/dsh-ptc-runtime-node` backend. Compose its filesystem, subprocess,
8
+ * sandbox, and policy dependencies. **Do not call `ctx.ptcRuntime` without mounting a
9
+ * provider and then report the missing service as an unavailable upstream product.**"
10
+ *
11
+ * "Native DSH PTC and external `tool_mode_run` must use the SAME authorized tool
12
+ * pipeline."
13
+ *
14
+ * Two facts shape the mount, both discovered by reading the DSH source rather than guessed:
15
+ *
16
+ * 1. **The base bundle already mounts a provider.** `packages/bundle/base/cordis.patch.yml`
17
+ * registers `@deepseek-ai/dsh-ptc-runtime-node`, so an UNGUARDED `ctx.plugin(...)`
18
+ * throws `service "ptcRuntime" has been registered at <...>`. The guard is mandatory in
19
+ * both outcomes, so it is not conditional on which host this finds.
20
+ * 2. **The composed services are the inject list**, not something the plugin supplies:
21
+ * `static inject = ['fs','subprocess','sandbox','sandboxPolicy']`. Mounting them here
22
+ * would hit the same duplicate-service throw.
23
+ *
24
+ * Everything that touches Cordis or DSH is INJECTED, so the guard logic and the authorized
25
+ * pipeline are testable without a live runtime.
26
+ *
27
+ * @module @try-works/dsh-model-as-tool/ptc-runtime
28
+ */
29
+ import { type ProgramAuthority, type ToolBinding } from './ptc-authority.ts';
30
+ /** The service key the abstract runtime registers itself under. */
31
+ export declare const PTC_SERVICE = "ptcRuntime";
32
+ /** A Cordis-like context, narrowed to what this module needs. */
33
+ export interface PtcHostContext {
34
+ /** Resolve a service, or `undefined` when nothing provides it. */
35
+ get(service: string): unknown;
36
+ /** Mount a plugin. */
37
+ plugin(plugin: unknown, config?: Record<string, unknown>): Promise<unknown> | unknown;
38
+ }
39
+ /** What a mount attempt did. */
40
+ export interface MountOutcome {
41
+ /**
42
+ * Whether this call performed the mount.
43
+ *
44
+ * `false` means the host ALREADY had a provider, which is the expected case inside a
45
+ * full DSH deployment and is a SUCCESS rather than a skip — the distinction is what
46
+ * stops "already present" being reported as "unavailable".
47
+ */
48
+ readonly mounted: boolean;
49
+ /** Why it did not mount, when it did not. */
50
+ readonly reason?: 'already-provided' | 'backend-unavailable';
51
+ /** The service that is now usable, whichever path produced it. */
52
+ readonly service: string;
53
+ }
54
+ /**
55
+ * Mount the Node PTC backend, but only when nothing already provides the service.
56
+ *
57
+ * @param ctx - the host context.
58
+ * @param backend - the backend plugin, or `undefined` when it could not be resolved.
59
+ * @param config - backend configuration.
60
+ * @returns what happened.
61
+ */
62
+ export declare function mountPtcRuntimeIfAbsent(ctx: PtcHostContext, backend: unknown, config?: Record<string, unknown>): Promise<MountOutcome>;
63
+ /** The default budgets, mirroring the backend's own documented defaults. */
64
+ export declare const PTC_DEFAULT_BUDGETS: {
65
+ readonly timeoutMs: 120000;
66
+ readonly maxTimeoutMs: 600000;
67
+ readonly maxOutputBytes: number;
68
+ readonly maxOldGenerationSizeMb: 512;
69
+ };
70
+ /** One authorized binding, ready to expose to a program. */
71
+ export interface BindingNamespace {
72
+ /** The global the program sees, e.g. `tools`. */
73
+ readonly global: string;
74
+ readonly functions: Record<string, ToolBinding>;
75
+ }
76
+ /** A request to build the program-visible bindings. */
77
+ export interface BindingRequest {
78
+ /** The tool names the program declares it will call. */
79
+ readonly requested: readonly string[];
80
+ /** What is granted and what is visible. */
81
+ readonly authority: ProgramAuthority;
82
+ /** The global identifier the program sees. */
83
+ readonly global?: string;
84
+ /**
85
+ * Resolves one tool name to a binding.
86
+ *
87
+ * The CALLER supplies this so that native PTC and external `tool_mode_run` reach tools
88
+ * through the same execution function rather than through two implementations of it.
89
+ */
90
+ readonly resolve: (name: string) => ToolBinding | undefined;
91
+ }
92
+ /** The outcome of building bindings. */
93
+ export type BindingOutcome = {
94
+ readonly ok: true;
95
+ readonly namespace: BindingNamespace;
96
+ } | {
97
+ readonly ok: false;
98
+ readonly message: string;
99
+ };
100
+ /**
101
+ * Build the namespace a program may call (CODE-03, SEC-03).
102
+ *
103
+ * Refuses the WHOLE request when any name is unattainable, so a program never runs against
104
+ * a smaller namespace than it declares.
105
+ *
106
+ * @param request - what to bind.
107
+ * @returns the namespace, or the refusal message.
108
+ */
109
+ export declare function buildToolBindings(request: BindingRequest): BindingOutcome;
110
+ /**
111
+ * The budgets a run is admitted with (RES-10).
112
+ *
113
+ * A requested budget is clamped to the ceiling rather than refused: a caller asking for
114
+ * longer than policy allows gets policy's figure, which is the direction that cannot be
115
+ * widened by asking.
116
+ * @param requestedMs - what the caller asked for, if anything.
117
+ * @returns the admitted budget.
118
+ */
119
+ export declare function admitTimeout(requestedMs: number | null | undefined): number;
120
+ /** The current confinement evidence (CODE-09). */
121
+ export declare function confinementDemonstrated(): boolean;
122
+ /**
123
+ * Set the confinement evidence (TEST SEAM, CODE-09).
124
+ *
125
+ * The setter is the seam the acceptance test uses. It is inert — throws without
126
+ * moving anything — unless the process carries the explicit environment marker,
127
+ * so the built artifact cannot have the gate opened by code that merely imports
128
+ * it. A production build never sets the marker.
129
+ * @param value - the evidence state to adopt.
130
+ */
131
+ export declare function setConfinementDemonstratedForTest(value: boolean): void;
132
+ /**
133
+ * Whether generated-code execution may be exposed to callers (CODE-08, CODE-10).
134
+ *
135
+ * Exposure is the CONJUNCTION of two independent facts, and neither can stand in
136
+ * for the other:
137
+ *
138
+ * - CODE-09: the specification's confinement tests must have passed. They have
139
+ * not run here, so this half is false — no configuration can open it.
140
+ * - CODE-10: the OPERATOR must have granted hosted code execution, which is a
141
+ * separate consent from ordinary model-tool access. The caller passes the
142
+ * operator's grant in, so the gate has a real input rather than being a literal.
143
+ *
144
+ * A host with the grant flipped but no confinement evidence stays closed; a host
145
+ * with confinement evidence but no operator grant stays closed too.
146
+ * @param operatorGranted - whether the operator granted hosted code execution.
147
+ * @returns whether a caller may be served.
148
+ */
149
+ export declare function mayExposeToClients(operatorGranted: boolean): boolean;
150
+ /**
151
+ * Describe why generated-code execution is withheld, naming WHICH fact is unmet.
152
+ * @param operatorGranted - whether the operator granted hosted code execution.
153
+ * @returns the reason callers are given.
154
+ */
155
+ export declare function exposureWithheldReason(operatorGranted: boolean): string;
156
+ //# sourceMappingURL=ptc-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ptc-runtime.d.ts","sourceRoot":"","sources":["../src/ptc-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAA;AAE3B,mEAAmE;AACnE,eAAO,MAAM,WAAW,eAAe,CAAA;AAEvC,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;IAC7B,sBAAsB;IACtB,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAA;CACtF;AAED,gCAAgC;AAChC,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,qBAAqB,CAAA;IAC5D,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,OAAO,EAChB,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACnC,OAAO,CAAC,YAAY,CAAC,CAkBvB;AAED,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB;;;;;CAKtB,CAAA;AAEV,4DAA4D;AAC5D,MAAM,WAAW,gBAAgB;IAC/B,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CAChD;AAED,uDAAuD;AACvD,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC,2CAA2C;IAC3C,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAA;IACpC,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,WAAW,GAAG,SAAS,CAAA;CAC5D;AAED,wCAAwC;AACxC,MAAM,MAAM,cAAc,GACtB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAA;CAAE,GAC3D;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,CAkBzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAS3E;AAcD,kDAAkD;AAClD,wBAAgB,uBAAuB,IAAI,OAAO,CAEjD;AAeD;;;;;;;;GAQG;AACH,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAQtE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,OAAO,GAAG,OAAO,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,OAAO,GAAG,MAAM,CAOvE"}