@bli-cockpit/mcp 0.1.8 → 0.1.9
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.
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* Every key of the envelope, in the order it is written. The literal list IS
|
|
54
54
|
* the contract: both copies assert against it, so a drift is a red suite.
|
|
55
55
|
*/
|
|
56
|
-
export declare const JARVIS_ANSWER_ENVELOPE_KEYS: readonly ["ok", "answer", "sources", "turn_id", "thread_id", "trace_thread_id", "proposal_id", "degraded", "degraded_reasons"];
|
|
56
|
+
export declare const JARVIS_ANSWER_ENVELOPE_KEYS: readonly ["ok", "answer", "sources", "turn_id", "thread_id", "trace_thread_id", "proposal_id", "next_action", "degraded", "degraded_reasons"];
|
|
57
57
|
/**
|
|
58
58
|
* One thing that backed the answer (BLI-3770).
|
|
59
59
|
*
|
|
@@ -134,8 +134,25 @@ export interface JarvisAnswerEnvelope {
|
|
|
134
134
|
* could approve with, and that is not approval. The person fetches the code
|
|
135
135
|
* on a surface a person reads and hands it back. Null on every turn that
|
|
136
136
|
* proposed no coding task, which is nearly all of them.
|
|
137
|
+
*
|
|
138
|
+
* BLI-3787: a null here is never on its own. When the arm ran at all,
|
|
139
|
+
* `next_action` below says what happened and what a person has to do — the
|
|
140
|
+
* field was `null` on every proposing turn for two QA ticks while the answer
|
|
141
|
+
* told the caller to spend an id nothing had issued.
|
|
137
142
|
*/
|
|
138
143
|
proposal_id: string | null;
|
|
144
|
+
/**
|
|
145
|
+
* BLI-3787: what has to happen next, in a sentence naming an action a
|
|
146
|
+
* PERSON takes.
|
|
147
|
+
*
|
|
148
|
+
* Today only the coding arm produces one, and it is what makes
|
|
149
|
+
* `proposal_id`'s absence readable: "ask them to fetch the code for proposal
|
|
150
|
+
* X", "nothing was dispatched and no proposal was recorded, a person has to
|
|
151
|
+
* approve this where a person reads", "that approval code has already been
|
|
152
|
+
* used". Null on every turn that never reached the arm, which is nearly all
|
|
153
|
+
* of them — and never a substitute for the answer itself.
|
|
154
|
+
*/
|
|
155
|
+
next_action: string | null;
|
|
139
156
|
degraded: boolean;
|
|
140
157
|
degraded_reasons: JarvisDegradedReason[];
|
|
141
158
|
}
|
|
@@ -173,6 +190,13 @@ export interface JarvisAnswerEnvelopeInput {
|
|
|
173
190
|
}> | null;
|
|
174
191
|
/** `body.proposalId` — BLI-3755's coding-arm proposal id, when the turn made one. */
|
|
175
192
|
proposalId?: string | null;
|
|
193
|
+
/**
|
|
194
|
+
* `body.nextAction` — BLI-3787's sentence for what a person must do next
|
|
195
|
+
* about the coding arm. Absent from a dashboard that predates it, which is
|
|
196
|
+
* why an older deployment reads as `next_action: null` rather than as a
|
|
197
|
+
* turn that said nothing.
|
|
198
|
+
*/
|
|
199
|
+
nextAction?: string | null;
|
|
176
200
|
/**
|
|
177
201
|
* `body.sources` — BLI-3770's structured citations, straight from the door.
|
|
178
202
|
* Typed as `unknown` on purpose: this is another process's JSON, and the
|
|
@@ -61,6 +61,7 @@ export const JARVIS_ANSWER_ENVELOPE_KEYS = [
|
|
|
61
61
|
"thread_id",
|
|
62
62
|
"trace_thread_id",
|
|
63
63
|
"proposal_id",
|
|
64
|
+
"next_action",
|
|
64
65
|
"degraded",
|
|
65
66
|
"degraded_reasons",
|
|
66
67
|
];
|
|
@@ -197,6 +198,7 @@ export function buildJarvisAnswerEnvelope(input) {
|
|
|
197
198
|
thread_id: input.thread ?? null,
|
|
198
199
|
trace_thread_id: input.traceThread ?? null,
|
|
199
200
|
proposal_id: input.proposalId ?? null,
|
|
201
|
+
next_action: input.nextAction ?? null,
|
|
200
202
|
degraded: reasons.length > 0,
|
|
201
203
|
degraded_reasons: reasons,
|
|
202
204
|
};
|
package/dist/jarvis-door.js
CHANGED
|
@@ -110,6 +110,9 @@ export async function takeTurn(deps, session, door, body, remember) {
|
|
|
110
110
|
revised: reply.revised,
|
|
111
111
|
trace: reply.trace,
|
|
112
112
|
proposalId: reply.proposalId,
|
|
113
|
+
// BLI-3787: the sentence beside it, so a refusal names what a person must
|
|
114
|
+
// do rather than arriving as a bare `proposal_id: null`.
|
|
115
|
+
nextAction: reply.nextAction,
|
|
113
116
|
// BLI-3770: the door's own structured citations, when it sent them.
|
|
114
117
|
sources: reply.sources,
|
|
115
118
|
});
|
|
@@ -122,6 +125,9 @@ export async function takeTurn(deps, session, door, body, remember) {
|
|
|
122
125
|
// BLI-3755: whether this turn left a coding-arm proposal behind. The id
|
|
123
126
|
// itself is in the envelope; this line says one was made.
|
|
124
127
|
proposal_recorded: envelope.proposal_id !== null,
|
|
128
|
+
// BLI-3787: whether this turn said what to do next. A turn that reached
|
|
129
|
+
// the coding arm and said nothing is the defect, and it is visible here.
|
|
130
|
+
next_action_present: envelope.next_action !== null,
|
|
125
131
|
degraded: envelope.degraded,
|
|
126
132
|
degraded_reasons: envelope.degraded_reasons,
|
|
127
133
|
has_turn_id: envelope.turn_id !== null,
|
|
@@ -134,6 +140,9 @@ export async function takeTurn(deps, session, door, body, remember) {
|
|
|
134
140
|
? `proposal_id: ${envelope.proposal_id} — the person fetches the approval code for it themself, `
|
|
135
141
|
+ `in a Tower tab, their Slack DM, or their own \`cockpit jarvis\` terminal. You were not sent one.`
|
|
136
142
|
: null,
|
|
143
|
+
// BLI-3787: printed whether or not there is a proposal id, because the
|
|
144
|
+
// turns that made none are exactly the ones a caller could not read.
|
|
145
|
+
envelope.next_action ? `next_action: ${envelope.next_action}` : null,
|
|
137
146
|
envelope.degraded ? `degraded: ${envelope.degraded_reasons.join(", ")}` : null,
|
|
138
147
|
]
|
|
139
148
|
.filter((line) => line !== null)
|
package/dist/jarvis-tools.js
CHANGED
|
@@ -78,13 +78,16 @@ export function registerJarvisTools(server, deps) {
|
|
|
78
78
|
register("jarvis_ask", {
|
|
79
79
|
title: "Ask JARVIS",
|
|
80
80
|
description: "Asks JARVIS one question and returns its answer, the Source: lines behind it, this turn's "
|
|
81
|
-
+ "turn_id
|
|
81
|
+
+ "turn_id, the conversation's thread_id, and — when the turn reached the coding arm — a "
|
|
82
|
+
+ "proposal_id and a next_action sentence. Same JARVIS, same tool belt and same evidence "
|
|
82
83
|
+ "rules as Tower web chat, the Slack DM and `cockpit jarvis`. A thread is SINGLE-WRITER: "
|
|
83
84
|
+ "omit thread and this turn gets a FRESH conversation of its own, so two questions asked at "
|
|
84
85
|
+ "the same time can never read each other's; pass the thread_id the answer returned to "
|
|
85
86
|
+ "continue that conversation deliberately. Pass the returned turn_id to jarvis_trace to see "
|
|
86
87
|
+ "how the answer was reached. JARVIS speaks as the person this machine is paired to and "
|
|
87
|
-
+ "cannot be made to speak as anyone else."
|
|
88
|
+
+ "cannot be made to speak as anyone else. proposal_id is null on every turn that proposed no "
|
|
89
|
+
+ "coding task, including one the arm refused; next_action is the sentence saying which it "
|
|
90
|
+
+ "was and what a PERSON has to do about it, so a null proposal_id is never on its own.",
|
|
88
91
|
inputSchema: {
|
|
89
92
|
question: z.string().min(1).max(50_000).describe("What to ask, in plain words."),
|
|
90
93
|
thread: z
|
|
@@ -194,10 +197,13 @@ export function registerJarvisTools(server, deps) {
|
|
|
194
197
|
+ "approval_code: you get the plan and a proposal_id back, and DELIBERATELY no code — a code "
|
|
195
198
|
+ "you can read is a code you could approve with. Show the person the plan and the "
|
|
196
199
|
+ "proposal_id and ask them to fetch the code themself, in a Tower browser tab, their Slack "
|
|
197
|
-
+ "DM with JARVIS, or their own `cockpit jarvis
|
|
200
|
+
+ "DM with JARVIS, or their own interactive `cockpit jarvis`. Then call this again with the code "
|
|
198
201
|
+ "THEY give you and the same instruction. A code approves exactly ONE run: a reused one is "
|
|
199
202
|
+ "refused (approval_code_spent) and the answer is a fresh approval, never a retry. Never "
|
|
200
|
-
+ "derive, guess, or reuse a code the person has not just handed you."
|
|
203
|
+
+ "derive, guess, or reuse a code the person has not just handed you. If the answer comes "
|
|
204
|
+
+ "back with no proposal_id, read next_action: the arm refused rather than proposed, and it "
|
|
205
|
+
+ "names what a person has to do — never send a proposal_id back to JARVIS yourself, this is "
|
|
206
|
+
+ "the surface it was withheld from and the read-back is refused here.",
|
|
201
207
|
inputSchema: {
|
|
202
208
|
instruction: z
|
|
203
209
|
.string()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bli-cockpit/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "bli-tower — an MCP server over BLI Cockpit's agent doors: JARVIS (jarvis_*), documents (docs_*), channels (msg_*), issues (work_*), the daily page (brief_*), meeting notes (notes_*), the ops board (ops_status/slack_*), settings/team/model, Scout and the workbook, plus the legacy event-stream tools (emit_event, get_ticket_timeline, get_active_tickets).",
|
|
6
6
|
"type": "module",
|