secondbrainos-mcp-server 1.10.2 → 1.10.4
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/build/index.js +17 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -696,6 +696,23 @@ An agent definition combines:
|
|
|
696
696
|
- Engages the user's **public-facing AI agent** configured at \`secondbrainos.com/dashboard > Agent Settings\`.
|
|
697
697
|
- Primarily used to fine-tune and test the agent: verify behaviour, validate knowledge retrieval, confirm tool availability, and debug tool execution end-to-end.
|
|
698
698
|
|
|
699
|
+
### First Connect: Time Hook & Basic Memories
|
|
700
|
+
Every agent on SBOS needs a correct clock and a name for the user. Do this once, before anything else, and skip whatever is already in place.
|
|
701
|
+
|
|
702
|
+
1. **Basic memories.** Check memory for the user's timezone (IANA name, e.g. \`Asia/Karachi\`), name, email, and location. If any is missing, ask once and save it. Every timestamp you pass to SBOS is derived from that timezone.
|
|
703
|
+
2. **Time hook.** Look for \`.claude/hooks/current-time.sh\` in the project. If it exists (an earlier session or an SBOS agent set it up), use it: run \`current-time.sh <TIMEZONE>\` whenever you need the current time and never guess the date. If it is absent, create it and register it, with the user's permission:
|
|
704
|
+
- \`.claude/hooks/current-time.sh\`: a short bash script that takes an IANA timezone as its only argument (default UTC) and prints two lines, the current time in UTC as an ISO-8601 string with a \`Z\` suffix, and the current time in the given timezone as ISO-8601 with a numeric offset. Make it executable.
|
|
705
|
+
- In \`.claude/settings.json\`, **append** (never overwrite the existing \`hooks\` object) a \`PreToolUse\` entry matching \`mcp__secondbrainos__addActivityEvent|mcp__secondbrainos__updateActivityState\` whose command runs the script with the user's timezone, e.g. \`"$CLAUDE_PROJECT_DIR"/.claude/hooks/current-time.sh Asia/Karachi\`. The hook injects the current time right before every logging call so timestamps are never invented.
|
|
706
|
+
- Add \`Bash(<absolute path>/.claude/hooks/current-time.sh:*)\` to \`permissions.allow\` so it runs without prompting.
|
|
707
|
+
3. Say in one line what you set up, or that it was already there.
|
|
708
|
+
|
|
709
|
+
### Progress Logging (\`updateActivityState\`, \`addActivityEvent\`)
|
|
710
|
+
- Every SBOS user has these. Use them so the user can see what you did, across however many agents are working in parallel.
|
|
711
|
+
- \`updateActivityState\` — set \`Active\` when you start working and \`Inactive\` when you stop (session start/end is a good proxy). Timestamps come from the time hook above, in the user's timezone from memory.
|
|
712
|
+
- **Only the main agent sets state.** Spawned sub-agents must never call \`updateActivityState\` — the user is one person having one working session, and a sub-agent finishing does not mean they stopped working. Sub-agents may still call \`addActivityEvent\`.
|
|
713
|
+
- \`addActivityEvent\` — log completed pieces of work, at the size the user would name if asked what they did today: \"drafted the launch email\", \"fixed the checkout bug\", not \"read a file\", \"ran a search\", \"edited line 40\". One event per finished piece of work — roughly what would earn its own line in a summary of the day. If in doubt, log less: a sparse, accurate stream is far more useful to the user than a complete one.
|
|
714
|
+
- The user reads these back on their dashboard, so write the summary for them, not for you.
|
|
715
|
+
|
|
699
716
|
### User State Tools (\`getUserServices\`, \`getUserCredits\`)
|
|
700
717
|
- \`getUserServices\` — returns services the user currently has access to. If this differs from the MCP tools available in this session, ask the user to reconnect the SBOS MCP server.
|
|
701
718
|
- \`getUserCredits\` — returns the user's available SBOS credits.
|