@misterhuydo/sentinel 1.0.97 → 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
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
|
@@ -179,6 +179,20 @@ When to act vs. when to ask:
|
|
|
179
179
|
- Unclear intent (could be either) → use judgment: brief explanation + "Want me to run this now?"
|
|
180
180
|
Never say "Stand by" or "Requesting..." and then return nothing. Either act, or ask.
|
|
181
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.
|
|
195
|
+
|
|
182
196
|
When the engineer's request is fully handled, end your LAST message with the token: [DONE]
|
|
183
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.
|
|
184
198
|
For greetings like "hello" or empty messages, introduce yourself briefly and offer help, then end with [DONE].
|
|
@@ -209,26 +223,35 @@ _TOOLS = [
|
|
|
209
223
|
{
|
|
210
224
|
"name": "create_issue",
|
|
211
225
|
"description": (
|
|
212
|
-
"Deliver a
|
|
213
|
-
"
|
|
214
|
-
"
|
|
215
|
-
"
|
|
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."
|
|
216
231
|
),
|
|
217
232
|
"input_schema": {
|
|
218
233
|
"type": "object",
|
|
219
234
|
"properties": {
|
|
220
235
|
"description": {
|
|
221
236
|
"type": "string",
|
|
222
|
-
"description": "Full task
|
|
237
|
+
"description": "Full problem/task description — include all context the user gave you",
|
|
223
238
|
},
|
|
224
239
|
"project": {
|
|
225
240
|
"type": "string",
|
|
226
|
-
"description": "Project short name
|
|
241
|
+
"description": "Project short name (e.g. '1881', 'elprint'). Ask if unclear.",
|
|
227
242
|
},
|
|
228
243
|
"target_repo": {
|
|
229
244
|
"type": "string",
|
|
230
245
|
"description": "Specific repo within the project (omit to let Sentinel auto-route)",
|
|
231
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
|
+
},
|
|
232
255
|
},
|
|
233
256
|
"required": ["description"],
|
|
234
257
|
},
|
|
@@ -796,10 +819,29 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
|
|
|
796
819
|
else:
|
|
797
820
|
project_dir = Path(".")
|
|
798
821
|
|
|
822
|
+
support_url = inputs.get("support_url", "").strip()
|
|
823
|
+
attachments_summary = inputs.get("attachments_summary", "").strip()
|
|
824
|
+
|
|
799
825
|
issues_dir = project_dir / "issues"
|
|
800
826
|
issues_dir.mkdir(exist_ok=True)
|
|
801
|
-
fname
|
|
802
|
-
|
|
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)
|
|
803
845
|
(issues_dir / fname).write_text(content, encoding="utf-8")
|
|
804
846
|
|
|
805
847
|
# Touch SENTINEL_POLL_NOW so the target instance picks it up immediately
|
|
@@ -811,7 +853,7 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
|
|
|
811
853
|
try:
|
|
812
854
|
store.record_submitted_issue(
|
|
813
855
|
user_id=user_id,
|
|
814
|
-
user_name=
|
|
856
|
+
user_name=submitter_name,
|
|
815
857
|
project=project_label,
|
|
816
858
|
fname=fname,
|
|
817
859
|
description=description,
|