opencode-magi 0.0.0-dev-20260630082946 → 0.0.0-dev-20260702001022
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.
- package/dist/magi.js +7 -16
- package/package.json +1 -1
package/dist/magi.js
CHANGED
|
@@ -90,18 +90,7 @@ export class Magi {
|
|
|
90
90
|
}
|
|
91
91
|
async notify(sessionID, text) {
|
|
92
92
|
await this.input.client.session.promptAsync({
|
|
93
|
-
parts: [
|
|
94
|
-
{
|
|
95
|
-
synthetic: true,
|
|
96
|
-
text: [
|
|
97
|
-
"Magi notification:",
|
|
98
|
-
text,
|
|
99
|
-
"",
|
|
100
|
-
"Relay this update to the user immediately.",
|
|
101
|
-
].join("\n"),
|
|
102
|
-
type: "text",
|
|
103
|
-
},
|
|
104
|
-
],
|
|
93
|
+
parts: [{ synthetic: true, text, type: "text" }],
|
|
105
94
|
sessionID,
|
|
106
95
|
});
|
|
107
96
|
}
|
|
@@ -188,7 +177,10 @@ export class Magi {
|
|
|
188
177
|
updatedAt: createdAt,
|
|
189
178
|
...initialState,
|
|
190
179
|
};
|
|
191
|
-
|
|
180
|
+
const values = [this.createStateFile(state)];
|
|
181
|
+
if (!state.sync && state.text)
|
|
182
|
+
values.push(this.notify(state.sessionId, state.text));
|
|
183
|
+
await Promise.all(values);
|
|
192
184
|
return state;
|
|
193
185
|
}
|
|
194
186
|
async createStateFile(state) {
|
|
@@ -196,13 +188,12 @@ export class Magi {
|
|
|
196
188
|
await writeFile(join(state.output, "state.json"), `${JSON.stringify(state, null, 2)}\n`);
|
|
197
189
|
}
|
|
198
190
|
async createAgentFile(output, phase, id, content, attempt = 1, cycle) {
|
|
199
|
-
const segments = [
|
|
191
|
+
const segments = [id, phase];
|
|
200
192
|
if (isNumber(cycle))
|
|
201
193
|
segments.push(cycle.toString());
|
|
202
194
|
if (isNumber(attempt))
|
|
203
195
|
segments.push(attempt.toString());
|
|
204
|
-
const path = segments.join("
|
|
205
|
-
await mkdir(dirname(path), { recursive: true });
|
|
196
|
+
const path = join(output, segments.join("-") + ".md");
|
|
206
197
|
await writeFile(path, content);
|
|
207
198
|
}
|
|
208
199
|
async updateState(dir, next) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-magi",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260702001022",
|
|
4
4
|
"description": "Multi-agent PR review and merge orchestration plugin for OpenCode.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
|