opencode-courier 0.7.3 → 0.8.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 (52) hide show
  1. package/README.md +109 -135
  2. package/dist/index.js +23 -4
  3. package/dist/memory/domain.d.ts +119 -0
  4. package/dist/memory/domain.js +84 -0
  5. package/dist/memory/events.d.ts +26 -0
  6. package/dist/memory/events.js +46 -0
  7. package/dist/memory/forget.d.ts +10 -0
  8. package/dist/memory/forget.js +20 -0
  9. package/dist/memory/index.d.ts +10 -0
  10. package/dist/memory/index.js +11 -0
  11. package/dist/memory/note.d.ts +37 -0
  12. package/dist/memory/note.js +29 -0
  13. package/dist/memory/ports.d.ts +44 -0
  14. package/dist/memory/ports.js +1 -0
  15. package/dist/memory/recall.d.ts +27 -0
  16. package/dist/memory/recall.js +48 -0
  17. package/dist/memory/record.d.ts +7 -0
  18. package/dist/memory/record.js +92 -0
  19. package/dist/memory/rpc-handlers.d.ts +134 -0
  20. package/dist/memory/rpc-handlers.js +23 -0
  21. package/dist/memory/rpc.d.ts +227 -0
  22. package/dist/memory/rpc.js +60 -0
  23. package/dist/memory/store.d.ts +10 -0
  24. package/dist/memory/store.js +90 -0
  25. package/dist/memory/sweep.d.ts +4 -0
  26. package/dist/memory/sweep.js +12 -0
  27. package/dist/memory/text.d.ts +27 -0
  28. package/dist/memory/text.js +95 -0
  29. package/dist/memory/tools.d.ts +16 -0
  30. package/dist/memory/tools.js +78 -0
  31. package/dist/memory/tui.d.ts +73 -0
  32. package/dist/person/rpc.d.ts +4 -4
  33. package/dist/platform/json.d.ts +1 -0
  34. package/dist/platform/json.js +1 -0
  35. package/dist/rpc.d.ts +1 -0
  36. package/dist/rpc.js +1 -0
  37. package/dist/skill.js +10 -3
  38. package/dist/tree/context.d.ts +2 -2
  39. package/dist/tree/context.js +4 -3
  40. package/dist/tree/index.d.ts +6 -5
  41. package/dist/tree/index.js +5 -4
  42. package/dist/tree/ports.d.ts +4 -2
  43. package/dist/tree/roster.d.ts +17 -0
  44. package/dist/tree/roster.js +24 -0
  45. package/dist/tree/rpc-handlers.d.ts +18 -18
  46. package/dist/tree/rpc.d.ts +18 -18
  47. package/dist/tree/status.d.ts +5 -5
  48. package/dist/tree/subtree.d.ts +2 -2
  49. package/dist/tree/text.js +2 -1
  50. package/dist/tree/tui.d.ts +11 -3
  51. package/dist/tui.js +544 -121
  52. package/package.json +1 -1
