opencode-courier 0.12.0 → 0.13.1

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 (48) hide show
  1. package/README.md +10 -9
  2. package/dist/index.js +7 -3
  3. package/dist/kernel/protocol.d.ts +2 -0
  4. package/dist/kernel/protocol.js +4 -0
  5. package/dist/memory/events.js +3 -1
  6. package/dist/memory/index.d.ts +2 -1
  7. package/dist/memory/index.js +2 -1
  8. package/dist/memory/lessons.d.ts +12 -0
  9. package/dist/memory/lessons.js +56 -0
  10. package/dist/memory/note.js +3 -0
  11. package/dist/memory/ports.d.ts +3 -1
  12. package/dist/memory/text.d.ts +11 -0
  13. package/dist/memory/text.js +22 -1
  14. package/dist/person/events.js +4 -1
  15. package/dist/person/permission.d.ts +1 -1
  16. package/dist/person/permission.js +1 -1
  17. package/dist/person/question/answer.d.ts +1 -1
  18. package/dist/person/question/answer.js +1 -1
  19. package/dist/person/question/lifecycle.d.ts +1 -1
  20. package/dist/person/question/lifecycle.js +1 -1
  21. package/dist/person/question/relay.js +1 -1
  22. package/dist/platform/events.d.ts +10 -2
  23. package/dist/platform/events.js +38 -8
  24. package/dist/skill.js +56 -59
  25. package/dist/tree/cleanup.js +2 -0
  26. package/dist/tree/context.d.ts +2 -2
  27. package/dist/tree/context.js +26 -10
  28. package/dist/tree/domain.d.ts +12 -0
  29. package/dist/tree/domain.js +10 -0
  30. package/dist/tree/events.js +21 -1
  31. package/dist/tree/group.js +3 -0
  32. package/dist/tree/index.d.ts +1 -1
  33. package/dist/tree/ports.d.ts +47 -7
  34. package/dist/tree/roster.d.ts +3 -11
  35. package/dist/tree/roster.js +4 -10
  36. package/dist/tree/send.js +46 -19
  37. package/dist/tree/spawn.js +57 -3
  38. package/dist/tree/standing.d.ts +17 -0
  39. package/dist/tree/standing.js +90 -0
  40. package/dist/tree/status.d.ts +3 -3
  41. package/dist/tree/status.js +4 -4
  42. package/dist/tree/stop.js +3 -0
  43. package/dist/tree/store.js +4 -2
  44. package/dist/tree/text.d.ts +37 -6
  45. package/dist/tree/text.js +74 -8
  46. package/dist/tree/tools.d.ts +0 -3
  47. package/dist/tree/tools.js +6 -19
  48. package/package.json +7 -7
@@ -4,10 +4,10 @@ import { rethrow } from "../kernel/tool.js";
4
4
  import { cleanup } from "./cleanup.js";
5
5
  import { send } from "./send.js";
6
6
  import { spawn } from "./spawn.js";
7
- import { listChildren, status } from "./status.js";
7
+ import { listChildren } from "./status.js";
8
8
  import { stop } from "./stop.js";
9
9
  import { tree } from "./subtree.js";
