@syntesseraai/opencode-feature-factory 0.8.0 → 0.10.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.
@@ -52,6 +52,19 @@ export type Client = {
52
52
  }>;
53
53
  };
54
54
  }>;
55
+ promptAsync(options: {
56
+ path: {
57
+ id: string;
58
+ };
59
+ body: {
60
+ noReply?: boolean;
61
+ agent?: string;
62
+ parts: Array<{
63
+ type: 'text';
64
+ text: string;
65
+ }>;
66
+ };
67
+ }): Promise<void>;
55
68
  };
56
69
  provider: {
57
70
  list(options?: {
@@ -109,3 +122,11 @@ export declare function promptSession(client: Client, parentSessionId: string, p
109
122
  agent?: string;
110
123
  title?: string;
111
124
  }): Promise<string>;
125
+ /**
126
+ * Send a visible notification message to the parent session via `promptAsync`.
127
+ *
128
+ * Uses `noReply: true` so the message appears in the TUI as a chat message
129
+ * without triggering an LLM turn. Errors are swallowed — notification
130
+ * delivery must never break the pipeline.
131
+ */
132
+ export declare function notifyParent(client: Client, sessionId: string, agent: string | undefined, message: string): Promise<void>;
@@ -88,3 +88,31 @@ export async function fanOut(client, parentSessionId, models, buildPrompt, agent
88
88
  export async function promptSession(client, parentSessionId, prompt, options) {
89
89
  return promptInChildSession(client, parentSessionId, prompt, options);
90
90
  }
91
+ // ---------------------------------------------------------------------------
92
+ // Parent session notification helper
93
+ // ---------------------------------------------------------------------------
94
+ /**
95
+ * Send a visible notification message to the parent session via `promptAsync`.
96
+ *
97
+ * Uses `noReply: true` so the message appears in the TUI as a chat message
98
+ * without triggering an LLM turn. Errors are swallowed — notification
99
+ * delivery must never break the pipeline.
100
+ */
101
+ export async function notifyParent(client, sessionId, agent, message) {
102
+ try {
103
+ const body = {
104
+ noReply: true,
105
+ parts: [{ type: 'text', text: message }],
106
+ };
107
+ if (agent) {
108
+ body.agent = agent;
109
+ }
110
+ await client.session.promptAsync({
111
+ path: { id: sessionId },
112
+ body,
113
+ });
114
+ }
115
+ catch {
116
+ // Swallow — pipeline correctness > notification delivery
117
+ }
118
+ }
@@ -4,6 +4,6 @@
4
4
  * Re-exports the fan-out, gate, and type modules as a single convenient
5
5
  * entry-point for tool implementations.
6
6
  */
7
- export { fanOut, promptSession, extractText, type Client } from './fan-out.js';
7
+ export { fanOut, promptSession, extractText, notifyParent, type Client } from './fan-out.js';
8
8
  export { evaluatePlanningGate, evaluateReviewGate, evaluateDocGate, evaluateMiniLoopImplGate, evaluateMiniLoopDocGate, } from './gate-evaluator.js';
9
9
  export * from './types.js';
@@ -4,6 +4,6 @@
4
4
  * Re-exports the fan-out, gate, and type modules as a single convenient
5
5
  * entry-point for tool implementations.
6
6
  */
7
- export { fanOut, promptSession, extractText } from './fan-out.js';
7
+ export { fanOut, promptSession, extractText, notifyParent } from './fan-out.js';
8
8
  export { evaluatePlanningGate, evaluateReviewGate, evaluateDocGate, evaluateMiniLoopImplGate, evaluateMiniLoopDocGate, } from './gate-evaluator.js';
9
9
  export * from './types.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@syntesseraai/opencode-feature-factory",
4
- "version": "0.8.0",
4
+ "version": "0.10.0",
5
5
  "type": "module",
6
6
  "description": "OpenCode plugin for Feature Factory agents - provides sub-agents and skills for validation, review, security, and architecture assessment",
7
7
  "license": "MIT",