@@ -27,7 +27,7 @@ export declare function lastReply(messages: Awaited<ReturnType<Context["session"
27
27
  export declare function listChildren(ports: CourierPorts, parentID: string): Promise<({
28
28
  group: {
29
29
  name: string;
30
- report: "failed" | "interrupted" | "deleted" | "dropped" | "held" | "out" | "released" | "unknown";
30
+ report: "failed" | "interrupted" | "out" | "unknown" | "deleted" | "dropped" | "held" | "released";
31
31
  };
32
32
  directory: string;
33
33
  isolated: boolean;
@@ -57,7 +57,7 @@ export declare function listChildren(ports: CourierPorts, parentID: string): Pro
57
57
  error: string;
58
58
  group: {
59
59
  name: string;
60
- report: "failed" | "interrupted" | "deleted" | "dropped" | "held" | "out" | "released" | "unknown";
60
+ report: "failed" | "interrupted" | "out" | "unknown" | "deleted" | "dropped" | "held" | "released";
61
61
  };
62
62
  directory: string;
63
63
  isolated: boolean;
@@ -77,7 +77,7 @@ export declare function listChildren(ports: CourierPorts, parentID: string): Pro
77
77
  export declare function described(ports: CourierPorts, entry: RosterEntry): Promise<{
78
78
  group: {
79
79
  name: string;
80
- report: "failed" | "interrupted" | "deleted" | "dropped" | "held" | "out" | "released" | "unknown";
80
+ report: "failed" | "interrupted" | "out" | "unknown" | "deleted" | "dropped" | "held" | "released";
81
81
  };
82
82
  directory: string;
83
83
  isolated: boolean;
@@ -107,7 +107,7 @@ export declare function described(ports: CourierPorts, entry: RosterEntry): Prom
107
107
  error: string;
108
108
  group: {
109
109
  name: string;
110
- report: "failed" | "interrupted" | "deleted" | "dropped" | "held" | "out" | "released" | "unknown";
110
+ report: "failed" | "interrupted" | "out" | "unknown" | "deleted" | "dropped" | "held" | "released";
111
111
  };
112
112
  directory: string;
113
113
  isolated: boolean;
@@ -124,5 +124,5 @@ export declare function described(ports: CourierPorts, entry: RosterEntry): Prom
124
124
  title: string;
125
125
  }>;
126
126
  /** A child's standing in the join group its roster entry names, `unknown` when that cannot be read. */
127
- export declare function standingIn(ports: Pick<CourierPorts, "storage">, entry: RosterEntry, group: string): Promise<"failed" | "interrupted" | "deleted" | "dropped" | "held" | "out" | "released" | "unknown">;
127
+ export declare function standingIn(ports: Pick<CourierPorts, "storage">, entry: RosterEntry, group: string): Promise<"failed" | "interrupted" | "out" | "unknown" | "deleted" | "dropped" | "held" | "released">;
128
128
  export {};
@@ -60,7 +60,7 @@ export declare function tree(ports: CourierPorts, rootID: string): Promise<{
60
60
  depth: number;
61
61
  group: {
62
62
  name: string;
63
- report: "failed" | "interrupted" | "deleted" | "dropped" | "held" | "out" | "released" | "unknown";
63
+ report: "failed" | "interrupted" | "out" | "unknown" | "deleted" | "dropped" | "held" | "released";
64
64
  };
65
65
  directory: string;
66
66
  isolated: boolean;
@@ -104,7 +104,7 @@ export declare function tree(ports: CourierPorts, rootID: string): Promise<{
104
104
  error: string;
105
105
  group: {
106
106
  name: string;
107
- report: "failed" | "interrupted" | "deleted" | "dropped" | "held" | "out" | "released" | "unknown";
107
+ report: "failed" | "interrupted" | "out" | "unknown" | "deleted" | "dropped" | "held" | "released";
108
108
  };
109
109
  directory: string;
110
110
  isolated: boolean;
package/dist/tree/text.js CHANGED
@@ -64,7 +64,8 @@ export function rolePart(depth, limits) {
64
64
  const budget = `At most ${maxChildren} of the sessions you start run at once, and ${maxTotal} in the whole tree.`;
65
65
  if (depth === null)
66
66
  return (`${ROLE_PREFIX} root, no sessions started yet. Before a task that touches several files or areas, load the ` +
67
- `${SKILL_ID} skill and decide whether to split it across sessions (doing it yourself is fine), and say ` +
67
+ `${SKILL_ID} skill, call courier_recall once for how earlier trees in this project were split and how they went, ` +
68
+ `and decide whether to split it across sessions (doing it yourself is fine), and say ` +
68
69
  `which in one line of your reply: ${SPLIT_LINE}`);
69
70
  if (depth === 0)
70
71
  return (`${ROLE_PREFIX} root orchestrator. You started sessions with courier_spawn, and they may start their own, ` +
@@ -148,13 +148,21 @@ export declare function restBackground(theme: Context["theme"], { selected, hove
148
148
  selected: boolean;
149
149
  hovered: boolean;
150
150
  }): RGBA | undefined;
151
- /** The usage the `/courier` command shows for an input it does not know. */
151
+ /** The usage the `/courier` command shows for an input it does not know, before the further verbs' lines. */
152
152
  export declare const USAGE = "/courier tree opens the session tree; /courier stop [session] stops a session and those under it";
153
+ /** A further verb of the `/courier` command, which another module's TUI part supplies: what it runs, and its line of the usage. */
154
+ export type Verb = {
155
+ readonly run: () => void;
156
+ readonly usage: string;
157
+ };
158
+ /** The usage with the further verbs' lines. */
159
+ export declare const usageWith: (verbs: Readonly<Record<string, Verb>>) => string;
153
160
  /**
154
161
  * Adds the tree panel to the `session.panel` slot, opened by `/courier tree` or the palette, which follows the person
155
- * between sessions until closed, and `/courier stop <session>`, which stops a session under the open one once confirmed.
162
+ * between sessions until closed, and `/courier stop <session>`, which stops a session under the open one once confirmed;
163
+ * `verbs` are the command's further verbs, by name.
156
164
  */
157
- export declare function addTreePanel(ctx: Context): () => void;
165
+ export declare function addTreePanel(ctx: Context, verbs?: Readonly<Record<string, Verb>>): () => void;
158
166
  /**
159
167
  * Draws the person's attention when reports arrive: a join group's reports, released to the session that started them,
160
168
  * and a child's report to its parent, with the `subagent_done` sound. Read from the courier's own delivery metadata.