@rubytech/create-maxy 0.4.9 → 0.4.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-maxy",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
4
4
  "description": "Install Maxy — your personal AI assistant",
5
5
  "bin": {
6
6
  "create-maxy": "./dist/index.js"
@@ -65,9 +65,9 @@ function writeClaudeCredentials(creds: OAuthCredentials): void {
65
65
  { mode: 0o600 },
66
66
  )
67
67
 
68
- // 3. Set the access token as ANTHROPIC_API_KEY in the process environment
69
- // so the Agent SDK can use it immediately without restarting
70
- process.env.ANTHROPIC_API_KEY = creds.access
68
+ // 3. Set the access token as CLAUDE_CODE_OAUTH_TOKEN in the process environment
69
+ // so Claude Code / the Agent SDK can use it immediately without restarting
70
+ process.env.CLAUDE_CODE_OAUTH_TOKEN = creds.access
71
71
  }
72
72
 
73
73
  // --- Endpoints ---
@@ -6,14 +6,15 @@ import { homedir } from "node:os";
6
6
  const PLATFORM_ROOT = resolve(process.cwd(), "../platform");
7
7
  const ACCOUNTS_DIR = resolve(PLATFORM_ROOT, "config/accounts");
8
8
 
9
- // Load OAuth token from persistent storage if not already in env
10
- if (!process.env.ANTHROPIC_API_KEY) {
9
+ // Load OAuth token from persistent storage if not already in env.
10
+ // Claude Code reads CLAUDE_CODE_OAUTH_TOKEN for OAuth access tokens.
11
+ if (!process.env.CLAUDE_CODE_OAUTH_TOKEN) {
11
12
  const oauthFile = resolve(homedir(), ".maxy/.claude-oauth.json");
12
13
  if (existsSync(oauthFile)) {
13
14
  try {
14
15
  const creds = JSON.parse(readFileSync(oauthFile, "utf-8"));
15
16
  if (creds.accessToken) {
16
- process.env.ANTHROPIC_API_KEY = creds.accessToken;
17
+ process.env.CLAUDE_CODE_OAUTH_TOKEN = creds.accessToken;
17
18
  }
18
19
  } catch { /* ignore */ }
19
20
  }
@@ -254,7 +255,7 @@ export async function* invokeAgent(
254
255
  // Build system prompt from IDENTITY.md (if it exists) — otherwise minimal boundary
255
256
  const systemPrompt = identity ?? (agentType === "public"
256
257
  ? `You are a public agent. Read-only. Use memory-search before every response. Answer ONLY from results. NEVER use training data. British English.`
257
- : `You are an admin agent. Full access. Professional, concise. British English.`);
258
+ : `You are an admin agent. Full access. Professional, concise. British English. Be proactive — tell the user what needs doing and do it. Don't ask what they want.`);
258
259
 
259
260
  const resumeSessionId = sessionKey ? getAgentSessionId(sessionKey) : undefined;
260
261
 
@@ -365,10 +366,8 @@ export async function* invokeAgent(
365
366
  }
366
367
 
367
368
  if ("result" in msg) {
368
- const resultText = (msg as Record<string, unknown>).result as string;
369
- if (resultText) {
370
- yield { type: "text", content: resultText };
371
- }
369
+ // Don't emit text from result it duplicates what was already
370
+ // streamed via the assistant message content blocks above.
372
371
  yield { type: "done" };
373
372
  continue;
374
373
  }
@@ -61,7 +61,10 @@ export default function AdminPage() {
61
61
  if (appState === 'set-pin' || appState === 'enter-pin') {
62
62
  setTimeout(() => pinInputRef.current?.focus(), 100)
63
63
  }
64
- if (appState === 'chat') {
64
+ if (appState === 'chat' && messages.length === 0 && sessionKey) {
65
+ // Auto-greet: send an initial prompt so the agent proactively assesses the situation
66
+ setTimeout(() => sendMessage('Hello'), 300)
67
+ } else if (appState === 'chat') {
65
68
  setTimeout(() => inputRef.current?.focus(), 100)
66
69
  }
67
70
  }, [appState])
@@ -1,13 +1,21 @@
1
- # {{account_name}} — Admin Agent
1
+ # {{account_name}} — Head of Operations
2
2
 
3
- You are the admin agent for {{account_name}}.
3
+ You are the head of operations for {{account_name}}. Not an assistant waiting for instructions — a proactive operator who drives the business forward.
4
4
 
5
5
  ## Boundaries
6
6
 
7
- - You are an AI assistant. State this clearly if asked. Never impersonate a human.
8
- - You have full access to all MCP servers and Claude Code native tools.
9
- - You manage content, configuration, contacts, scheduling, and diagnostics.
10
- - Professional, concise, action-oriented. British English.
7
+ - You are an AI. State this clearly if asked. Never impersonate a human.
8
+ - You have full access to all platform tools and systems.
9
+ - Professional, direct, action-oriented. British English.
10
+
11
+ ## Behaviour
12
+
13
+ - Be proactive. Identify what needs doing and do it. Don't wait to be asked.
14
+ - When starting a new session, assess the state of the business and report what needs attention.
15
+ - On first setup, immediately begin onboarding: learn the business, understand the stage, gather customer details, build a comprehensive picture so you can drive operations forward.
16
+ - Ask about the business: what it does, who it serves, what stage it's at, what the priorities are.
17
+ - Think strategically. Help with planning, not just tasks.
18
+ - Surface problems before they become urgent. Recommend actions based on what you know.
11
19
 
12
20
  ## Skills
13
21