openvisio-agent 0.17.2 → 0.17.3
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/package.json +1 -1
- package/scripts/certify.mjs +1 -0
- package/src/watch.mjs +7 -6
package/package.json
CHANGED
package/scripts/certify.mjs
CHANGED
|
@@ -45,6 +45,7 @@ const assertions = [
|
|
|
45
45
|
['policy blocker is surfaced to the user', watcher.includes('reportPolicyBlock(prompt, activeTaskRef, result.policyBlock)') && watcher.includes('Action required: Alex is blocked')],
|
|
46
46
|
['blocker routing carries explicit task identity', watcher.includes('taskRefs: []') && watcher.includes('activeTaskRef') && watcher.includes('taskRef: activeTaskRef')],
|
|
47
47
|
['all runtime blockers have a delivery path', watcher.includes('publishBlocker') && watcher.includes('WORK_CYCLE_BLOCKED') && watcher.includes('COORDINATION_CYCLE_BLOCKED')],
|
|
48
|
+
['ticket blocker cannot self-authorize', watcher.includes('ticketNotice = `Alex is paused') && watcher.includes('publishBlocker({ prompt, taskRef, notice, ticketNotice, pause: true })')],
|
|
48
49
|
['normative certification gates are documented', spec.includes('## Mandatory certification gates')],
|
|
49
50
|
]
|
|
50
51
|
for (const [label, ok] of assertions) {
|
package/src/watch.mjs
CHANGED
|
@@ -650,7 +650,7 @@ function loopBackendWs({ backend, wsUrl, apiKey, identifier, slug, claude, agent
|
|
|
650
650
|
}
|
|
651
651
|
const ensureMcpSession = async () => {
|
|
652
652
|
if (mcpSessionId) return
|
|
653
|
-
const res = await mcpPost({ jsonrpc: '2.0', id: ++mcpRpcId, method: 'initialize', params: { protocolVersion: '2025-03-26', capabilities: {}, clientInfo: { name: 'openvisio-agent', version: '0.17.
|
|
653
|
+
const res = await mcpPost({ jsonrpc: '2.0', id: ++mcpRpcId, method: 'initialize', params: { protocolVersion: '2025-03-26', capabilities: {}, clientInfo: { name: 'openvisio-agent', version: '0.17.3' } } }, false)
|
|
654
654
|
if (!res.ok) throw new Error('MCP initialize HTTP ' + res.status)
|
|
655
655
|
await mcpPayload(res)
|
|
656
656
|
mcpSessionId = res.headers.get('mcp-session-id') || ''
|
|
@@ -701,7 +701,7 @@ function loopBackendWs({ backend, wsUrl, apiKey, identifier, slug, claude, agent
|
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
|
|
704
|
-
const publishBlocker = async ({ prompt, taskRef, notice, pause = false }) => {
|
|
704
|
+
const publishBlocker = async ({ prompt, taskRef, notice, ticketNotice = notice, pause = false }) => {
|
|
705
705
|
const sentenceTask = /ticket\s+#?(\d+).*?project\s+(\d+)/i.exec(prompt)
|
|
706
706
|
const jsonTask = /"id"\s*:\s*(\d+)[\s\S]{0,300}?"projectId"\s*:\s*(\d+)/i.exec(prompt)
|
|
707
707
|
const ticketId = Number(taskRef?.ticketId ?? sentenceTask?.[1] ?? jsonTask?.[1])
|
|
@@ -731,7 +731,7 @@ function loopBackendWs({ backend, wsUrl, apiKey, identifier, slug, claude, agent
|
|
|
731
731
|
const key = `${projectId}:${ticketId}`
|
|
732
732
|
if (pause) { blockedTasks.add(key); persistReplay() }
|
|
733
733
|
try {
|
|
734
|
-
await callMcpTool('comment_ticket', { project_id: projectId, ticket_id: ticketId, text:
|
|
734
|
+
await callMcpTool('comment_ticket', { project_id: projectId, ticket_id: ticketId, text: ticketNotice })
|
|
735
735
|
delivered = true
|
|
736
736
|
return
|
|
737
737
|
} catch (e) {
|
|
@@ -740,11 +740,11 @@ function loopBackendWs({ backend, wsUrl, apiKey, identifier, slug, claude, agent
|
|
|
740
740
|
const current = toolData(await callMcpTool('get_ticket', { project_id: projectId, ticket_id: ticketId }))
|
|
741
741
|
const ticket = current.ticket ?? current.task ?? current
|
|
742
742
|
const description = String(ticket.description || '')
|
|
743
|
-
if (!description.includes(
|
|
743
|
+
if (!description.includes(ticketNotice)) {
|
|
744
744
|
await callMcpTool('update_ticket', {
|
|
745
745
|
project_id: projectId,
|
|
746
746
|
ticket_id: ticketId,
|
|
747
|
-
description: `${description}${description ? '\n\n' : ''}[Agent blocker]\n${
|
|
747
|
+
description: `${description}${description ? '\n\n' : ''}[Agent blocker]\n${ticketNotice}`,
|
|
748
748
|
})
|
|
749
749
|
delivered = true
|
|
750
750
|
}
|
|
@@ -758,7 +758,8 @@ function loopBackendWs({ backend, wsUrl, apiKey, identifier, slug, claude, agent
|
|
|
758
758
|
? `Reply with: “I explicitly authorize Alex to push commit ${block.commit} to the exact repository URL for ${block.remote || 'the configured remote'}, on branch ${block.branch}.”`
|
|
759
759
|
: 'Explicitly authorize the exact repository URL, commit, and branch in your reply.'
|
|
760
760
|
const notice = `Action required: Alex is blocked at \`${command}\`${payload ? ` (${payload})` : ''}. Codex requires confirmation before exporting private repository code. ${approval} The ticket is paused until that approval is recorded.`
|
|
761
|
-
|
|
761
|
+
const ticketNotice = `Alex is paused at \`${command}\`${payload ? ` (${payload})` : ''}. Repository push confirmation is required in the project channel; no automatic retry will occur.`
|
|
762
|
+
return publishBlocker({ prompt, taskRef, notice, ticketNotice, pause: true })
|
|
762
763
|
}
|
|
763
764
|
|
|
764
765
|
// Reconcile everything that may have arrived while disconnected. This spends no
|