10
- import { childrenText, cleanupText, sendText, spawnText, statusText, stopText, treeText } from "./text.js";
10
+ import { childrenText, cleanupText, sendText, spawnText, stopText, treeText } from "./text.js";
11
11
  /**
12
12
  * The tree's courier tools: their input schemas, descriptions, and what each returns. The descriptions are
13
13
  * model-facing like the texts in `text.ts`, and snapshotted with them in `test/notices.test.ts`.
@@ -61,9 +61,6 @@ export const SendInput = Schema.Struct({
61
61
  }).annotate({ description: "With a report: what you produced, listed in the message after your text in a fixed layout." })),
62
62
  queue: Schema.optional(Schema.Boolean.annotate({ description: "Wait until the target's current turn ends instead of steering it now." })),
63
63
  });
64
- export const StatusInput = Schema.Struct({
65
- sessionID: Schema.String.annotate({ description: "The session to look at." }),
66
- });
67
64
  export const ChildrenInput = Schema.Struct({
68
65
  sessionID: Schema.optional(Schema.String.annotate({ description: "The session whose children to list; defaults to this one." })),
69
66
  });
@@ -92,7 +89,7 @@ export function addTreeTools(tools, ports) {
92
89
  "variant (reasoning effort) fit for the task. The session reports " +
93
90
  "back with courier_send, which wakes this session, and you are told if its turn fails or ends without a report " +
94
91
  "instead, it waits for a permission or it asks a question. Give a batch of parallel sessions one group name to " +
95
- "be woken once, with all their reports, instead of once per report. DO NOT poll it or call courier_status in a " +
92
+ "be woken once, with all their reports, instead of once per report. DO NOT poll it or call courier_children in a " +
96
93
  "loop: once you have started the sessions you need, end your turn by replying without calling more tools; each " +
97
94
  "report, or each group's reports, starts a new turn in which you carry on. For long tasks, also courier_later a " +
98
95
  "check-in for yourself in case it never reports, and courier_cancel it when it does.",
@@ -108,7 +105,8 @@ export function addTreeTools(tools, ports) {
108
105
  description: "Deliver a message to another OpenCode session. If that session is idle, OpenCode starts a new turn for it. " +
109
106
  "Use it to report back to the session that started you, with a status (done, partial, blocked or failed) and " +
110
107
  "the artifacts you produced, or to steer a session you started. The status is carried as an attribute of the " +
111
- "message; without one, a message to the session that started you is progress, not your report. If you were " +
108
+ "message; without one, a message to the session that started you is progress, not your report. A message to a " +
109
+ "session you started carries no status: one given is dropped. If you were " +
112
110
  "started in a group, a report with status done, partial or failed is held and delivered with the group's other " +
113
111
  "reports; the result says so, and nothing more is needed from you.",
114
112
  input: SendInput,
@@ -117,23 +115,12 @@ export function addTreeTools(tools, ports) {
117
115
  return { content: sendText(input.sessionID, delivered), metadata: delivered };
118
116
  },
119
117
  });
120
- tools.add({
121
- name: "courier_status",
122
- options: { codemode: false },
123
- description: "Look once at a session's state and its last reply, e.g. on a scheduled check-in. Not for waiting: " +
124
- "sessions you started report back on their own.",
125
- input: StatusInput,
126
- execute: async (input) => {
127
- const result = await status(ports.courier, input).catch(rethrow("courier_status"));
128
- return { content: statusText(result), metadata: result };
129
- },
130
- });
131
118
  tools.add({
132
119
  name: "courier_children",
133
120
  options: { codemode: false },
134
121
  description: "List the sessions this one started with courier_spawn, with each one's state and last reply, and for one " +
135
122
  "started in a group, its group and whether its report is held, still out, or released, e.g. after a " +
136
- "compaction or restart. Like courier_status, for a one-off look, not for waiting.",
123
+ "compaction or restart. For a one-off look, e.g. on a scheduled check-in, not for waiting: sessions you started report back on their own.",
137
124
  input: ChildrenInput,
138
125
  execute: async (input, context) => {
139
126
  const listed = await listChildren(ports.courier, input.sessionID || context.sessionID).catch(rethrow("courier_children"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-courier",
3
- "version": "0.12.0",
3
+ "version": "0.13.1",
4
4
  "description": "Multi-session orchestration for OpenCode V2: spawn child sessions, be woken by them. No polling.",
5
5
  "license": "MIT",
6
6
  "author": "Ivo Pogace <71701666+ivopogace@users.noreply.github.com>",
@@ -56,18 +56,18 @@
56
56
  "test:e2e": "e2e/run.sh"
57
57
  },
58
58
  "peerDependencies": {
59
- "@opencode/plugin": "2.1.4",
59
+ "@opencode/plugin": "2.2.1",
60
60
  "effect": "4.0.1"
61
61
  },
62
62
  "devDependencies": {
63
- "@opencode/plugin": "2.1.4",
64
- "@opencode/theme": "2.1.4",
65
- "@opentui/core": "0.6.8",
66
- "@opentui/solid": "0.6.8",
63
+ "@opencode/plugin": "2.2.1",
64
+ "@opencode/theme": "2.2.1",
65
+ "@opentui/core": "0.7.0",
66
+ "@opentui/solid": "0.7.0",
67
67
  "@types/bun": "1.4.2",
68
68
  "@types/node": "26.6.4",
69
69
  "effect": "4.0.1",
70
- "solid-js": "1.9.15",
70
+ "solid-js": "1.9.17",
71
71
  "typescript": "5.9.3"
72
72
  }
73
73
  }