@misterhuydo/sentinel 1.0.96 → 1.0.98
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/.cairn/session.json +2 -2
- package/package.json +1 -1
- package/python/sentinel/sentinel_boss.py +57 -11
package/.cairn/session.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"message": "Auto-checkpoint at 2026-03-23T07:
|
|
3
|
-
"checkpoint_at": "2026-03-23T07:
|
|
2
|
+
"message": "Auto-checkpoint at 2026-03-23T07:36:48.429Z",
|
|
3
|
+
"checkpoint_at": "2026-03-23T07:36:48.430Z",
|
|
4
4
|
"active_files": [],
|
|
5
5
|
"notes": [],
|
|
6
6
|
"mtime_snapshot": {}
|
package/package.json
CHANGED
|
@@ -172,8 +172,26 @@ reply with a short summary grouped by category:
|
|
|
172
172
|
Tone: direct, professional, like a senior engineer who owns the system.
|
|
173
173
|
Don't pad responses. Don't say "Great question!" or "Certainly!".
|
|
174
174
|
If you don't know something, use a tool to find out before saying you don't know.
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
|
|
176
|
+
When to act vs. when to ask:
|
|
177
|
+
- Clear command ("check status", "fetch logs", "pause sentinel") → call the tool immediately, reply with results.
|
|
178
|
+
- Ambiguous or exploratory ("what does get_repo_status do?", "tell me about search_logs") → explain the tool naturally, then ask: "Want me to run it?"
|
|
179
|
+
- Unclear intent (could be either) → use judgment: brief explanation + "Want me to run this now?"
|
|
180
|
+
Never say "Stand by" or "Requesting..." and then return nothing. Either act, or ask.
|
|
181
|
+
|
|
182
|
+
Issue identification — before calling create_issue:
|
|
183
|
+
1. Determine if the message is a REAL issue/task (bug report, feature request, investigation ask)
|
|
184
|
+
vs. a status question, tool query, or casual chat. If not an issue, just answer normally.
|
|
185
|
+
2. If it IS an issue, gather what's needed before creating:
|
|
186
|
+
- Project: which project? If unclear, ask. Use list_projects if you need to check names.
|
|
187
|
+
- Context: what's the problem? Include everything: description, error text, steps to reproduce.
|
|
188
|
+
- Attachments: summarise any files/screenshots the user shared.
|
|
189
|
+
- Support URL: note any ticket/doc/link the user mentioned.
|
|
190
|
+
- Identity: always captured automatically from the Slack session.
|
|
191
|
+
3. Before calling the tool, confirm with the user in natural language:
|
|
192
|
+
e.g. "I'll create an issue for project *1881* — here's what I have: [summary]. Look right?"
|
|
193
|
+
Wait for their confirmation before proceeding.
|
|
194
|
+
4. After creating, tell them the issue was queued and Sentinel will pick it up on the next poll.
|
|
177
195
|
|
|
178
196
|
When the engineer's request is fully handled, end your LAST message with the token: [DONE]
|
|
179
197
|
IMPORTANT: Always write your actual reply text FIRST, then append [DONE] at the end. Example: "Hello! I'm Sentinel. [DONE]". Never output [DONE] as your only content.
|
|
@@ -205,26 +223,35 @@ _TOOLS = [
|
|
|
205
223
|
{
|
|
206
224
|
"name": "create_issue",
|
|
207
225
|
"description": (
|
|
208
|
-
"Deliver a
|
|
209
|
-
"
|
|
210
|
-
"
|
|
211
|
-
"
|
|
226
|
+
"Deliver a confirmed issue/task to a Sentinel project instance. "
|
|
227
|
+
"Only call this after you have: (1) confirmed the message is a real issue or task, "
|
|
228
|
+
"(2) identified the target project, (3) gathered enough context, and "
|
|
229
|
+
"(4) confirmed with the user ('I'll create this issue for project X — does that look right?'). "
|
|
230
|
+
"Do NOT call this for status questions, tool queries, or casual chat."
|
|
212
231
|
),
|
|
213
232
|
"input_schema": {
|
|
214
233
|
"type": "object",
|
|
215
234
|
"properties": {
|
|
216
235
|
"description": {
|
|
217
236
|
"type": "string",
|
|
218
|
-
"description": "Full task
|
|
237
|
+
"description": "Full problem/task description — include all context the user gave you",
|
|
219
238
|
},
|
|
220
239
|
"project": {
|
|
221
240
|
"type": "string",
|
|
222
|
-
"description": "Project short name
|
|
241
|
+
"description": "Project short name (e.g. '1881', 'elprint'). Ask if unclear.",
|
|
223
242
|
},
|
|
224
243
|
"target_repo": {
|
|
225
244
|
"type": "string",
|
|
226
245
|
"description": "Specific repo within the project (omit to let Sentinel auto-route)",
|
|
227
246
|
},
|
|
247
|
+
"support_url": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"description": "Any URL the user shared (ticket, doc, screenshot link, etc.)",
|
|
250
|
+
},
|
|
251
|
+
"attachments_summary": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"description": "Summary of any files/screenshots the user attached",
|
|
254
|
+
},
|
|
228
255
|
},
|
|
229
256
|
"required": ["description"],
|
|
230
257
|
},
|
|
@@ -792,10 +819,29 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
|
|
|
792
819
|
else:
|
|
793
820
|
project_dir = Path(".")
|
|
794
821
|
|
|
822
|
+
support_url = inputs.get("support_url", "").strip()
|
|
823
|
+
attachments_summary = inputs.get("attachments_summary", "").strip()
|
|
824
|
+
|
|
795
825
|
issues_dir = project_dir / "issues"
|
|
796
826
|
issues_dir.mkdir(exist_ok=True)
|
|
797
|
-
fname
|
|
798
|
-
|
|
827
|
+
fname = f"slack-{uuid.uuid4().hex[:8]}.txt"
|
|
828
|
+
|
|
829
|
+
from datetime import datetime, timezone as _tz
|
|
830
|
+
submitter_name = store.get_user_name(user_id) if user_id else ""
|
|
831
|
+
submitter_line = f"SUBMITTED_BY: {submitter_name} ({user_id})" if user_id else ""
|
|
832
|
+
lines = []
|
|
833
|
+
if submitter_line:
|
|
834
|
+
lines.append(submitter_line)
|
|
835
|
+
if target_repo:
|
|
836
|
+
lines.append(f"TARGET_REPO: {target_repo}")
|
|
837
|
+
if support_url:
|
|
838
|
+
lines.append(f"SUPPORT_URL: {support_url}")
|
|
839
|
+
lines.append(f"SUBMITTED_AT: {datetime.now(_tz.utc).isoformat()}")
|
|
840
|
+
lines.append("")
|
|
841
|
+
lines.append(description)
|
|
842
|
+
if attachments_summary:
|
|
843
|
+
lines.append(f"\nATTACHMENTS:\n{attachments_summary}")
|
|
844
|
+
content = "\n".join(lines)
|
|
799
845
|
(issues_dir / fname).write_text(content, encoding="utf-8")
|
|
800
846
|
|
|
801
847
|
# Touch SENTINEL_POLL_NOW so the target instance picks it up immediately
|
|
@@ -807,7 +853,7 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
|
|
|
807
853
|
try:
|
|
808
854
|
store.record_submitted_issue(
|
|
809
855
|
user_id=user_id,
|
|
810
|
-
user_name=
|
|
856
|
+
user_name=submitter_name,
|
|
811
857
|
project=project_label,
|
|
812
858
|
fname=fname,
|
|
813
859
|
description=description,
|