@glie/mcp-polaris 0.21.0 → 0.22.2

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.
Files changed (2) hide show
  1. package/dist/index.js +61 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ var INLINE_MIMES = new Set([
30
30
  ]);
31
31
 
32
32
  // ../../src/mcp/index.ts
33
- var VERSION = "0.21.0";
33
+ var VERSION = "0.22.2";
34
34
  var FRAMEWORK_KEY_DOC = "optional \u2014 a key from polaris.framework.list. Leave it out when none applies: a framework is for founding a large domain, and most milestones take none. An unknown key is refused (400) with the keys that exist.";
35
35
  var BASE = process.env.POLARIS_URL ?? "http://127.0.0.1:7843";
36
36
  var TOKEN = process.env.POLARIS_TOKEN ?? "";
@@ -121,6 +121,8 @@ var INSTRUCTIONS = [
121
121
  '\u2022 "Leave the next person a note" \u2192 polaris.ticket.reply with internal=true \u2014 what you checked or suspect, in the thread, never sent to the customer (it moves no counter, no ball, no status)',
122
122
  '\u2022 "Turn a report into work" \u2192 polaris.ticket.frame_issue \u2192 polaris.issue.add_task \xD7N (framing is HUMAN-only; the helpdesker proposes it)',
123
123
  '\u2022 "Same bug reported again" \u2192 polaris.ticket.link_issue (dedup onto the open issue; HUMAN-only) \u2192 say we already have it \u2192 close the duplicate ticket',
124
+ '\u2022 "What is the queue mostly about?" \u2192 polaris.ticket_topic.list \u2014 the open tickets grouped by complaint, biggest pile first. A topic is a READING, not a commitment: no state, no tasks, nothing on the board',
125
+ '\u2022 "These are all the same thing" \u2192 polaris.ticket_topic.create then polaris.ticket_topic.add_tickets (a batch). Propose the grouping to the person first; it moves no status, no ball, no message',
124
126
  "",
125
127
  "Identifiers: projects by `key` (string, e.g. saasA); milestones/tasks/agents/stacks by numeric `id`. Writes need a token; reads work anonymously."
126
128
  ].join(`
@@ -501,6 +503,8 @@ var TOOLS = [
501
503
  link_url: strSchema("mkt: WHERE THE PIECE SENDS THE READER \u2014 the full URL, tracking parameters already in " + "it. Required on a PAID piece: the network does not create an ad without a " + "destination, and the click leaves through the ad itself. On an organic piece it is " + "optional, because there the link travels in the body text."),
502
504
  output_type: strSchema("pr|post|video|email|generic \u2014 the delivery medium. Omit it: the format decides (reel/v\xEDdeo/short \u2192 video). Only pass it to override."),
503
505
  scheduled_date: strSchema("mkt: publish day (ISO date) \u2014 the calendar slot"),
506
+ publish_time: strSchema("mkt: the hour it publishes (HH:MM), when it is already known \u2014 needs scheduled_date and publish_tz"),
507
+ publish_tz: strSchema("mkt: whose clock publish_time is in (IANA zone, e.g. America/Sao_Paulo) \u2014 required with publish_time"),
504
508
  platform: strSchema("mkt: ad platform if this creative is individually paid"),
505
509
  asset_url: strSchema("mkt: URL of the produced creative asset (image/video) for the reviewer")
506
510
  }, ["name"]),
@@ -613,7 +617,7 @@ var TOOLS = [
613
617
  },
614
618
  {
615
619
  name: "polaris.task.unschedule",
616
- description: "Unschedule a mkt creative: agendado \u2192 approval. Refused once the post is live. The creative returns to approval for edits or re-scheduling.",
620
+ description: "Unschedule a mkt creative: agendado \u2192 release. Refused once the post is live. The creative is back where scheduling took it from \u2014 approved, ready to go out, no hour handed to the publisher \u2014 to edit, schedule again, or publish now. Its hour stays unless it has passed.",
617
621
  inputSchema: objSchema({ id: intSchema() }, ["id"]),
618
622
  call: async (args) => (await apiCall("POST", `/api/tasks/${args.id}/unschedule`)).body
619
623
  },
@@ -758,6 +762,61 @@ var TOOLS = [
758
762
  guidance: args.guidance
759
763
  })).body
760
764
  },
765
+ {
766
+ name: "polaris.ticket_topic.list",
767
+ description: 'The shape of the support queue: every topic of a project with how many open tickets sit under it, biggest pile first. A topic is a name in plain language over the conversations that report the same complaint, so 35 open tickets read as "15 of this, 10 of that, 5 of the other". It carries no state, no dates, no owner and no tasks, and it is never on the board or the timeline: it exists so a person can see the pile grouped and then decide what deserves an issue. Read this BEFORE naming a new topic, because the one you want usually exists.',
768
+ inputSchema: objSchema({ project_key: strSchema() }),
769
+ call: async (args) => {
770
+ const qs = new URLSearchParams;
771
+ if (typeof args.project_key === "string")
772
+ qs.set("project_key", args.project_key);
773
+ const s = qs.toString();
774
+ return (await apiCall("GET", `/api/ticket-topics${s ? `?${s}` : ""}`)).body;
775
+ }
776
+ },
777
+ {
778
+ name: "polaris.ticket_topic.get",
779
+ description: "One topic and the ids of the tickets under it: what to read before proposing the grouping to the person, or before framing an issue over the pile.",
780
+ inputSchema: objSchema({ id: intSchema() }, ["id"]),
781
+ call: async (args) => (await apiCall("GET", `/api/ticket-topics/${args.id}`)).body
782
+ },
783
+ {
784
+ name: "polaris.ticket_topic.create",
785
+ description: 'Name a topic. Say the complaint the way the customer says it ("login with Google fails"), never the suspected cause and never a fix. Idempotent on the name: naming one that exists returns it, instead of splitting one pile in two and making the counts lie. Naming a topic commits to nothing, and a pile that deserves work still goes through ticket.frame_issue.',
786
+ inputSchema: objSchema({ project_key: strSchema(), name: strSchema("the complaint in plain language") }, ["project_key", "name"]),
787
+ call: async (args) => (await apiCall("POST", "/api/ticket-topics", {
788
+ project_key: args.project_key,
789
+ name: args.name
790
+ })).body
791
+ },
792
+ {
793
+ name: "polaris.ticket_topic.add_tickets",
794
+ description: 'Put tickets under a topic, as a batch, because that is how the work happens: "these fifteen are the same complaint". Read the queue with ticket.list, propose the grouping to the person in their own words, and write it once they agree. It touches nothing on the tickets: no status, no ball, no message in the thread, nothing the customer sees. Running it twice changes nothing. Every ticket must belong to the topic project.',
795
+ inputSchema: objSchema({ id: intSchema(), ticket_ids: { type: "array", items: { type: "integer" } } }, ["id", "ticket_ids"]),
796
+ call: async (args) => (await apiCall("POST", `/api/ticket-topics/${args.id}/tickets`, {
797
+ ticket_ids: args.ticket_ids
798
+ })).body
799
+ },
800
+ {
801
+ name: "polaris.ticket_topic.remove_tickets",
802
+ description: "Take tickets out of a topic (a grouping that turned out wrong). A ticket that was never under it is not an error, and nothing on the ticket changes.",
803
+ inputSchema: objSchema({ id: intSchema(), ticket_ids: { type: "array", items: { type: "integer" } } }, ["id", "ticket_ids"]),
804
+ call: async (args) => (await apiCall("DELETE", `/api/ticket-topics/${args.id}/tickets`, {
805
+ ticket_ids: args.ticket_ids
806
+ })).body
807
+ },
808
+ {
809
+ name: "polaris.ticket_topic.rename",
810
+ description: "Rename a topic. HUMAN ONLY: an agent token gets 403, because a reading someone wrote is not an agent's to rewrite.",
811
+ inputSchema: objSchema({ id: intSchema(), name: strSchema() }, ["id", "name"]),
812
+ call: async (args) => (await apiCall("PATCH", `/api/ticket-topics/${args.id}`, { name: args.name })).body
813
+ },
814
+ {
815
+ name: "polaris.ticket_topic.delete",
816
+ description: "Drop a topic. The tickets stay exactly as they are: what is lost is a reading of the queue and nothing else. HUMAN ONLY: an agent token gets 403.",
817
+ inputSchema: objSchema({ id: intSchema() }, ["id"]),
818
+ call: async (args) => (await apiCall("DELETE", `/api/ticket-topics/${args.id}`)).body
819
+ },
761
820
  {
762
821
  name: "polaris.issue.list",
763
822
  description: "List issues (the problems) for a project. Filter by status: open|triaging|fixing|resolved|canceled.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glie/mcp-polaris",
3
- "version": "0.21.0",
3
+ "version": "0.22.2",
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>",