poe-code 8.0.0 → 9.0.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 (45) hide show
  1. package/dist/cli/commands/harness.js +12 -3
  2. package/dist/cli/commands/harness.js.map +1 -1
  3. package/dist/index.js +1515 -712
  4. package/dist/index.js.map +4 -4
  5. package/dist/metafile.json +1 -1
  6. package/package.json +15 -2
  7. package/packages/safejs/dist/chunks/chunk-4YIDX44G.js +40 -0
  8. package/packages/safejs/dist/chunks/chunk-4YIDX44G.js.map +7 -0
  9. package/packages/safejs/dist/chunks/chunk-55ZK3CR7.js +7802 -0
  10. package/packages/safejs/dist/chunks/chunk-55ZK3CR7.js.map +7 -0
  11. package/packages/safejs/dist/chunks/chunk-GQBEEFVQ.js +28798 -0
  12. package/packages/safejs/dist/chunks/chunk-GQBEEFVQ.js.map +7 -0
  13. package/packages/safejs/dist/chunks/chunk-NI4WFFTL.js +5701 -0
  14. package/packages/safejs/dist/chunks/chunk-NI4WFFTL.js.map +7 -0
  15. package/packages/safejs/dist/chunks/inMemory-RLZ4QGDZ.js +48 -0
  16. package/packages/safejs/dist/chunks/inMemory-RLZ4QGDZ.js.map +7 -0
  17. package/packages/safejs/dist/chunks/server-3SNT3RE2.js +12518 -0
  18. package/packages/safejs/dist/chunks/server-3SNT3RE2.js.map +7 -0
  19. package/packages/safejs/dist/chunks/types-BTF37PZ6.js +348 -0
  20. package/packages/safejs/dist/chunks/types-BTF37PZ6.js.map +7 -0
  21. package/packages/safejs/dist/cli.d.ts +2 -0
  22. package/packages/safejs/dist/cli.js +550 -491
  23. package/packages/safejs/dist/cli.js.map +7 -0
  24. package/packages/safejs/dist/core.js +14 -4
  25. package/packages/safejs/dist/core.js.map +7 -0
  26. package/packages/safejs/dist/index.d.ts +3 -0
  27. package/packages/safejs/dist/index.js +791 -30
  28. package/packages/safejs/dist/index.js.map +7 -0
  29. package/packages/safejs/dist/interp/host-bridge.d.ts +2 -0
  30. package/packages/safejs/dist/interp/host-bridge.js +20 -9
  31. package/packages/safejs/dist/interp/host-call.d.ts +5 -0
  32. package/packages/safejs/dist/interp/host-call.js +48 -3
  33. package/packages/safejs/dist/interp/resources.d.ts +7 -0
  34. package/packages/safejs/dist/interp/resources.js +36 -0
  35. package/packages/safejs/dist/modules/mcp-transport.d.ts +26 -0
  36. package/packages/safejs/dist/modules/mcp-transport.js +259 -0
  37. package/packages/safejs/dist/modules/mcp.d.ts +15 -1
  38. package/packages/safejs/dist/modules/mcp.js +107 -0
  39. package/packages/safejs/dist/run.js +6 -3
  40. package/packages/safejs/dist/snapshot/dump-format.d.ts +1 -1
  41. package/packages/safejs/dist/snapshot/dump-format.js +1 -1
  42. package/packages/safejs/dist/snapshot/replay-data.d.ts +1 -0
  43. package/packages/safejs/dist/snapshot/replay-data.js +3 -1
  44. package/packages/safejs/dist/snapshot/replay-inputs.d.ts +2 -2
  45. package/packages/safejs/dist/snapshot/replay-inputs.js +2 -1
@@ -0,0 +1,48 @@
1
+ import "./chunk-4YIDX44G.js";
2
+
3
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/inMemory.js
4
+ var InMemoryTransport = class _InMemoryTransport {
5
+ constructor() {
6
+ this._messageQueue = [];
7
+ }
8
+ /**
9
+ * Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server.
10
+ */
11
+ static createLinkedPair() {
12
+ const clientTransport = new _InMemoryTransport();
13
+ const serverTransport = new _InMemoryTransport();
14
+ clientTransport._otherTransport = serverTransport;
15
+ serverTransport._otherTransport = clientTransport;
16
+ return [clientTransport, serverTransport];
17
+ }
18
+ async start() {
19
+ while (this._messageQueue.length > 0) {
20
+ const queuedMessage = this._messageQueue.shift();
21
+ this.onmessage?.(queuedMessage.message, queuedMessage.extra);
22
+ }
23
+ }
24
+ async close() {
25
+ const other = this._otherTransport;
26
+ this._otherTransport = void 0;
27
+ await other?.close();
28
+ this.onclose?.();
29
+ }
30
+ /**
31
+ * Sends a message with optional auth info.
32
+ * This is useful for testing authentication scenarios.
33
+ */
34
+ async send(message, options) {
35
+ if (!this._otherTransport) {
36
+ throw new Error("Not connected");
37
+ }
38
+ if (this._otherTransport.onmessage) {
39
+ this._otherTransport.onmessage(message, { authInfo: options?.authInfo });
40
+ } else {
41
+ this._otherTransport._messageQueue.push({ message, extra: { authInfo: options?.authInfo } });
42
+ }
43
+ }
44
+ };
45
+ export {
46
+ InMemoryTransport
47
+ };
48
+ //# sourceMappingURL=inMemory-RLZ4QGDZ.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../node_modules/@modelcontextprotocol/sdk/src/inMemory.ts"],
4
+ "sourcesContent": [null],
5
+ "mappings": ";;;AAYM,IAAO,oBAAP,MAAO,mBAAiB;EAA9B,cAAA;AAEY,SAAA,gBAAiC,CAAA;EAgD7C;;;;EAtCI,OAAO,mBAAgB;AACnB,UAAM,kBAAkB,IAAI,mBAAiB;AAC7C,UAAM,kBAAkB,IAAI,mBAAiB;AAC7C,oBAAgB,kBAAkB;AAClC,oBAAgB,kBAAkB;AAClC,WAAO,CAAC,iBAAiB,eAAe;EAC5C;EAEA,MAAM,QAAK;AAEP,WAAO,KAAK,cAAc,SAAS,GAAG;AAClC,YAAM,gBAAgB,KAAK,cAAc,MAAK;AAC9C,WAAK,YAAY,cAAc,SAAS,cAAc,KAAK;IAC/D;EACJ;EAEA,MAAM,QAAK;AACP,UAAM,QAAQ,KAAK;AACnB,SAAK,kBAAkB;AACvB,UAAM,OAAO,MAAK;AAClB,SAAK,UAAS;EAClB;;;;;EAMA,MAAM,KAAK,SAAyB,SAA+D;AAC/F,QAAI,CAAC,KAAK,iBAAiB;AACvB,YAAM,IAAI,MAAM,eAAe;IACnC;AAEA,QAAI,KAAK,gBAAgB,WAAW;AAChC,WAAK,gBAAgB,UAAU,SAAS,EAAE,UAAU,SAAS,SAAQ,CAAE;IAC3E,OAAO;AACH,WAAK,gBAAgB,cAAc,KAAK,EAAE,SAAS,OAAO,EAAE,UAAU,SAAS,SAAQ,EAAE,CAAE;IAC/F;EACJ;;",
6
+ "names": []
7
+ }