@glie/mcp-polaris 0.3.0 → 0.4.0
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/dist/index.js +157 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -510,6 +510,162 @@ var TOOLS = [
|
|
|
510
510
|
const qs = typeof args.limit === "number" ? `?limit=${args.limit}` : "";
|
|
511
511
|
return (await apiCall("GET", `/api/chats/${chatId}/messages${qs}`)).body;
|
|
512
512
|
}
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
name: "polaris.project.update",
|
|
516
|
+
description: "Update a project (human-only): repo_url, description_md, name, status (active|paused|archived), owner_human_id.",
|
|
517
|
+
inputSchema: objSchema({
|
|
518
|
+
key: strSchema("project key"),
|
|
519
|
+
name: strSchema(),
|
|
520
|
+
description_md: strSchema(),
|
|
521
|
+
repo_url: strSchema("github.com repo URL"),
|
|
522
|
+
status: strSchema("active|paused|archived"),
|
|
523
|
+
owner_human_id: intSchema()
|
|
524
|
+
}, ["key"]),
|
|
525
|
+
call: async (args) => {
|
|
526
|
+
const { key, ...patch } = args;
|
|
527
|
+
return (await apiCall("PATCH", `/api/projects/${key}`, patch)).body;
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
name: "polaris.project.claude_md_set",
|
|
532
|
+
description: "Set a project's CLAUDE.md \u2014 the conventions agents read. PUT the full markdown (human-only).",
|
|
533
|
+
inputSchema: objSchema({ key: strSchema("project key"), content: strSchema("full CLAUDE.md markdown") }, ["key", "content"]),
|
|
534
|
+
call: async (args) => (await apiCall("PUT", `/api/projects/${args.key}/claude-md`, { content: args.content })).body
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
name: "polaris.agent.create",
|
|
538
|
+
description: "Create an agent/employee (human-only). function: developer|tester|planner|communicator; product = project key; team = dev|mkt; domain optional (roadmap|helpdesk|both).",
|
|
539
|
+
inputSchema: objSchema({
|
|
540
|
+
agent_id_slug: strSchema("stable slug, e.g. developer-polaris-01"),
|
|
541
|
+
function: strSchema("developer|tester|planner|communicator"),
|
|
542
|
+
product: strSchema("project key"),
|
|
543
|
+
name: strSchema("friendly display name"),
|
|
544
|
+
team: strSchema("dev|mkt"),
|
|
545
|
+
domain: strSchema("roadmap|helpdesk|both")
|
|
546
|
+
}, ["agent_id_slug", "function", "product", "name", "team"]),
|
|
547
|
+
call: async (args) => (await apiCall("POST", "/api/agents", args)).body
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
name: "polaris.agent.update",
|
|
551
|
+
description: "Update an agent (human-only): name (rename), domain (roadmap|helpdesk|both), or mantra_md. The stable agent_id_slug never changes.",
|
|
552
|
+
inputSchema: objSchema({
|
|
553
|
+
id: intSchema(),
|
|
554
|
+
name: strSchema(),
|
|
555
|
+
domain: strSchema("roadmap|helpdesk|both"),
|
|
556
|
+
mantra_md: strSchema()
|
|
557
|
+
}, ["id"]),
|
|
558
|
+
call: async (args) => {
|
|
559
|
+
const { id, ...patch } = args;
|
|
560
|
+
return (await apiCall("PATCH", `/api/agents/${id}`, patch)).body;
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
name: "polaris.agent.token_issue",
|
|
565
|
+
description: "Issue a service token for an agent (human-only). Plaintext returned exactly once \u2014 store it.",
|
|
566
|
+
inputSchema: objSchema({ id: intSchema("agent id"), name: strSchema("token name") }, [
|
|
567
|
+
"id",
|
|
568
|
+
"name"
|
|
569
|
+
]),
|
|
570
|
+
call: async (args) => (await apiCall("POST", `/api/agents/${args.id}/tokens`, { name: args.name })).body
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
name: "polaris.agent.token_revoke",
|
|
574
|
+
description: "Revoke an agent service token (human-only). Idempotent.",
|
|
575
|
+
inputSchema: objSchema({ id: intSchema("agent id"), token_id: intSchema() }, [
|
|
576
|
+
"id",
|
|
577
|
+
"token_id"
|
|
578
|
+
]),
|
|
579
|
+
call: async (args) => (await apiCall("POST", `/api/agents/${args.id}/tokens/${args.token_id}/revoke`)).body
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
name: "polaris.agent.claude_login",
|
|
583
|
+
description: "Kick off an agent's Claude Code device-login (human-only). Poll agent.get for claude_login_url.",
|
|
584
|
+
inputSchema: objSchema({ id: intSchema("agent id") }, ["id"]),
|
|
585
|
+
call: async (args) => (await apiCall("POST", `/api/agents/${args.id}/claude-login`)).body
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
name: "polaris.agent.claude_login_code",
|
|
589
|
+
description: "Submit the OAuth callback code for an agent's Claude login (human-only).",
|
|
590
|
+
inputSchema: objSchema({ id: intSchema("agent id"), code: strSchema("callback code") }, [
|
|
591
|
+
"id",
|
|
592
|
+
"code"
|
|
593
|
+
]),
|
|
594
|
+
call: async (args) => (await apiCall("POST", `/api/agents/${args.id}/claude-login/code`, { code: args.code })).body
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
name: "polaris.milestone.create",
|
|
598
|
+
description: "Create a milestone. team = dev|mkt; end_date = deadline (ISO date, required); framework_key optional.",
|
|
599
|
+
inputSchema: objSchema({
|
|
600
|
+
project_key: strSchema(),
|
|
601
|
+
name: strSchema(),
|
|
602
|
+
team: strSchema("dev|mkt"),
|
|
603
|
+
end_date: strSchema("ISO date, e.g. 2026-06-30"),
|
|
604
|
+
framework_key: strSchema(),
|
|
605
|
+
description_md: strSchema()
|
|
606
|
+
}, ["project_key", "name", "team", "end_date"]),
|
|
607
|
+
call: async (args) => (await apiCall("POST", "/api/milestones", args)).body
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
name: "polaris.stack.create",
|
|
611
|
+
description: "Create a stack (Release Candidate) from 2+ approval tasks of ONE milestone \u2014 shipped together. Pass task_ids.",
|
|
612
|
+
inputSchema: objSchema({
|
|
613
|
+
task_ids: {
|
|
614
|
+
type: "array",
|
|
615
|
+
items: { type: "integer" },
|
|
616
|
+
description: "task ids (>=2, same milestone, dependency-independent)"
|
|
617
|
+
}
|
|
618
|
+
}, ["task_ids"]),
|
|
619
|
+
call: async (args) => (await apiCall("POST", "/api/stacks", { task_ids: args.task_ids })).body
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
name: "polaris.stack.add_task",
|
|
623
|
+
description: "Add a task to a stack while it's assembling.",
|
|
624
|
+
inputSchema: objSchema({ id: intSchema("stack id"), task_id: intSchema() }, ["id", "task_id"]),
|
|
625
|
+
call: async (args) => (await apiCall("POST", `/api/stacks/${args.id}/tasks`, { task_id: args.task_id })).body
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
name: "polaris.stack.remove_task",
|
|
629
|
+
description: "Remove a task from a stack (its individual PR reopens). Removing the last member cancels the stack.",
|
|
630
|
+
inputSchema: objSchema({ id: intSchema("stack id"), task_id: intSchema() }, ["id", "task_id"]),
|
|
631
|
+
call: async (args) => (await apiCall("DELETE", `/api/stacks/${args.id}/tasks`, { task_id: args.task_id })).body
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
name: "polaris.task.return_to_backlog",
|
|
635
|
+
description: "Send an approval task back for rework (human-only) \u2014 to its sticky developer (dev) or backlog. Clears escalation.",
|
|
636
|
+
inputSchema: objSchema({ id: intSchema() }, ["id"]),
|
|
637
|
+
call: async (args) => (await apiCall("POST", `/api/tasks/${args.id}/return-to-backlog`)).body
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
name: "polaris.chat.post",
|
|
641
|
+
description: "Post a message to a scope's feed/chat (task|milestone|project|agent_dm|human_dm|general). Author is YOU (from the token). @mentions render.",
|
|
642
|
+
inputSchema: objSchema({
|
|
643
|
+
scope_type: strSchema("task|milestone|project|agent_dm|human_dm|general"),
|
|
644
|
+
scope_id: intSchema(),
|
|
645
|
+
body_md: strSchema("markdown message")
|
|
646
|
+
}, ["scope_type", "scope_id", "body_md"]),
|
|
647
|
+
call: async (args) => {
|
|
648
|
+
const chat = (await apiCall("GET", `/api/chats/${args.scope_type}/${args.scope_id}`)).body;
|
|
649
|
+
const chatId = chat?.data?.id;
|
|
650
|
+
if (!chatId)
|
|
651
|
+
throw new Error(`no chat for ${args.scope_type}/${args.scope_id}`);
|
|
652
|
+
return (await apiCall("POST", `/api/chats/${chatId}/messages`, {
|
|
653
|
+
author_type: "human",
|
|
654
|
+
body_md: args.body_md
|
|
655
|
+
})).body;
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
name: "polaris.human.token_issue",
|
|
660
|
+
description: "Issue a Personal Access Token for YOU (the calling human). Plaintext returned once \u2014 used by mcp-polaris / automation you own.",
|
|
661
|
+
inputSchema: objSchema({ name: strSchema("token name") }, ["name"]),
|
|
662
|
+
call: async (args) => (await apiCall("POST", "/api/humans/me/tokens", { name: args.name })).body
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
name: "polaris.human.token_revoke",
|
|
666
|
+
description: "Revoke one of YOUR Personal Access Tokens. Idempotent.",
|
|
667
|
+
inputSchema: objSchema({ token_id: intSchema() }, ["token_id"]),
|
|
668
|
+
call: async (args) => (await apiCall("POST", `/api/humans/me/tokens/${args.token_id}/revoke`)).body
|
|
513
669
|
}
|
|
514
670
|
];
|
|
515
671
|
var TOOLS_BY_NAME = new Map(TOOLS.map((t) => [t.name, t]));
|
|
@@ -566,7 +722,7 @@ async function handle(req) {
|
|
|
566
722
|
return fail(id, -32601, `method not found: ${req.method}`);
|
|
567
723
|
}
|
|
568
724
|
}
|
|
569
|
-
if (
|
|
725
|
+
if (true) {
|
|
570
726
|
log(`starting against ${BASE} (token=${TOKEN ? "set" : "none"})`);
|
|
571
727
|
const rl = createInterface({ input: process.stdin, crlfDelay: Number.POSITIVE_INFINITY });
|
|
572
728
|
rl.on("line", async (line) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glie/mcp-polaris",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Model Context Protocol (stdio) server exposing Polaris — glie's ops platform — as native tools in Claude Code and any MCP client.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "glie <carlos@glie.ai>",
|