opencode-mailbox 0.0.11 → 0.0.13

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 (2) hide show
  1. package/dist/index.js +12 -21
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12815,9 +12815,7 @@ ${message.message}
12815
12815
  `;
12816
12816
  }
12817
12817
  injectedText += `---
12818
- [Instructions: ${instructions}]
12819
-
12820
- IMPORTANT: remember in order for a sender to see your response, you must send them a mail back. Respond using markdown. Your markdown front-matter can contain a property "choices" which is an array of choices for the mail sender to choose from. These choices are optional and shouldn't alter your authentic personality in your responses.`;
12818
+ [Instructions: ${instructions}]`;
12821
12819
  try {
12822
12820
  await client.session.prompt({
12823
12821
  path: { id: sessionId },
@@ -12828,24 +12826,17 @@ IMPORTANT: remember in order for a sender to see your response, you must send th
12828
12826
  });
12829
12827
  try {
12830
12828
  const sessionApi = client.session;
12831
- if (sessionApi.resume) {
12832
- await sessionApi.resume({
12833
- path: { id: sessionId },
12834
- body: {}
12835
- });
12836
- } else {
12837
- await client.session.prompt({
12838
- path: { id: sessionId },
12839
- body: {
12840
- parts: [
12841
- {
12842
- type: "text",
12843
- text: "You have new mail. Please review the injected message above and respond accordingly."
12844
- }
12845
- ]
12846
- }
12847
- });
12848
- }
12829
+ await client.session.prompt({
12830
+ path: { id: sessionId },
12831
+ body: {
12832
+ parts: [
12833
+ {
12834
+ type: "text",
12835
+ text: `You have new mail. Please review the injected message above and respond accordingly. Respond using markdown. Your markdown front-matter can contain a property "choices" which is an array of choices for the mail sender to choose from. These choices are optional and shouldn't alter your authentic personality in your responses. IMPORTANT: remember in order for a sender to see your response, you must send them a mail back using the send mail tool. Also, don't go on for too long if things seem repetitive.`
12836
+ }
12837
+ ]
12838
+ }
12839
+ });
12849
12840
  } catch (wakeError) {
12850
12841
  console.warn(`[Mailbox] Failed to wake up session ${sessionId}:`, wakeError);
12851
12842
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-mailbox",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "A simple mailbox system for sending and receiving messages between sessions",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",