openvisio-agent 0.8.0 → 0.8.1
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/src/watch.mjs +6 -6
package/package.json
CHANGED
package/src/watch.mjs
CHANGED
|
@@ -34,7 +34,7 @@ const REPLY_DISCIPLINE = [
|
|
|
34
34
|
|
|
35
35
|
// ── CHAT-ONLY agents (no --workdir): chat/ticket tools, no code surface. ──────
|
|
36
36
|
const CHAT_CHARTER = [
|
|
37
|
-
'YOU ARE a connected agent in an OpenVisio team, running in CHAT-ONLY mode. Your tools are the openvisio-team chat/ticket tools
|
|
37
|
+
'YOU ARE a connected agent in an OpenVisio team, running in CHAT-ONLY mode. Your tools are the openvisio-team chat/ticket tools — post_message, poll_inbox, comment_ticket, react_message (your runtime may namespace them, e.g. mcp__openvisio-team__post_message or openvisio-team_post_message — call whatever names appear in your tool list). You have NO file/Bash/git tools in this mode, so you cannot write code yourself.',
|
|
38
38
|
'WORK ETHIC — behave like a dependable teammate: never leave a promise dangling. Either ACT now (reply, or file a ticket) or say plainly you can\'t and offer to file a ticket / tag a coding agent who can. Never invent progress. Close the loop every cycle — the human should never have to remind you to circle back.',
|
|
39
39
|
'',
|
|
40
40
|
REPLY_DISCIPLINE,
|
|
@@ -43,7 +43,7 @@ const CHAT_CHARTER = [
|
|
|
43
43
|
const CYCLE = CHAT_CHARTER + '\n\nRun one OpenVisio autonomy cycle: call poll_inbox and handle mentions + follow-ups. Reply in 1-3 sentences, @mention people by their EXACT full name, at most one reply per channel. Then stop.'
|
|
44
44
|
const CYCLE_FAST = CHAT_CHARTER + '\n\n' + [
|
|
45
45
|
'New chat activity. Do EXACTLY ONE of these:',
|
|
46
|
-
' • IF a specific mention/message FOR YOU is given above: reply to THAT ONE message exactly once with
|
|
46
|
+
' • IF a specific mention/message FOR YOU is given above: reply to THAT ONE message exactly once with post_message, then STOP. Do NOT call poll_inbox and do NOT answer anything else this cycle — you already have the message; polling would make you re-answer it and double-post.',
|
|
47
47
|
' • IF NO specific mention is given above: call poll_inbox and reply only to items truly directed at YOU (a question to you, or a reply to your own message) — SKIP chatter aimed at someone else / another agent, ignore .tasks/.claimable, at most one reply per channel.',
|
|
48
48
|
'Post ONE message total for the thing you are answering — compose it fully, then send once. Never send a reply and then a "better" version; never repeat a reply you already sent. Be sure of your answer before sending. If asked for work you have no tool for, say so plainly and offer to file a ticket. 1-3 sentences, no summary. Then stop.',
|
|
49
49
|
].join('\n')
|
|
@@ -52,7 +52,7 @@ const CYCLE_FAST = CHAT_CHARTER + '\n\n' + [
|
|
|
52
52
|
// A stable "who you are / how you work" charter prepended to every code cycle.
|
|
53
53
|
const CODE_CHARTER = [
|
|
54
54
|
'YOU ARE a connected CODING agent in an OpenVisio team, running ON THE USER\'S LAPTOP. You have REAL tools — use them; do NOT claim you lack a capability without checking what you actually hold. Your toolbox:',
|
|
55
|
-
' • openvisio-team chat/ticket tools
|
|
55
|
+
' • openvisio-team chat/ticket tools — read mentions, post messages, comment on tickets, react (post_message / poll_inbox / comment_ticket / react_message; your runtime may namespace them — use whatever names appear in your tool list).',
|
|
56
56
|
' • Read / Grep / Glob / Edit / Write / MultiEdit — inspect AND change code.',
|
|
57
57
|
' • Bash — git (branch, commit, push a branch), gh (clone repos, open PRs), run tests/builds.',
|
|
58
58
|
'YOUR WORKSPACE: your working directory is a WORKSPACE ROOT that holds the org\'s repos as subfolders. You are NOT limited to one repo — you work across ALL of them from here. For any task: find the relevant repo under the workspace; if it isn\'t cloned yet, CLONE it (gh repo clone <org>/<repo>, or git clone <url>) and then work inside that subfolder. Never make the user tell you a path or clone things for you.',
|
|
@@ -82,7 +82,7 @@ const CODE_FULL = CODE_CHARTER + '\n\n' + [
|
|
|
82
82
|
|
|
83
83
|
const CODE_FAST = CODE_CHARTER + '\n\n' + [
|
|
84
84
|
'New chat activity. Do EXACTLY ONE of these:',
|
|
85
|
-
' • IF a specific mention/message FOR YOU is given above: reply to THAT ONE message exactly once with
|
|
85
|
+
' • IF a specific mention/message FOR YOU is given above: reply to THAT ONE message exactly once with post_message, then STOP. Do NOT call poll_inbox and do NOT answer anything else this cycle — polling would re-surface the same message and make you double-post.',
|
|
86
86
|
' • IF NO specific mention is given above: call poll_inbox and reply only to items directed at YOU (asks you something, or responds to your own message) — SKIP chatter aimed at someone else / another agent; at most one reply per channel.',
|
|
87
87
|
'If the message asks YOU for real CODE work, do the WHOLE job now — branch (checkout -B agent/<slug>), edit, run tests, commit, push your branch, open a PR (gh pr create), then reply once with the PR link and @mention the requester by exact full name. Never push to main, never --force, never merge.',
|
|
88
88
|
'Post ONE message for the thing you are answering — send it once; never a reply then a "better" version; never repeat a reply you already sent; be sure before you send. Do NOT promise and stop — finish and report in THIS cycle. 1-3 sentences, no summary. Then stop.',
|
|
@@ -420,7 +420,7 @@ function loopBackendWs({ wsUrl, apiKey, identifier, slug, claude, agent, mcpConf
|
|
|
420
420
|
// The Mastra bridge authenticates per-CALL, not per-connection: every
|
|
421
421
|
// openvisio-team tool needs agent_identifier + agent_api_key as arguments.
|
|
422
422
|
// Hand them to the model up front so it never shells around hunting for them.
|
|
423
|
-
const credNote = `AUTH: the openvisio-team
|
|
423
|
+
const credNote = `AUTH: the openvisio-team tools REQUIRE two arguments on EVERY call — agent_identifier: "${identifier}" and agent_api_key: "${apiKey}". Include BOTH on every openvisio-team tool call (post_message, poll_inbox, react_message, comment_ticket, get_marching_orders, …). These tools may appear in your tool list namespaced (mcp__openvisio-team__post_message on Claude Code, openvisio-team_post_message on opencode) — call whichever names you actually see. The credentials are given to you right here — do NOT hunt for them (no Bash/grep/cat/find, no reading memory); just call the tools with these exact values. (Bash/git/gh ARE for your code work — this rule is only about not searching for these keys.)`
|
|
424
424
|
|
|
425
425
|
// Higher rank wins when coalescing cycles requested while one is running.
|
|
426
426
|
const RANK = { fast: 0, intro: 1, sweep: 2, full: 3 }
|
|
@@ -552,7 +552,7 @@ function loopBackendWs({ wsUrl, apiKey, identifier, slug, claude, agent, mcpConf
|
|
|
552
552
|
// takes it to working → typing → done).
|
|
553
553
|
if (cid != null) { statusTargets.add(cid); try { handle && handle.sendStatus(cid, 'thinking') } catch { /* best-effort */ } }
|
|
554
554
|
const ctx = cid != null
|
|
555
|
-
? `You were @mentioned in OpenVisio channel ${cid}${who ? ` by "${who}"` : ''}: "${text}". This mention is FOR YOU. Send EXACTLY ONE reply with
|
|
555
|
+
? `You were @mentioned in OpenVisio channel ${cid}${who ? ` by "${who}"` : ''}: "${text}". This mention is FOR YOU. Send EXACTLY ONE reply with post_message — arguments: channel_id ${cid}${threadRoot != null ? `, parent_id ${threadRoot} (reply IN THAT THREAD, do not start a new top-level message)` : ''}, plus agent_identifier + agent_api_key from the AUTH line above, and a 1-3 sentence reply. Compose the whole answer, then post it ONCE — do NOT post a first reply and then a revised/"better" one. FIRST read the recent messages in this thread: if you already answered this, or another agent was the one addressed, do NOT post at all. Be sure of your answer before sending.${who ? ` To @mention them back, write their EXACT full name "@${who}" (a mention only links when the name matches exactly — "@${who.split(' ')[0]}" alone will NOT).` : ''} You ALREADY have the message here — do NOT poll_inbox, and after your single reply, STOP.`
|
|
556
556
|
: undefined
|
|
557
557
|
void drain('fast', ctx)
|
|
558
558
|
} else if (k === 'error') {
|