parallax-opencode 0.3.3 → 0.3.5
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/plugin.js
CHANGED
|
@@ -33,8 +33,12 @@ const modeStore = new Map();
|
|
|
33
33
|
const protocolStore = new Map();
|
|
34
34
|
let currentSessionId = null;
|
|
35
35
|
let currentAgentName = null;
|
|
36
|
+
// Protocol state uses a fixed key that never changes within a plugin load.
|
|
37
|
+
// OpenCode creates multiple internal sessions (root, child, subagent) during
|
|
38
|
+
// a single conversation. The protocol state must survive all of them.
|
|
39
|
+
const PROTOCOL_KEY = "current";
|
|
36
40
|
function sessionId() {
|
|
37
|
-
return
|
|
41
|
+
return PROTOCOL_KEY;
|
|
38
42
|
}
|
|
39
43
|
function getFriction(s = sessionId()) {
|
|
40
44
|
if (!frictionStore.has(s)) {
|
|
@@ -634,8 +638,8 @@ export default {
|
|
|
634
638
|
if (input.event.type === "session.created") {
|
|
635
639
|
const props = input.event.properties || {};
|
|
636
640
|
const info = (props.info || {});
|
|
637
|
-
//
|
|
638
|
-
//
|
|
641
|
+
// Child sessions have a parentID. Only track the root session
|
|
642
|
+
// for trace recording. Protocol state uses a fixed key and is unaffected.
|
|
639
643
|
if (info.parentID)
|
|
640
644
|
return;
|
|
641
645
|
currentSessionId =
|
|
@@ -236,8 +236,9 @@ var modeStore = /* @__PURE__ */ new Map();
|
|
|
236
236
|
var protocolStore = /* @__PURE__ */ new Map();
|
|
237
237
|
var currentSessionId = null;
|
|
238
238
|
var currentAgentName = null;
|
|
239
|
+
var PROTOCOL_KEY = "current";
|
|
239
240
|
function sessionId() {
|
|
240
|
-
return
|
|
241
|
+
return PROTOCOL_KEY;
|
|
241
242
|
}
|
|
242
243
|
function getFriction(s = sessionId()) {
|
|
243
244
|
if (!frictionStore.has(s)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parallax-opencode",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "PARALLAX ENGINE plugin for OpenCode -- protocol enforcement, friction-loop verification, mode switching (plan/build/debug), trace recording, coherence scoring, CI gate, and PR-ready trace artifacts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/plugin.js",
|