@tomflow/chatloop-context 0.6.41 → 0.6.42
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.
|
@@ -57,7 +57,8 @@ export const capability={
|
|
|
57
57
|
"userTurn": {
|
|
58
58
|
"type": "string",
|
|
59
59
|
"minLength": 8,
|
|
60
|
-
"maxLength": 256
|
|
60
|
+
"maxLength": 256,
|
|
61
|
+
"description": "For a Form A without platform user message ID, store its exact real identifiers: user-turn:UNAVAILABLE; form:<actual formId>; trace:<actual traceRef>; approve. Reject generic current-chat placeholders; never invent user approval."
|
|
61
62
|
},
|
|
62
63
|
"presentedAssistantRef": {
|
|
63
64
|
"type": "string",
|
|
@@ -1553,7 +1553,8 @@
|
|
|
1553
1553
|
"userTurn": {
|
|
1554
1554
|
"type": "string",
|
|
1555
1555
|
"minLength": 8,
|
|
1556
|
-
"maxLength": 256
|
|
1556
|
+
"maxLength": 256,
|
|
1557
|
+
"description": "For a Form A without platform user message ID, store its exact real identifiers: user-turn:UNAVAILABLE; form:<actual formId>; trace:<actual traceRef>; approve. Reject generic current-chat placeholders; never invent user approval."
|
|
1557
1558
|
},
|
|
1558
1559
|
"presentedAssistantRef": {
|
|
1559
1560
|
"type": "string",
|
package/lib/core/review.mjs
CHANGED
|
@@ -134,6 +134,11 @@ export function createReviewMethods(values) {
|
|
|
134
134
|
.get(a.projectId,a.taskId,issue.document_id,issue.version);
|
|
135
135
|
assert(doc&&doc.content_hash===issue.content_hash,'DOCUMENT_CHANGED');
|
|
136
136
|
assert(['R','P'].includes(doc.kind),'ISSUE_DOCUMENT_KIND_INVALID');
|
|
137
|
+
if(a.decision==='APPROVE'&&a.userTurn.startsWith('user-turn:UNAVAILABLE')){
|
|
138
|
+
const source=a.userTurn.match(/^user-turn:UNAVAILABLE; form:([a-z0-9][a-z0-9_-]{7,127}); trace:([0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}); approve$/i);
|
|
139
|
+
assert(source&&source[1].toLowerCase()!==source[2].toLowerCase(),
|
|
140
|
+
'APPROVAL_FORM_SOURCE_REF_REQUIRED');
|
|
141
|
+
}
|
|
137
142
|
if(a.decision!=='APPROVE'){
|
|
138
143
|
// The legacy CUSTOM decision has the same meaning as a change request.
|
|
139
144
|
const issueStatus=a.decision==='REJECT'?'REJECTED':'CHANGE_REQUESTED';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomflow/chatloop-context",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.42",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Independent local Context SDK and short-lived CLI for Chat Loop projects",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"ps-list": "9.0.0",
|
|
35
|
-
"@tomflow/chatloop-extension": "0.4.
|
|
35
|
+
"@tomflow/chatloop-extension": "0.4.45",
|
|
36
36
|
"@tomflow/chatloop-trace": "0.4.6"
|
|
37
37
|
}
|
|
38
38
|
}
|