@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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "message": "Auto-checkpoint at 2026-03-23T07:31:47.535Z",
3
- "checkpoint_at": "2026-03-23T07:31:47.537Z",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misterhuydo/sentinel",
3
- "version": "1.0.96",
3
+ "version": "1.0.98",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -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
- CRITICAL: Never narrate what you are about to do ("I'll check that now", "Stand by", "Requesting...").
176
- Just call the tool immediately and reply with the results. No pre-action commentary.
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 fix/task request to a Sentinel project instance. "
209
- "Use when the engineer says 'tell 1881 to do X', 'look into Y in project elprint', "
210
- "'implement this in 1881: ...'. Can target any project by short name. "
211
- "Defaults to the current project if no project is specified."
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/problem description — everything the engineer told you",
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 to deliver to (e.g. '1881', 'elprint'). Omit for current project.",
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 = f"slack-{uuid.uuid4().hex[:8]}.txt"
798
- content = (f"TARGET_REPO: {target_repo}\n\n" if target_repo else "") + description
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="", # resolved by caller if needed
856
+ user_name=submitter_name,
811
857
  project=project_label,
812
858
  fname=fname,
813
859
  description=description,