@tomflow/chatloop-extension 0.4.48 → 0.4.49
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.
|
@@ -14,8 +14,17 @@ async function run(){
|
|
|
14
14
|
:{type:'CHAT_LOOP_SESSION_STATUS_V1',requestId:id,
|
|
15
15
|
...(proof.traceParent?{traceParent:proof.traceParent}:{})})
|
|
16
16
|
.catch(()=>null);
|
|
17
|
+
// A signed Task without its FIRST Owner is a healthy pre-Start read.
|
|
18
|
+
// Accept only exact Task identity and bounded non-sending projection;
|
|
19
|
+
// this is not approval, a lease, or a sender permit.
|
|
20
|
+
const exact=state?.projectId===proof.intent?.projectId
|
|
21
|
+
&&state?.taskId===proof.intent?.taskId;
|
|
22
|
+
const scopedOwned=exact&&state?.scope==='TASK_SCOPED_STATUS_READ_ONLY';
|
|
23
|
+
const scopedPrestart=exact&&state?.scope==='TASK_SCOPED_PRESTART_NO_OWNER'
|
|
24
|
+
&&state?.native?.phase==='NOT_CREATED'
|
|
25
|
+
&&state?.worker?.state==='PRE_START_NO_OWNER';
|
|
17
26
|
if(scoped&&(state?.status!=='OK'
|
|
18
|
-
||
|
|
27
|
+
||!(scopedOwned||scopedPrestart))){
|
|
19
28
|
const code=/^[A-Z][A-Z0-9_]{1,95}$/.test(state?.code||'')
|
|
20
29
|
?state.code:'SCOPED_TASK_STATUS_UNVERIFIED';
|
|
21
30
|
// Failure is an actual read-only result, not an absent ACK that makes
|
package/extension/manifest.json
CHANGED