@tomflow/proflow-execution-runtime 0.1.20 → 0.1.22

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @tomflow/proflow-execution-runtime
2
2
 
3
+ ## 0.1.22
4
+
5
+ ### Patch Changes
6
+
7
+ - fix(runtime): normalize monitor locator identity
8
+
9
+ ## 0.1.21
10
+
11
+ ### Patch Changes
12
+
13
+ - fix(execution): reconcile unknown monitor effects
14
+
3
15
  ## 0.1.20
4
16
 
5
17
  ### Patch Changes
@@ -6,7 +6,7 @@ export declare const behaviorAdapter: {
6
6
  ok: true;
7
7
  status: "SUCCEEDED";
8
8
  moduleRef: "execution-runtime";
9
- moduleVersion: "0.1.20";
9
+ moduleVersion: "0.1.22";
10
10
  data: {
11
11
  endpoint: string;
12
12
  transportCredentialFile: string;
@@ -23,7 +23,7 @@ export declare const behaviorAdapter: {
23
23
  readonly ok: true;
24
24
  readonly status: "SUCCEEDED";
25
25
  readonly moduleRef: "execution-runtime";
26
- readonly moduleVersion: "0.1.20";
26
+ readonly moduleVersion: "0.1.22";
27
27
  };
28
28
  observedEffects: ("Persists execution state, output references and evidence in WAL SQLite" | "Runs the single backend Execution Runtime service")[];
29
29
  }>;
@@ -33,7 +33,7 @@ export declare const behaviorAdapter: {
33
33
  ok: true;
34
34
  status: "SUCCEEDED";
35
35
  moduleRef: "execution-runtime";
36
- moduleVersion: "0.1.20";
36
+ moduleVersion: "0.1.22";
37
37
  data: {
38
38
  setupStatus: "READY";
39
39
  runtimeStatus: "RUNNING" | "STOPPED";
@@ -54,7 +54,7 @@ export declare const behaviorAdapter: {
54
54
  ok: true;
55
55
  status: "SUCCEEDED";
56
56
  moduleRef: "execution-runtime";
57
- moduleVersion: "0.1.20";
57
+ moduleVersion: "0.1.22";
58
58
  data: {
59
59
  endpoint: string;
60
60
  transportCredentialFile: string;
@@ -71,7 +71,7 @@ export declare const behaviorAdapter: {
71
71
  ok: true;
72
72
  status: "SUCCEEDED";
73
73
  moduleRef: "execution-runtime";
74
- moduleVersion: "0.1.20";
74
+ moduleVersion: "0.1.22";
75
75
  data: {
76
76
  docs: string;
77
77
  };
@@ -84,7 +84,7 @@ export declare const behaviorAdapter: {
84
84
  ok: true;
85
85
  status: "SUCCEEDED";
86
86
  moduleRef: "execution-runtime";
87
- moduleVersion: "0.1.20";
87
+ moduleVersion: "0.1.22";
88
88
  data: unknown;
89
89
  };
90
90
  observedEffects: ("Persists execution state, output references and evidence in WAL SQLite" | "Runs the single backend Execution Runtime service")[];
@@ -92,7 +92,7 @@ export declare const behaviorAdapter: {
92
92
  result: {
93
93
  contract: "deployment.result.v1";
94
94
  moduleRef: "execution-runtime";
95
- moduleVersion: "0.1.20";
95
+ moduleVersion: "0.1.22";
96
96
  ok: false;
97
97
  status: "FAILED";
98
98
  error: {
@@ -109,7 +109,7 @@ export declare const behaviorAdapter: {
109
109
  readonly ok: true;
110
110
  readonly status: "SUCCEEDED";
111
111
  readonly moduleRef: "execution-runtime";
112
- readonly moduleVersion: "0.1.20";
112
+ readonly moduleVersion: "0.1.22";
113
113
  };
114
114
  observedEffects: ("Persists execution state, output references and evidence in WAL SQLite" | "Runs the single backend Execution Runtime service")[];
115
115
  } | {
@@ -118,11 +118,11 @@ export declare const behaviorAdapter: {
118
118
  readonly ok: true;
119
119
  readonly status: "SUCCEEDED";
120
120
  readonly moduleRef: "execution-runtime";
121
- readonly moduleVersion: "0.1.20";
121
+ readonly moduleVersion: "0.1.22";
122
122
  } | {
123
123
  contract: "deployment.result.v1";
124
124
  moduleRef: "execution-runtime";
125
- moduleVersion: "0.1.20";
125
+ moduleVersion: "0.1.22";
126
126
  ok: false;
127
127
  status: "FAILED";
128
128
  error: {
@@ -3,7 +3,7 @@ export declare const descriptor: {
3
3
  readonly contractVersion: "1.0.0";
4
4
  readonly moduleRef: "execution-runtime";
5
5
  readonly packageName: "@tomflow/proflow-execution-runtime";
6
- readonly moduleVersion: "0.1.20";
6
+ readonly moduleVersion: "0.1.22";
7
7
  readonly kind: "service";
8
8
  readonly templateVersion: "1.0.0";
9
9
  readonly platformCompatibility: ">=1.0.0 <2.0.0";
@@ -3,7 +3,7 @@ export const descriptor = {
3
3
  contractVersion: "1.0.0",
4
4
  moduleRef: "execution-runtime",
5
5
  packageName: "@tomflow/proflow-execution-runtime",
6
- moduleVersion: "0.1.20",
6
+ moduleVersion: "0.1.22",
7
7
  kind: "service",
8
8
  templateVersion: "1.0.0",
9
9
  platformCompatibility: ">=1.0.0 <2.0.0",
package/dist/src/index.js CHANGED
@@ -88,6 +88,31 @@ function protectedValue(value, key = "") {
88
88
  protectedValue(item, childKey),
89
89
  ]));
90
90
  }
91
+ function stableMonitorLocator(value, kind) {
92
+ if (typeof value !== "string")
93
+ return value;
94
+ let parsed;
95
+ try {
96
+ parsed = new URL(value);
97
+ }
98
+ catch {
99
+ return value;
100
+ }
101
+ if (parsed.protocol !== "https:" ||
102
+ parsed.hostname !== "chatgpt.com" ||
103
+ parsed.search ||
104
+ parsed.hash)
105
+ return value;
106
+ const match = kind === "conversation"
107
+ ? /^\/g\/(g-p-[a-f0-9]{32})(?:-[a-z0-9-]+)?\/c\/([^/?#]+)\/?$/i.exec(parsed.pathname)
108
+ : /^\/g\/(g-p-[a-f0-9]{32})(?:-[a-z0-9-]+)?(?:\/project)?\/?$/i.exec(parsed.pathname);
109
+ if (!match)
110
+ return value;
111
+ const projectRef = match[1].toLowerCase();
112
+ return kind === "conversation"
113
+ ? `${parsed.origin}/g/${projectRef}/c/${match[2]}`
114
+ : `${parsed.origin}/g/${projectRef}`;
115
+ }
91
116
  function stableEffectInput(request) {
92
117
  if (request.capability !== "monitor.chat.submit" && request.capability !== "monitor.chat.create")
93
118
  return request.input;
@@ -95,6 +120,13 @@ function stableEffectInput(request) {
95
120
  // Legacy revision fences are admission facts, not physical-effect identity.
96
121
  delete effect.expectedRunVersion;
97
122
  delete effect.configRevision;
123
+ // ChatGPT may add/remove a human-readable Project slug while preserving the
124
+ // stable g-p-* project identity. That presentation change must not fork a
125
+ // durable Monitor effect or block same-effect reconciliation.
126
+ if (request.capability === "monitor.chat.submit")
127
+ effect.conversationLocator = stableMonitorLocator(effect.conversationLocator, "conversation");
128
+ else
129
+ effect.projectLocator = stableMonitorLocator(effect.projectLocator, "project");
98
130
  return effect;
99
131
  }
100
132
  export function executionInputFingerprint(input) {
@@ -672,13 +704,17 @@ export async function createExecutionRuntime(options) {
672
704
  throw new ExecutionRuntimeError("IDEMPOTENCY_CONFLICT", "idempotency key was already used with different critical input");
673
705
  inputFingerprint = durableFingerprint;
674
706
  const prior = fromRow(existing);
707
+ const monitorChatEffect = request.capability === "monitor.chat.submit" ||
708
+ request.capability === "monitor.chat.create";
709
+ if (prior.status === "UNKNOWN" &&
710
+ prior.sideEffectState === "UNKNOWN" &&
711
+ (monitorChatEffect ||
712
+ request.capability === "product.discussion.bootstrap.deliver" ||
713
+ request.capability === "product.review.deliver"))
714
+ return reconcileUnknownReplay(request, existing, prior);
675
715
  // Existing PENDING and APPLIED are read-only. Only proven absence permits retry.
676
716
  if (monitorEffect && prior.sideEffectState !== "NOT_APPLIED")
677
717
  return prior;
678
- if (prior.status === "UNKNOWN" && prior.sideEffectState === "UNKNOWN" &&
679
- (request.capability === "product.discussion.bootstrap.deliver" ||
680
- request.capability === "product.review.deliver"))
681
- return reconcileUnknownReplay(request, existing, prior);
682
718
  const safelyResumable = (monitorEffect && prior.sideEffectState === "NOT_APPLIED") ||
683
719
  (prior.status === "PENDING" &&
684
720
  prior.sideEffectState === "NOT_STARTED") ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/proflow-execution-runtime",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,11 +24,11 @@
24
24
  "SETUP.md"
25
25
  ],
26
26
  "dependencies": {
27
- "@tomflow/proflow-execution-contracts": "^0.1.12",
28
- "@tomflow/proflow-execution-local": "^0.1.16",
29
27
  "@tomflow/proflow-module-contract": "^0.1.13",
28
+ "@tomflow/proflow-execution-local": "^0.1.16",
29
+ "@tomflow/proflow-execution-contracts": "^0.1.12",
30
30
  "@tomflow/proflow-model-contracts": "^0.1.10",
31
- "@tomflow/proflow-execution-browser-extension": "^0.1.74"
31
+ "@tomflow/proflow-execution-browser-extension": "^0.1.78"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@tomflow/proflow-deployment-conformance": "^0.1.13"
@@ -3,7 +3,7 @@
3
3
  "contractVersion": "1.0.0",
4
4
  "moduleRef": "execution-runtime",
5
5
  "packageName": "@tomflow/proflow-execution-runtime",
6
- "moduleVersion": "0.1.20",
6
+ "moduleVersion": "0.1.22",
7
7
  "kind": "service",
8
8
  "templateVersion": "1.0.0",
9
9
  "platformCompatibility": ">=1.0.0 <2.0.0",