@damian87/omp 0.8.0 → 0.9.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.
- package/.github/skills/slack/SKILL.md +82 -0
- package/README.md +36 -38
- package/catalog/capabilities.json +46 -0
- package/catalog/skills-general.json +26 -0
- package/dist/src/cli.js +58 -5
- package/dist/src/cli.js.map +1 -1
- package/dist/src/copilot/version.js +10 -0
- package/dist/src/copilot/version.js.map +1 -1
- package/dist/src/env/init.d.ts +6 -0
- package/dist/src/env/init.js +18 -0
- package/dist/src/env/init.js.map +1 -1
- package/dist/src/gateway/notify.d.ts +35 -0
- package/dist/src/gateway/notify.js +261 -0
- package/dist/src/gateway/notify.js.map +1 -0
- package/dist/src/gateway/target-parser.d.ts +76 -0
- package/dist/src/gateway/target-parser.js +105 -0
- package/dist/src/gateway/target-parser.js.map +1 -0
- package/dist/src/schedule/commands.js +1 -0
- package/dist/src/schedule/commands.js.map +1 -1
- package/dist/src/schedule/runner.d.ts +9 -0
- package/dist/src/schedule/runner.js +31 -1
- package/dist/src/schedule/runner.js.map +1 -1
- package/dist/src/schedule/types.d.ts +9 -0
- package/docs/slack-setup.md +33 -0
- package/package.json +11 -3
- package/plugin.json +12 -4
- package/scripts/lib/version-check.mjs +3 -0
- package/dist/src/mcp/server.d.ts +0 -10
- package/dist/src/mcp/server.js +0 -44
- package/dist/src/mcp/server.js.map +0 -1
- package/dist/src/mcp/tools/daily-log.d.ts +0 -2
- package/dist/src/mcp/tools/daily-log.js +0 -148
- package/dist/src/mcp/tools/daily-log.js.map +0 -1
- package/dist/src/mcp/tools/index.d.ts +0 -9
- package/dist/src/mcp/tools/index.js +0 -15
- package/dist/src/mcp/tools/index.js.map +0 -1
- package/dist/src/mcp/tools/notepad.d.ts +0 -2
- package/dist/src/mcp/tools/notepad.js +0 -135
- package/dist/src/mcp/tools/notepad.js.map +0 -1
- package/dist/src/mcp/tools/project-memory.d.ts +0 -2
- package/dist/src/mcp/tools/project-memory.js +0 -91
- package/dist/src/mcp/tools/project-memory.js.map +0 -1
- package/dist/src/mcp/tools/shared-memory.d.ts +0 -2
- package/dist/src/mcp/tools/shared-memory.js +0 -148
- package/dist/src/mcp/tools/shared-memory.js.map +0 -1
- package/dist/src/mcp/tools/state.d.ts +0 -2
- package/dist/src/mcp/tools/state.js +0 -107
- package/dist/src/mcp/tools/state.js.map +0 -1
- package/dist/src/mcp/tools/trace.d.ts +0 -10
- package/dist/src/mcp/tools/trace.js +0 -102
- package/dist/src/mcp/tools/trace.js.map +0 -1
- package/dist/src/mcp/types.d.ts +0 -29
- package/dist/src/mcp/types.js +0 -7
- package/dist/src/mcp/types.js.map +0 -1
- package/dist/test/catalog.test.d.ts +0 -1
- package/dist/test/catalog.test.js +0 -21
- package/dist/test/catalog.test.js.map +0 -1
- package/dist/test/jira.test.d.ts +0 -1
- package/dist/test/jira.test.js +0 -26
- package/dist/test/jira.test.js.map +0 -1
- package/dist/test/lint.test.d.ts +0 -1
- package/dist/test/lint.test.js +0 -9
- package/dist/test/lint.test.js.map +0 -1
- package/dist/test/sync.test.d.ts +0 -1
- package/dist/test/sync.test.js +0 -15
- package/dist/test/sync.test.js.map +0 -1
package/docs/slack-setup.md
CHANGED
|
@@ -142,3 +142,36 @@ scripts keep running.
|
|
|
142
142
|
- One Copilot session at a time (multiple `omp-<digits>` sessions → the bridge reports the
|
|
143
143
|
ambiguity and asks you to pin `COPILOT_TMUX_SESSION`).
|
|
144
144
|
- `omp gateway serve` is a long-running foreground process — run it under tmux/systemd to keep it up.
|
|
145
|
+
|
|
146
|
+
## Outbound notifications (`omp gateway notify` + `/slack`)
|
|
147
|
+
|
|
148
|
+
The v0.8.0 inbound bridge above handles bidirectional chat (DM the bot → reply). For *outbound*
|
|
149
|
+
notifications (cron job results, ad-hoc "ping me when done", `/slack` in-session), you don't
|
|
150
|
+
need the gateway daemon running — outbound is a stateless REST call to `chat.postMessage`.
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Default target lives in ~/.omp/.env (set during `omp env init`):
|
|
154
|
+
SLACK_HOME_CHANNEL=C0BOQV5434G # channel ID, or a user ID like U0123ABCD
|
|
155
|
+
|
|
156
|
+
# One-shot send (uses SLACK_HOME_CHANNEL):
|
|
157
|
+
omp gateway notify --text "deploy finished"
|
|
158
|
+
|
|
159
|
+
# Explicit target overrides:
|
|
160
|
+
omp gateway notify --text "hi #releases" --target slack:C0RELEASE9
|
|
161
|
+
omp gateway notify --text "PR review please" --target slack:U0123ABCD # auto-DMs the user
|
|
162
|
+
|
|
163
|
+
# Inside Copilot — same thing via skill:
|
|
164
|
+
/slack the migration just finished cleanly
|
|
165
|
+
|
|
166
|
+
# Cron job posts its result at end-of-run:
|
|
167
|
+
omp schedule add --id pr-watch --cron "*/15 * * * *" --prompt "..." \
|
|
168
|
+
--notify-target slack:U0123ABCD
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Accepted target prefixes: `C` (public channel), `G` (private channel), `D` (DM channel),
|
|
172
|
+
`U` (user — we auto-call `conversations.open` to convert to a DM). Append `:<thread_ts>` to
|
|
173
|
+
pin to a thread (or pass `--thread-ts`).
|
|
174
|
+
|
|
175
|
+
Failure codes (`omp gateway notify --json` returns them):
|
|
176
|
+
`MISSING_TOKEN`, `MISSING_TARGET`, `BAD_TARGET`, `BAD_HOME_CHANNEL`, `OPEN_FAILED`,
|
|
177
|
+
`POST_FAILED`, `RATE_LIMITED`, `TIMEOUT`, `NETWORK_ERROR`.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@damian87/omp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "GitHub Copilot
|
|
3
|
+
"version": "0.9.2",
|
|
4
|
+
"description": "Multi-agent orchestration for GitHub Copilot CLI — autonomous loops (Autopilot, Ralph, UltraQA, Ultrawork), parallel tmux agent teams, a weighted-consensus model council, a Slack chat bridge, durable scheduled jobs, and in-session skills + custom agents. Zero learning curve.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -42,7 +42,15 @@
|
|
|
42
42
|
"copilot",
|
|
43
43
|
"skills",
|
|
44
44
|
"agents",
|
|
45
|
-
"slash-commands"
|
|
45
|
+
"slash-commands",
|
|
46
|
+
"orchestration",
|
|
47
|
+
"multi-agent",
|
|
48
|
+
"ai-agents",
|
|
49
|
+
"tmux",
|
|
50
|
+
"automation",
|
|
51
|
+
"autopilot",
|
|
52
|
+
"slack",
|
|
53
|
+
"cli"
|
|
46
54
|
],
|
|
47
55
|
"license": "MIT",
|
|
48
56
|
"engines": {
|
package/plugin.json
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-copilot",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "0.
|
|
5
|
-
"author": {
|
|
3
|
+
"description": "Multi-agent orchestration skills for GitHub Copilot CLI — autopilot, ralph, ultrawork, ultraqa, team, council, code-review and more as in-session slash skills + custom agents.",
|
|
4
|
+
"version": "0.9.2",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Damian Borek",
|
|
7
|
+
"email": "borekdamian@yahoo.pl"
|
|
8
|
+
},
|
|
6
9
|
"license": "MIT",
|
|
7
10
|
"repository": "https://github.com/damian87x/oh-my-copilot",
|
|
8
|
-
"keywords": [
|
|
11
|
+
"keywords": [
|
|
12
|
+
"copilot",
|
|
13
|
+
"skills",
|
|
14
|
+
"agents",
|
|
15
|
+
"slash-commands"
|
|
16
|
+
],
|
|
9
17
|
"skills": ".github/skills/",
|
|
10
18
|
"agents": ".github/agents/",
|
|
11
19
|
"instructions": ".github/copilot-instructions.md",
|
|
@@ -5,6 +5,7 @@ import { fileURLToPath } from "node:url";
|
|
|
5
5
|
const CACHE_TTL_MS = 6 * 60 * 60 * 1000;
|
|
6
6
|
const FETCH_TIMEOUT_MS = 2000;
|
|
7
7
|
const PACKAGE_NAME = "@damian87/omp";
|
|
8
|
+
const VERSION_OVERRIDE_ENV = "OMP_VERSION_OVERRIDE";
|
|
8
9
|
|
|
9
10
|
export function isNewer(latest, current) {
|
|
10
11
|
if (!latest || !current) return false;
|
|
@@ -21,6 +22,8 @@ export function formatUpdateNotice(current, latest) {
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export function readCurrentVersion() {
|
|
25
|
+
const overriddenVersion = process.env[VERSION_OVERRIDE_ENV]?.trim();
|
|
26
|
+
if (overriddenVersion) return overriddenVersion;
|
|
24
27
|
try {
|
|
25
28
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
26
29
|
const pkgPath = join(here, "..", "..", "package.json");
|
package/dist/src/mcp/server.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
-
import type { ToolDefinition } from "./types.js";
|
|
3
|
-
export interface ServerOptions {
|
|
4
|
-
name?: string;
|
|
5
|
-
version?: string;
|
|
6
|
-
tools: ToolDefinition[];
|
|
7
|
-
}
|
|
8
|
-
export declare function filterToolsByEnv(tools: ToolDefinition[], envValue?: string | undefined): ToolDefinition[];
|
|
9
|
-
export declare function buildMcpServer(options: ServerOptions): Server;
|
|
10
|
-
export declare function runMcpServer(options: ServerOptions): Promise<void>;
|
package/dist/src/mcp/server.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
-
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
4
|
-
import { textResult } from "./types.js";
|
|
5
|
-
export function filterToolsByEnv(tools, envValue = process.env.OMP_DISABLE_TOOLS ?? process.env.OMC_DISABLE_TOOLS) {
|
|
6
|
-
if (!envValue)
|
|
7
|
-
return tools;
|
|
8
|
-
const disabled = new Set(envValue.split(",").map((s) => s.trim()).filter(Boolean));
|
|
9
|
-
if (disabled.size === 0)
|
|
10
|
-
return tools;
|
|
11
|
-
return tools.filter((t) => !disabled.has(t.category));
|
|
12
|
-
}
|
|
13
|
-
export function buildMcpServer(options) {
|
|
14
|
-
const server = new Server({ name: options.name ?? "oh-my-copilot", version: options.version ?? "0.1.0" }, { capabilities: { tools: {} } });
|
|
15
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
16
|
-
tools: options.tools.map((t) => ({
|
|
17
|
-
name: t.name,
|
|
18
|
-
description: t.description,
|
|
19
|
-
inputSchema: t.inputSchema,
|
|
20
|
-
})),
|
|
21
|
-
}));
|
|
22
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
23
|
-
const tool = options.tools.find((t) => t.name === request.params.name);
|
|
24
|
-
if (!tool)
|
|
25
|
-
return textResult(`Unknown tool: ${request.params.name}`, true);
|
|
26
|
-
try {
|
|
27
|
-
const args = (request.params.arguments ?? {});
|
|
28
|
-
const result = await tool.handler(args);
|
|
29
|
-
return result;
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
33
|
-
return textResult(`Error: ${message}`, true);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
return server;
|
|
37
|
-
}
|
|
38
|
-
export async function runMcpServer(options) {
|
|
39
|
-
const server = buildMcpServer(options);
|
|
40
|
-
const transport = new StdioServerTransport();
|
|
41
|
-
await server.connect(transport);
|
|
42
|
-
console.error(`MCP server running (${options.tools.length} tools)`);
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=server.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/mcp/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,O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
|
|
|
1
|
-
import { existsSync, mkdirSync, readdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { dirname, join, resolve } from "node:path";
|
|
3
|
-
import { jsonResult, textResult } from "../types.js";
|
|
4
|
-
const DAY_FILE_RE = /^\d{4}-\d{2}-\d{2}\.md$/;
|
|
5
|
-
const READ_CHAR_BUDGET = 4000;
|
|
6
|
-
function pad(n) {
|
|
7
|
-
return String(n).padStart(2, "0");
|
|
8
|
-
}
|
|
9
|
-
function todayStr(d = new Date()) {
|
|
10
|
-
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
|
|
11
|
-
}
|
|
12
|
-
function timeStr(d = new Date()) {
|
|
13
|
-
return `${pad(d.getHours())}:${pad(d.getMinutes())}`;
|
|
14
|
-
}
|
|
15
|
-
function dailyDir(cwd) {
|
|
16
|
-
return join(resolve(cwd), ".omp", "memory", "daily");
|
|
17
|
-
}
|
|
18
|
-
function dayFile(cwd, date = todayStr()) {
|
|
19
|
-
return join(dailyDir(cwd), `${date}.md`);
|
|
20
|
-
}
|
|
21
|
-
function parseDay(text) {
|
|
22
|
-
let section = null;
|
|
23
|
-
const goalLines = [];
|
|
24
|
-
const log = [];
|
|
25
|
-
for (const line of text.split("\n")) {
|
|
26
|
-
if (/^#\s+/.test(line))
|
|
27
|
-
continue;
|
|
28
|
-
if (/^##\s+Goal\s*$/i.test(line)) {
|
|
29
|
-
section = "goal";
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
if (/^##\s+Log\s*$/i.test(line)) {
|
|
33
|
-
section = "log";
|
|
34
|
-
continue;
|
|
35
|
-
}
|
|
36
|
-
if (section === "goal")
|
|
37
|
-
goalLines.push(line);
|
|
38
|
-
// Preserve any non-empty line a user may have hand-written, verbatim (bullets,
|
|
39
|
-
// prose, indented sub-notes). Only blank spacer lines are dropped on round-trip.
|
|
40
|
-
else if (section === "log" && line.trim() !== "")
|
|
41
|
-
log.push(line);
|
|
42
|
-
}
|
|
43
|
-
return { goal: goalLines.join("\n").trim(), log };
|
|
44
|
-
}
|
|
45
|
-
function serializeDay(date, doc) {
|
|
46
|
-
const parts = [`# ${date}`, "", "## Goal", doc.goal.trim(), "", "## Log", ...doc.log];
|
|
47
|
-
return `${parts.join("\n").replace(/\n+$/, "")}\n`;
|
|
48
|
-
}
|
|
49
|
-
function readDay(cwd, date = todayStr()) {
|
|
50
|
-
const p = dayFile(cwd, date);
|
|
51
|
-
if (!existsSync(p))
|
|
52
|
-
return { goal: "", log: [] };
|
|
53
|
-
try {
|
|
54
|
-
return parseDay(readFileSync(p, "utf8"));
|
|
55
|
-
}
|
|
56
|
-
catch {
|
|
57
|
-
return { goal: "", log: [] };
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function writeDay(cwd, doc, date = todayStr()) {
|
|
61
|
-
const p = dayFile(cwd, date);
|
|
62
|
-
mkdirSync(dirname(p), { recursive: true });
|
|
63
|
-
const tmp = `${p}.tmp.${process.pid}.${Date.now()}`;
|
|
64
|
-
writeFileSync(tmp, serializeDay(date, doc), "utf8");
|
|
65
|
-
renameSync(tmp, p);
|
|
66
|
-
}
|
|
67
|
-
function readRecent(cwd, days) {
|
|
68
|
-
const dir = dailyDir(cwd);
|
|
69
|
-
if (!existsSync(dir))
|
|
70
|
-
return "";
|
|
71
|
-
const files = readdirSync(dir)
|
|
72
|
-
.filter((f) => DAY_FILE_RE.test(f))
|
|
73
|
-
.sort()
|
|
74
|
-
.reverse()
|
|
75
|
-
.slice(0, Math.max(0, days) + 1);
|
|
76
|
-
let out = "";
|
|
77
|
-
for (const f of files) {
|
|
78
|
-
try {
|
|
79
|
-
out += `${readFileSync(join(dir, f), "utf8").trim()}\n\n`;
|
|
80
|
-
}
|
|
81
|
-
catch {
|
|
82
|
-
// skip unreadable day file
|
|
83
|
-
}
|
|
84
|
-
if (out.length > READ_CHAR_BUDGET) {
|
|
85
|
-
out = `${out.slice(0, READ_CHAR_BUDGET)}\n…(truncated)`;
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return out.trim();
|
|
90
|
-
}
|
|
91
|
-
export const dailyLogTools = [
|
|
92
|
-
{
|
|
93
|
-
name: "daily_log_set_goal",
|
|
94
|
-
category: "daily_log",
|
|
95
|
-
description: "Set/replace today's Goal in .omp/memory/daily/<today>.md.",
|
|
96
|
-
inputSchema: {
|
|
97
|
-
type: "object",
|
|
98
|
-
properties: { goal: { type: "string" }, cwd: { type: "string" } },
|
|
99
|
-
required: ["goal"],
|
|
100
|
-
},
|
|
101
|
-
handler: (args) => {
|
|
102
|
-
const cwd = args.cwd ?? process.cwd();
|
|
103
|
-
const doc = readDay(cwd);
|
|
104
|
-
doc.goal = String(args.goal ?? "");
|
|
105
|
-
writeDay(cwd, doc);
|
|
106
|
-
return jsonResult({ ok: true, date: todayStr(), goal: doc.goal });
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: "daily_log_add",
|
|
111
|
-
category: "daily_log",
|
|
112
|
-
description: "Append a timestamped entry to today's Log in .omp/memory/daily/<today>.md.",
|
|
113
|
-
inputSchema: {
|
|
114
|
-
type: "object",
|
|
115
|
-
properties: { text: { type: "string" }, cwd: { type: "string" } },
|
|
116
|
-
required: ["text"],
|
|
117
|
-
},
|
|
118
|
-
handler: (args) => {
|
|
119
|
-
const cwd = args.cwd ?? process.cwd();
|
|
120
|
-
// Collapse to a single line so an entry can never contain a `## Goal`/`## Log`
|
|
121
|
-
// marker that parseDay would later misread as a section boundary.
|
|
122
|
-
const text = String(args.text ?? "")
|
|
123
|
-
.replace(/\s*\n\s*/g, " ")
|
|
124
|
-
.trim();
|
|
125
|
-
if (!text)
|
|
126
|
-
return jsonResult({ ok: false, error: "text is required" });
|
|
127
|
-
const doc = readDay(cwd);
|
|
128
|
-
doc.log.push(`- ${timeStr()} — ${text}`);
|
|
129
|
-
writeDay(cwd, doc);
|
|
130
|
-
return jsonResult({ ok: true, date: todayStr(), count: doc.log.length });
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
name: "daily_log_read",
|
|
135
|
-
category: "daily_log",
|
|
136
|
-
description: "Read the daily log for today plus the previous `days` days (default 1). Char-capped to ~4KB.",
|
|
137
|
-
inputSchema: {
|
|
138
|
-
type: "object",
|
|
139
|
-
properties: { days: { type: "number" }, cwd: { type: "string" } },
|
|
140
|
-
},
|
|
141
|
-
handler: (args) => {
|
|
142
|
-
const cwd = args.cwd ?? process.cwd();
|
|
143
|
-
const days = typeof args.days === "number" ? args.days : 1;
|
|
144
|
-
return textResult(readRecent(cwd, days) || "(no daily log entries)");
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
];
|
|
148
|
-
//# sourceMappingURL=daily-log.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"daily-log.js","sourceRoot":"","sources":["../../../../src/mcp/tools/daily-log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAuB,MAAM,aAAa,CAAC;AAO1E,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAC9C,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B,SAAS,GAAG,CAAC,CAAS;IACpB,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,QAAQ,CAAC,CAAC,GAAG,IAAI,IAAI,EAAE;IAC9B,OAAO,GAAG,CAAC,CAAC,WAAW,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,C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types.js";
|
|
2
|
-
import { stateTools } from "./state.js";
|
|
3
|
-
import { notepadTools } from "./notepad.js";
|
|
4
|
-
import { projectMemoryTools } from "./project-memory.js";
|
|
5
|
-
import { sharedMemoryTools } from "./shared-memory.js";
|
|
6
|
-
import { traceTools } from "./trace.js";
|
|
7
|
-
export declare const allTools: ToolDefinition[];
|
|
8
|
-
export { stateTools, notepadTools, projectMemoryTools, sharedMemoryTools, traceTools };
|
|
9
|
-
export { appendTraceEntry } from "./trace.js";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { stateTools } from "./state.js";
|
|
2
|
-
import { notepadTools } from "./notepad.js";
|
|
3
|
-
import { projectMemoryTools } from "./project-memory.js";
|
|
4
|
-
import { sharedMemoryTools } from "./shared-memory.js";
|
|
5
|
-
import { traceTools } from "./trace.js";
|
|
6
|
-
export const allTools = [
|
|
7
|
-
...stateTools,
|
|
8
|
-
...notepadTools,
|
|
9
|
-
...projectMemoryTools,
|
|
10
|
-
...sharedMemoryTools,
|
|
11
|
-
...traceTools,
|
|
12
|
-
];
|
|
13
|
-
export { stateTools, notepadTools, projectMemoryTools, sharedMemoryTools, traceTools };
|
|
14
|
-
export { appendTraceEntry } from "./trace.js";
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,CAAC,MAAM,QAAQ,GAAqB;IACxC,GAAG,UAAU;IACb,GAAG,YAAY;IACf,GAAG,kBAAkB;IACrB,GAAG,iBAAiB;IACpB,GAAG,UAAU;CACd,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { dirname, join, resolve } from "node:path";
|
|
3
|
-
import { jsonResult, textResult } from "../types.js";
|
|
4
|
-
const SECTION_HEADERS = {
|
|
5
|
-
priority: "## priority",
|
|
6
|
-
working: "## working",
|
|
7
|
-
manual: "## manual",
|
|
8
|
-
};
|
|
9
|
-
function notepadPath(cwd) {
|
|
10
|
-
return join(resolve(cwd), ".omp", "notepad.md");
|
|
11
|
-
}
|
|
12
|
-
function readNotepad(cwd) {
|
|
13
|
-
const p = notepadPath(cwd);
|
|
14
|
-
if (!existsSync(p))
|
|
15
|
-
return "";
|
|
16
|
-
return readFileSync(p, "utf8");
|
|
17
|
-
}
|
|
18
|
-
function writeNotepad(cwd, content) {
|
|
19
|
-
const p = notepadPath(cwd);
|
|
20
|
-
mkdirSync(dirname(p), { recursive: true });
|
|
21
|
-
const tmp = `${p}.tmp.${process.pid}.${Date.now()}`;
|
|
22
|
-
writeFileSync(tmp, content, "utf8");
|
|
23
|
-
renameSync(tmp, p);
|
|
24
|
-
}
|
|
25
|
-
function parseSections(text) {
|
|
26
|
-
const out = { priority: "", working: "", manual: "" };
|
|
27
|
-
let current = null;
|
|
28
|
-
for (const line of text.split("\n")) {
|
|
29
|
-
const match = line.match(/^##\s+(priority|working|manual)\s*$/);
|
|
30
|
-
if (match) {
|
|
31
|
-
current = match[1];
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
if (current)
|
|
35
|
-
out[current] += `${line}\n`;
|
|
36
|
-
}
|
|
37
|
-
for (const k of Object.keys(out))
|
|
38
|
-
out[k] = out[k].replace(/\n+$/, "");
|
|
39
|
-
return out;
|
|
40
|
-
}
|
|
41
|
-
function serializeSections(sections) {
|
|
42
|
-
return ["priority", "working", "manual"]
|
|
43
|
-
.map((s) => `${SECTION_HEADERS[s]}\n${sections[s]}`)
|
|
44
|
-
.join("\n\n")
|
|
45
|
-
.replace(/\n+$/, "") + "\n";
|
|
46
|
-
}
|
|
47
|
-
function writeSection(cwd, section, text) {
|
|
48
|
-
const sections = parseSections(readNotepad(cwd));
|
|
49
|
-
sections[section] = text;
|
|
50
|
-
writeNotepad(cwd, serializeSections(sections));
|
|
51
|
-
}
|
|
52
|
-
export const notepadTools = [
|
|
53
|
-
{
|
|
54
|
-
name: "notepad_read",
|
|
55
|
-
category: "notepad",
|
|
56
|
-
description: "Read all or one section of .omp/notepad.md.",
|
|
57
|
-
inputSchema: {
|
|
58
|
-
type: "object",
|
|
59
|
-
properties: {
|
|
60
|
-
section: { type: "string", enum: ["all", "priority", "working", "manual"] },
|
|
61
|
-
cwd: { type: "string" },
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
handler: (args) => {
|
|
65
|
-
const cwd = args.cwd ?? process.cwd();
|
|
66
|
-
const section = args.section ?? "all";
|
|
67
|
-
const full = readNotepad(cwd);
|
|
68
|
-
if (section === "all")
|
|
69
|
-
return textResult(full);
|
|
70
|
-
const parsed = parseSections(full);
|
|
71
|
-
return textResult(parsed[section] ?? "");
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: "notepad_write_priority",
|
|
76
|
-
category: "notepad",
|
|
77
|
-
description: "Replace the 'priority' section.",
|
|
78
|
-
inputSchema: { type: "object", properties: { text: { type: "string" }, cwd: { type: "string" } }, required: ["text"] },
|
|
79
|
-
handler: (args) => {
|
|
80
|
-
writeSection(args.cwd ?? process.cwd(), "priority", String(args.text ?? ""));
|
|
81
|
-
return jsonResult({ ok: true });
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: "notepad_write_working",
|
|
86
|
-
category: "notepad",
|
|
87
|
-
description: "Replace the 'working' section.",
|
|
88
|
-
inputSchema: { type: "object", properties: { text: { type: "string" }, cwd: { type: "string" } }, required: ["text"] },
|
|
89
|
-
handler: (args) => {
|
|
90
|
-
writeSection(args.cwd ?? process.cwd(), "working", String(args.text ?? ""));
|
|
91
|
-
return jsonResult({ ok: true });
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: "notepad_write_manual",
|
|
96
|
-
category: "notepad",
|
|
97
|
-
description: "Replace the 'manual' section.",
|
|
98
|
-
inputSchema: { type: "object", properties: { text: { type: "string" }, cwd: { type: "string" } }, required: ["text"] },
|
|
99
|
-
handler: (args) => {
|
|
100
|
-
writeSection(args.cwd ?? process.cwd(), "manual", String(args.text ?? ""));
|
|
101
|
-
return jsonResult({ ok: true });
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
name: "notepad_prune",
|
|
106
|
-
category: "notepad",
|
|
107
|
-
description: "Clear all sections of the notepad.",
|
|
108
|
-
inputSchema: { type: "object", properties: { cwd: { type: "string" } } },
|
|
109
|
-
handler: (args) => {
|
|
110
|
-
writeNotepad(args.cwd ?? process.cwd(), serializeSections({ priority: "", working: "", manual: "" }));
|
|
111
|
-
return jsonResult({ ok: true });
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
name: "notepad_stats",
|
|
116
|
-
category: "notepad",
|
|
117
|
-
description: "Return byte count + line count + last-modified for the notepad.",
|
|
118
|
-
inputSchema: { type: "object", properties: { cwd: { type: "string" } } },
|
|
119
|
-
handler: (args) => {
|
|
120
|
-
const cwd = args.cwd ?? process.cwd();
|
|
121
|
-
const p = notepadPath(cwd);
|
|
122
|
-
if (!existsSync(p))
|
|
123
|
-
return jsonResult({ exists: false });
|
|
124
|
-
const stats = statSync(p);
|
|
125
|
-
const text = readFileSync(p, "utf8");
|
|
126
|
-
return jsonResult({
|
|
127
|
-
exists: true,
|
|
128
|
-
bytes: stats.size,
|
|
129
|
-
lineCount: text.split("\n").length,
|
|
130
|
-
mtime: stats.mtime.toISOString(),
|
|
131
|
-
});
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
];
|
|
135
|
-
//# sourceMappingURL=notepad.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notepad.js","sourceRoot":"","sources":["../../../../src/mcp/tools/notepad.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAuB,MAAM,aAAa,CAAC;AAG1E,MAAM,eAAe,GAA4B;IAC/C,QAAQ,EAAE,aAAa;IACvB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,WAAW;CACpB,CAAC;AAEF,SAAS,WAAW,CAAC,GAAW;IAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,WAAW,CAAC,GAAW;IAC9B,MAAM,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,EAAE,CAAC;IAC9B,OAAO,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,YAAY,CAAC,GAAW,EAAE,OAAe;IAChD,MAAM,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAC3B,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,MAAM,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AU,CAAC,CAAC,CAAC;gBAAE,OAAO,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;YACzD,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC1B,MAAM,IAAI,GAAG,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;YACrC,OAAO,UAAU,CAAC;gBAChB,MAAM,EAAE,IAAI;gBACZ,KAAK,EAAE,KAAK,CAAC,IAAI;gBACjB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM;gBAClC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE;aACjC,CAAC,CAAC;QACL,CAAC;KACF;CACF,CAAC"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { dirname, join, resolve } from "node:path";
|
|
3
|
-
import { jsonResult } from "../types.js";
|
|
4
|
-
function memPath(cwd) {
|
|
5
|
-
return join(resolve(cwd), ".omp", "project-memory.json");
|
|
6
|
-
}
|
|
7
|
-
function readMemory(cwd) {
|
|
8
|
-
const p = memPath(cwd);
|
|
9
|
-
if (!existsSync(p))
|
|
10
|
-
return { notes: [], directives: [], updatedAt: new Date(0).toISOString() };
|
|
11
|
-
try {
|
|
12
|
-
return JSON.parse(readFileSync(p, "utf8"));
|
|
13
|
-
}
|
|
14
|
-
catch {
|
|
15
|
-
return { notes: [], directives: [], updatedAt: new Date(0).toISOString() };
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
function writeMemory(cwd, memory) {
|
|
19
|
-
const p = memPath(cwd);
|
|
20
|
-
mkdirSync(dirname(p), { recursive: true });
|
|
21
|
-
const tmp = `${p}.tmp.${process.pid}.${Date.now()}`;
|
|
22
|
-
writeFileSync(tmp, JSON.stringify({ ...memory, updatedAt: new Date().toISOString() }, null, 2), "utf8");
|
|
23
|
-
renameSync(tmp, p);
|
|
24
|
-
}
|
|
25
|
-
export const projectMemoryTools = [
|
|
26
|
-
{
|
|
27
|
-
name: "project_memory_read",
|
|
28
|
-
category: "project_memory",
|
|
29
|
-
description: "Read .omp/project-memory.json (notes + directives).",
|
|
30
|
-
inputSchema: { type: "object", properties: { cwd: { type: "string" } } },
|
|
31
|
-
handler: (args) => jsonResult(readMemory(args.cwd ?? process.cwd())),
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: "project_memory_write",
|
|
35
|
-
category: "project_memory",
|
|
36
|
-
description: "Replace .omp/project-memory.json with the given notes + directives.",
|
|
37
|
-
inputSchema: {
|
|
38
|
-
type: "object",
|
|
39
|
-
properties: {
|
|
40
|
-
notes: { type: "array", items: { type: "string" } },
|
|
41
|
-
directives: { type: "array", items: { type: "string" } },
|
|
42
|
-
cwd: { type: "string" },
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
handler: (args) => {
|
|
46
|
-
const cwd = args.cwd ?? process.cwd();
|
|
47
|
-
const memory = {
|
|
48
|
-
notes: args.notes ?? readMemory(cwd).notes,
|
|
49
|
-
directives: args.directives ?? readMemory(cwd).directives,
|
|
50
|
-
updatedAt: new Date().toISOString(),
|
|
51
|
-
};
|
|
52
|
-
writeMemory(cwd, memory);
|
|
53
|
-
return jsonResult({ ok: true });
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: "project_memory_add_note",
|
|
58
|
-
category: "project_memory",
|
|
59
|
-
description: "Append a single note to project memory.",
|
|
60
|
-
inputSchema: {
|
|
61
|
-
type: "object",
|
|
62
|
-
properties: { note: { type: "string" }, cwd: { type: "string" } },
|
|
63
|
-
required: ["note"],
|
|
64
|
-
},
|
|
65
|
-
handler: (args) => {
|
|
66
|
-
const cwd = args.cwd ?? process.cwd();
|
|
67
|
-
const memory = readMemory(cwd);
|
|
68
|
-
memory.notes.push(String(args.note));
|
|
69
|
-
writeMemory(cwd, memory);
|
|
70
|
-
return jsonResult({ ok: true, count: memory.notes.length });
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: "project_memory_add_directive",
|
|
75
|
-
category: "project_memory",
|
|
76
|
-
description: "Append a single directive to project memory.",
|
|
77
|
-
inputSchema: {
|
|
78
|
-
type: "object",
|
|
79
|
-
properties: { directive: { type: "string" }, cwd: { type: "string" } },
|
|
80
|
-
required: ["directive"],
|
|
81
|
-
},
|
|
82
|
-
handler: (args) => {
|
|
83
|
-
const cwd = args.cwd ?? process.cwd();
|
|
84
|
-
const memory = readMemory(cwd);
|
|
85
|
-
memory.directives.push(String(args.directive));
|
|
86
|
-
writeMemory(cwd, memory);
|
|
87
|
-
return jsonResult({ ok: true, count: memory.directives.length });
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
];
|
|
91
|
-
//# sourceMappingURL=project-memory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-memory.js","sourceRoot":"","sources":["../../../../src/mcp/tools/project-memory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,UAAU,EAAuB,MAAM,aAAa,CAAC;AAQ9D,SAAS,OAAO,CAAC,GAAW;IAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,qBAAqB,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACvB,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,IAAI,CAAC,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