amicooked 0.1.2 → 0.1.3
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/README.md +3 -2
- package/dist/cli/manage.js +9 -1
- package/dist/cli/setup.js +33 -13
- package/dist/cli.js +1 -3
- package/dist/clients/codex.js +117 -0
- package/dist/skill.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/skill/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -53,14 +53,15 @@ Presets for McMaster, Waterloo, Western, Queen's, Guelph, Laurier, TMU, uOttawa,
|
|
|
53
53
|
|
|
54
54
|
## ChatGPT
|
|
55
55
|
|
|
56
|
-
`amicooked setup --clients chatgpt`
|
|
56
|
+
`amicooked setup --clients chatgpt-desktop` connects the ChatGPT desktop app the same way as Claude Desktop: the app starts Am I Cooked on your computer, with no tunnel or extra account. Restart the app afterwards. It works with the ChatGPT desktop app that's built on Codex (and the Codex CLI), which reads `~/.codex/config.toml`.
|
|
57
|
+
|
|
58
|
+
ChatGPT on the web and on phones can't start programs on your computer, so they aren't supported yet. Neither is Claude on the web.
|
|
57
59
|
|
|
58
60
|
## Commands
|
|
59
61
|
|
|
60
62
|
```
|
|
61
63
|
amicooked setup pick your school, sign in, connect apps
|
|
62
64
|
amicooked login sign in again
|
|
63
|
-
amicooked pair new ChatGPT pairing code
|
|
64
65
|
amicooked status what's set up
|
|
65
66
|
amicooked uninstall disconnect apps (--purge deletes your login and settings)
|
|
66
67
|
```
|
package/dist/cli/manage.js
CHANGED
|
@@ -3,6 +3,7 @@ import { hasActiveSession, login } from "../auth.js";
|
|
|
3
3
|
import { claudeDesktopDir, SERVER_NAME, uninstallClaudeDesktop } from "../clients/claudeDesktop.js";
|
|
4
4
|
import { hasClaudeCode, skillPath, uninstallClaudeCode, uninstallSkill } from "../clients/claudeCode.js";
|
|
5
5
|
import { chatgptSteps, chatgptUrl, uninstallChatGPT } from "../clients/chatgpt.js";
|
|
6
|
+
import { codexConfigured, hasCodex, uninstallCodex, uninstallCodexSkill } from "../clients/codex.js";
|
|
6
7
|
import { OAuthStore } from "../remote/oauth.js";
|
|
7
8
|
import { client } from "../client.js";
|
|
8
9
|
import { getConfig, paths } from "../config.js";
|
|
@@ -49,6 +50,7 @@ export async function statusCommand(json) {
|
|
|
49
50
|
signedIn: hasActiveSession(),
|
|
50
51
|
claudeDesktop: claudeDesktopDir() ? (desktopConfigured() ? "set up" : "installed, not set up") : "not installed",
|
|
51
52
|
claudeCode: hasClaudeCode() ? (fs.existsSync(skillPath()) ? "set up" : "installed") : "not installed",
|
|
53
|
+
chatgptDesktop: hasCodex() ? (codexConfigured() ? "set up" : "installed, not set up") : "not installed",
|
|
52
54
|
chatgpt: chatgptUrl() ?? "not set up",
|
|
53
55
|
dataFolder: paths().home,
|
|
54
56
|
filesFolder: config.filesDir,
|
|
@@ -63,7 +65,10 @@ export async function statusCommand(json) {
|
|
|
63
65
|
console.log(` Signed in: ${status.signedIn ? "yes" : "no (signs in again when needed, or run `amicooked login`)"}`);
|
|
64
66
|
console.log(` Claude Desktop: ${status.claudeDesktop}`);
|
|
65
67
|
console.log(` Claude Code: ${status.claudeCode}`);
|
|
66
|
-
console.log(` ChatGPT:
|
|
68
|
+
console.log(` ChatGPT app: ${status.chatgptDesktop}`);
|
|
69
|
+
// ChatGPT on the web is hidden until the tunnel service exists; only show it where it's been set up
|
|
70
|
+
if (chatgptUrl())
|
|
71
|
+
console.log(` ChatGPT web: ${status.chatgpt}`);
|
|
67
72
|
console.log(` Data: ${status.dataFolder}`);
|
|
68
73
|
console.log(` Files: ${status.filesFolder}`);
|
|
69
74
|
return 0;
|
|
@@ -76,6 +81,9 @@ export async function uninstallCommand(purge) {
|
|
|
76
81
|
uninstallClaudeCode();
|
|
77
82
|
console.log(`Claude Code: removed (skill ${uninstallSkill()})`);
|
|
78
83
|
}
|
|
84
|
+
const codex = uninstallCodex();
|
|
85
|
+
if (codex !== "absent")
|
|
86
|
+
console.log(`ChatGPT desktop app: ${codex} (skill ${uninstallCodexSkill()})`);
|
|
79
87
|
if (uninstallChatGPT())
|
|
80
88
|
console.log("ChatGPT: background service stopped and disconnected");
|
|
81
89
|
if (purge) {
|
package/dist/cli/setup.js
CHANGED
|
@@ -4,13 +4,16 @@ import { detectChannel } from "../browser.js";
|
|
|
4
4
|
import { claudeDesktopDir, installClaudeDesktop, InvalidConfigError, isClaudeDesktopRunning, manualSnippet, openClaudeDesktop, quitClaudeDesktop, } from "../clients/claudeDesktop.js";
|
|
5
5
|
import { hasClaudeCode, installClaudeCode, installSkill } from "../clients/claudeCode.js";
|
|
6
6
|
import { chatgptSteps, installChatGPT } from "../clients/chatgpt.js";
|
|
7
|
+
import { hasCodex, installCodex, installCodexSkill } from "../clients/codex.js";
|
|
7
8
|
import { selfCommand } from "../clients/self.js";
|
|
8
9
|
import { client } from "../client.js";
|
|
9
10
|
import { getConfig, writeConfig } from "../config.js";
|
|
10
11
|
import { listCourses } from "../courseResolver.js";
|
|
11
12
|
import { detectSchool, findPreset, PRESETS } from "../schools.js";
|
|
12
13
|
import { amICooked } from "../tools/cooked.js";
|
|
13
|
-
const
|
|
14
|
+
const PUBLIC_IDS = ["desktop", "code", "chatgpt-desktop"];
|
|
15
|
+
const CLIENT_IDS = [...PUBLIC_IDS, "chatgpt"];
|
|
16
|
+
const ALIASES = { codex: "chatgpt-desktop", "chatgpt-app": "chatgpt-desktop", "chatgpt-web": "chatgpt" };
|
|
14
17
|
/** Exit code for "the agent needs to ask the student something first". */
|
|
15
18
|
export const NEEDS_INPUT = 2;
|
|
16
19
|
class SetupStop extends Error {
|
|
@@ -66,13 +69,13 @@ async function chooseSchool(flag) {
|
|
|
66
69
|
}
|
|
67
70
|
async function chooseClients(flag, detected, yes) {
|
|
68
71
|
if (flag) {
|
|
69
|
-
const ids = flag.split(",").map((s) => s.trim().toLowerCase()).filter(Boolean);
|
|
72
|
+
const ids = flag.split(",").map((s) => s.trim().toLowerCase()).filter(Boolean).map((id) => ALIASES[id] ?? id);
|
|
70
73
|
const unknown = ids.filter((id) => !CLIENT_IDS.includes(id));
|
|
71
74
|
if (unknown.length)
|
|
72
|
-
throw new SetupStop(`Unknown app: ${unknown.join(", ")}. Use
|
|
73
|
-
return ids;
|
|
75
|
+
throw new SetupStop(`Unknown app: ${unknown.join(", ")}. Use ${PUBLIC_IDS.join(", ")}.`);
|
|
76
|
+
return [...new Set(ids)];
|
|
74
77
|
}
|
|
75
|
-
const defaults =
|
|
78
|
+
const defaults = PUBLIC_IDS.filter((id) => detected[id]);
|
|
76
79
|
if (yes || !interactive())
|
|
77
80
|
return defaults;
|
|
78
81
|
const chosen = await p.multiselect({
|
|
@@ -82,7 +85,7 @@ async function chooseClients(flag, detected, yes) {
|
|
|
82
85
|
options: [
|
|
83
86
|
{ value: "desktop", label: "Claude Desktop", hint: detected.desktop ? "found" : "not found" },
|
|
84
87
|
{ value: "code", label: "Claude Code", hint: detected.code ? "found" : "not found" },
|
|
85
|
-
{ value: "chatgpt", label: "ChatGPT", hint: "
|
|
88
|
+
{ value: "chatgpt-desktop", label: "ChatGPT desktop app", hint: detected["chatgpt-desktop"] ? "found" : "not found" },
|
|
86
89
|
],
|
|
87
90
|
});
|
|
88
91
|
if (p.isCancel(chosen))
|
|
@@ -140,7 +143,22 @@ async function configureClients(clients) {
|
|
|
140
143
|
done.push("code");
|
|
141
144
|
}
|
|
142
145
|
}
|
|
143
|
-
if (clients.includes("chatgpt")) {
|
|
146
|
+
if (clients.includes("chatgpt-desktop")) {
|
|
147
|
+
if (!hasCodex()) {
|
|
148
|
+
p.log.warn("The ChatGPT desktop app isn't installed. Get it at https://chatgpt.com/download, then run `amicooked setup` again.");
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
// Runs on this computer like Claude Desktop does; no tunnel or domain involved
|
|
152
|
+
const result = installCodex(launch);
|
|
153
|
+
installCodexSkill();
|
|
154
|
+
p.log.success(`ChatGPT desktop app: ${result === "unchanged" ? "already set up" : "set up"}, with the amicooked skill`);
|
|
155
|
+
done.push("chatgpt-desktop");
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (clients.includes("chatgpt") && !process.env.AMICOOKED_TUNNEL_API) {
|
|
159
|
+
p.log.warn("ChatGPT on the web isn't available yet. For the ChatGPT desktop app, use `--clients chatgpt-desktop`.");
|
|
160
|
+
}
|
|
161
|
+
else if (clients.includes("chatgpt")) {
|
|
144
162
|
const spin = p.spinner();
|
|
145
163
|
spin.start("Setting up your private ChatGPT connection");
|
|
146
164
|
try {
|
|
@@ -187,7 +205,7 @@ export async function setup(options) {
|
|
|
187
205
|
const courses = await listCourses();
|
|
188
206
|
p.log.success(`Signed in${me.FirstName ? ` as ${me.FirstName}` : ""}. Found ${courses.length} course${courses.length === 1 ? "" : "s"}.`);
|
|
189
207
|
}
|
|
190
|
-
const detected = { desktop: Boolean(claudeDesktopDir()), code: hasClaudeCode(), chatgpt: false };
|
|
208
|
+
const detected = { desktop: Boolean(claudeDesktopDir()), code: hasClaudeCode(), "chatgpt-desktop": hasCodex(), chatgpt: false };
|
|
191
209
|
const done = await configureClients(await chooseClients(options.clients, detected, Boolean(options.yes)));
|
|
192
210
|
if (options.login !== false)
|
|
193
211
|
await firstRoast();
|
|
@@ -195,11 +213,13 @@ export async function setup(options) {
|
|
|
195
213
|
? "Claude Desktop is reopening. Ask it: am I cooked?"
|
|
196
214
|
: done.includes("desktop")
|
|
197
215
|
? "Open Claude Desktop and ask: am I cooked?"
|
|
198
|
-
: done.includes("
|
|
199
|
-
? "
|
|
200
|
-
: done.includes("
|
|
201
|
-
? "
|
|
202
|
-
:
|
|
216
|
+
: done.includes("chatgpt-desktop")
|
|
217
|
+
? "Restart the ChatGPT desktop app, then ask: am I cooked?"
|
|
218
|
+
: done.includes("code")
|
|
219
|
+
? "Start Claude Code and ask: am I cooked?"
|
|
220
|
+
: done.includes("chatgpt")
|
|
221
|
+
? "Finish connecting in ChatGPT, then ask: am I cooked?"
|
|
222
|
+
: "Nothing was set up. Run `amicooked setup` again and pick an app.";
|
|
203
223
|
p.outro(next);
|
|
204
224
|
return 0;
|
|
205
225
|
}
|
package/dist/cli.js
CHANGED
|
@@ -13,14 +13,12 @@ Usage: amicooked <command>
|
|
|
13
13
|
|
|
14
14
|
setup Pick your school, sign in, and connect your AI apps
|
|
15
15
|
--school <id|url> e.g. mcmaster, or the URL you log in through
|
|
16
|
-
--clients <list> desktop,code,chatgpt
|
|
16
|
+
--clients <list> desktop,code,chatgpt-desktop
|
|
17
17
|
--yes accept the detected apps without asking
|
|
18
18
|
login Sign in to your school again
|
|
19
|
-
pair Get a new code for connecting ChatGPT
|
|
20
19
|
status Show what's set up (--json for machines)
|
|
21
20
|
uninstall Disconnect your AI apps (--purge also deletes your login and settings)
|
|
22
21
|
mcp Run the MCP server over stdio (AI apps run this for you)
|
|
23
|
-
serve Run the ChatGPT server (the background service runs this for you)
|
|
24
22
|
`;
|
|
25
23
|
async function runMcp() {
|
|
26
24
|
// stdout carries the protocol; a library logging there would corrupt it
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { spawnSync } from "child_process";
|
|
2
|
+
import * as fs from "fs";
|
|
3
|
+
import * as os from "os";
|
|
4
|
+
import * as path from "path";
|
|
5
|
+
import { SKILL_MD } from "../skill.js";
|
|
6
|
+
import { SERVER_NAME } from "./claudeDesktop.js";
|
|
7
|
+
const currentEnv = () => ({ platform: process.platform, home: os.homedir(), codexHome: process.env.CODEX_HOME });
|
|
8
|
+
export const codexHome = (env = currentEnv()) => env.codexHome || path.join(env.home, ".codex");
|
|
9
|
+
export const codexConfigPath = (env = currentEnv()) => path.join(codexHome(env), "config.toml");
|
|
10
|
+
/** macOS app bundles that are the Codex-based desktop app, under either name. */
|
|
11
|
+
const MAC_APPS = ["/Applications/ChatGPT.app", "/Applications/Codex.app"];
|
|
12
|
+
function isCodexBundle(app) {
|
|
13
|
+
const plist = path.join(app, "Contents", "Info.plist");
|
|
14
|
+
if (!fs.existsSync(plist))
|
|
15
|
+
return false;
|
|
16
|
+
const id = spawnSync("/usr/libexec/PlistBuddy", ["-c", "Print :CFBundleIdentifier", plist], { encoding: "utf8" });
|
|
17
|
+
return id.status === 0 && id.stdout.trim() === "com.openai.codex";
|
|
18
|
+
}
|
|
19
|
+
/** True when the ChatGPT desktop app (or Codex) is on this computer. */
|
|
20
|
+
export function hasCodex(env = currentEnv(), hasMacApp = () => MAC_APPS.some(isCodexBundle)) {
|
|
21
|
+
if (fs.existsSync(codexHome(env)))
|
|
22
|
+
return true;
|
|
23
|
+
return env.platform === "darwin" && hasMacApp();
|
|
24
|
+
}
|
|
25
|
+
// ---- config.toml, edited as text so every other setting stays byte for byte ----
|
|
26
|
+
const TABLE = `mcp_servers.${SERVER_NAME}`;
|
|
27
|
+
const header = (line) => line.match(/^\s*\[\s*([^\]]+?)\s*\]\s*(#.*)?$/)?.[1] ?? null;
|
|
28
|
+
/** Splits the file into our table (and its sub-tables, like `.env`) and everything else. */
|
|
29
|
+
function splitOurTable(text) {
|
|
30
|
+
const kept = [];
|
|
31
|
+
const ours = [];
|
|
32
|
+
// Comments and blank lines after our table usually belong to the table that follows, so they
|
|
33
|
+
// wait here until we know which side they're on
|
|
34
|
+
let pending = [];
|
|
35
|
+
let inOurs = false;
|
|
36
|
+
for (const line of text.split("\n")) {
|
|
37
|
+
const name = header(line);
|
|
38
|
+
if (name !== null) {
|
|
39
|
+
kept.push(...pending);
|
|
40
|
+
pending = [];
|
|
41
|
+
inOurs = name === TABLE || name.startsWith(`${TABLE}.`);
|
|
42
|
+
(inOurs ? ours : kept).push(line);
|
|
43
|
+
}
|
|
44
|
+
else if (inOurs && /^\s*(#.*)?$/.test(line)) {
|
|
45
|
+
pending.push(line);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
if (inOurs)
|
|
49
|
+
ours.push(...pending);
|
|
50
|
+
else
|
|
51
|
+
kept.push(...pending);
|
|
52
|
+
pending = [];
|
|
53
|
+
(inOurs ? ours : kept).push(line);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
kept.push(...pending);
|
|
57
|
+
return { rest: kept.join("\n"), ours: ours.length ? ours.join("\n").trim() : null };
|
|
58
|
+
}
|
|
59
|
+
/** TOML basic strings use the same escapes as JSON for everything we'd ever write. */
|
|
60
|
+
const str = (s) => JSON.stringify(s);
|
|
61
|
+
export function tomlEntry(launch) {
|
|
62
|
+
const lines = [`[${TABLE}]`, `command = ${str(launch.command)}`, `args = [${launch.args.map(str).join(", ")}]`];
|
|
63
|
+
if (launch.env && Object.keys(launch.env).length) {
|
|
64
|
+
lines.push("", `[${TABLE}.env]`, ...Object.entries(launch.env).map(([k, v]) => `${k} = ${str(v)}`));
|
|
65
|
+
}
|
|
66
|
+
return lines.join("\n");
|
|
67
|
+
}
|
|
68
|
+
function writeAtomic(file, text) {
|
|
69
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
70
|
+
const backup = `${file}.amicooked.bak`;
|
|
71
|
+
if (fs.existsSync(file) && !fs.existsSync(backup))
|
|
72
|
+
fs.copyFileSync(file, backup);
|
|
73
|
+
const tmp = `${file}.${process.pid}.tmp`;
|
|
74
|
+
fs.writeFileSync(tmp, text);
|
|
75
|
+
fs.renameSync(tmp, file);
|
|
76
|
+
}
|
|
77
|
+
/** Add or update our server in config.toml. Re-running changes nothing; other servers are untouched. */
|
|
78
|
+
export function installCodex(launch, file = codexConfigPath()) {
|
|
79
|
+
const text = fs.existsSync(file) ? fs.readFileSync(file, "utf8") : "";
|
|
80
|
+
const { rest, ours } = splitOurTable(text);
|
|
81
|
+
const entry = tomlEntry(launch);
|
|
82
|
+
if (ours === entry)
|
|
83
|
+
return "unchanged";
|
|
84
|
+
const body = rest.replace(/\s+$/, "");
|
|
85
|
+
writeAtomic(file, `${body ? `${body}\n\n` : ""}${entry}\n`);
|
|
86
|
+
return ours ? "updated" : "added";
|
|
87
|
+
}
|
|
88
|
+
export function uninstallCodex(file = codexConfigPath()) {
|
|
89
|
+
if (!fs.existsSync(file))
|
|
90
|
+
return "absent";
|
|
91
|
+
const { rest, ours } = splitOurTable(fs.readFileSync(file, "utf8"));
|
|
92
|
+
if (!ours)
|
|
93
|
+
return "absent";
|
|
94
|
+
writeAtomic(file, `${rest.replace(/\s+$/, "")}\n`);
|
|
95
|
+
return "removed";
|
|
96
|
+
}
|
|
97
|
+
export function codexConfigured(file = codexConfigPath()) {
|
|
98
|
+
return fs.existsSync(file) && splitOurTable(fs.readFileSync(file, "utf8")).ours !== null;
|
|
99
|
+
}
|
|
100
|
+
// ---- the skill: the desktop app reads skills from ~/.agents/skills ----
|
|
101
|
+
export const codexSkillPath = (home = os.homedir()) => path.join(home, ".agents", "skills", SERVER_NAME, "SKILL.md");
|
|
102
|
+
export function installCodexSkill(home = os.homedir()) {
|
|
103
|
+
const file = codexSkillPath(home);
|
|
104
|
+
const existed = fs.existsSync(file);
|
|
105
|
+
if (existed && fs.readFileSync(file, "utf8") === SKILL_MD)
|
|
106
|
+
return "unchanged";
|
|
107
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
108
|
+
fs.writeFileSync(file, SKILL_MD);
|
|
109
|
+
return existed ? "updated" : "added";
|
|
110
|
+
}
|
|
111
|
+
export function uninstallCodexSkill(home = os.homedir()) {
|
|
112
|
+
const dir = path.dirname(codexSkillPath(home));
|
|
113
|
+
if (!fs.existsSync(dir))
|
|
114
|
+
return "absent";
|
|
115
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
116
|
+
return "removed";
|
|
117
|
+
}
|
package/dist/skill.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated from skill/SKILL.md by scripts/sync-skill.mjs. Don't edit by hand.
|
|
2
|
-
export const SKILL_MD = "---\nname: amicooked\ndescription: Use when a student asks about their D2L Brightspace courses, grades, deadlines, assignments, announcements or course files, asks \"am I cooked?\", or wants to set up Am I Cooked.\n---\n\n# Am I Cooked\n\nAm I Cooked connects an AI assistant to a student's D2L Brightspace account (Avenue to Learn, LEARN, onQ, OWL Brightspace, CourseLink, MyLearningSpace and others). It runs on the student's own computer and is read-only.\n\n## Setting it up (for agents)\n\n1. Ask the student which school they go to. Presets: mcmaster, waterloo, western, queens, guelph, laurier, tmu, uottawa, carleton, brock, windsor, laurentian, lakehead. Any other Brightspace school works with the URL they log in through.\n2. Install it:\n - macOS / Linux: `curl -fsSL https://amicooked-mcp.vercel.app/install.sh | sh -s -- --no-setup`\n - Windows (PowerShell): `$env:AMICOOKED_NO_SETUP=1; irm https://amicooked-mcp.vercel.app/install.ps1 | iex`\n - With Node.js installed, `npx -y amicooked@0` works in place of `amicooked` below.\n3. Run setup with flags, and a long command timeout (at least 5 minutes), because the student signs in through a browser window that opens:\n `amicooked setup --school mcmaster --clients desktop,code`\n Use `--school https://...` for schools without a preset. Add `chatgpt` to `--clients` if they use ChatGPT.\n4. Tell the student to sign in to their school in the browser window. Never ask for their password; you never need it.\n5. If something fails, run `amicooked status` and read what it says.\n\n<!-- server-instructions -->\n## Answering questions\n\n- Start broad questions (\"am I cooked?\", \"what should I work on?\", \"how am I doing?\", \"what's due?\") with `am_i_cooked`. It covers every current course in one call.\n- Other tools take a course code directly, like `course: \"3BB4\"`. Only call `get_my_courses` when a code is ambiguous or the student asks what they're enrolled in.\n- Check `get_announcements` for a course before a final verdict on it; deadlines and exam details often change there.\n- To read slides, handouts or assignment PDFs: `get_course_content` to find the file, then `download_file`. Use `read_file` for files already downloaded.\n- If a tool says a login window opened, tell the student to sign in there and ask again.\n\n## The verdict\n\nUse `summary.heatLabel` from `am_i_cooked` to set the tone. Be playful, never mean, and always useful.\n\n| heatLabel | Tone |\n|---|---|\n| raw | Relaxed. Nothing urgent; maybe get ahead on something. |\n| warming up | Light nudge. One or two things to handle soon. |\n| toasty | Focused. A real plan for the next few days. |\n| cooked | Direct and supportive. Triage what matters most. |\n| well done | Calm and practical. Damage control, and who to talk to. |\n\n1. Lead with a one-line verdict, e.g. \"Toasty, not cooked.\"\n2. Then the top 3 actions, each with course, item and due time in the student's local time (D2L times are UTC).\n3. Say whether a grade is `final_calculated` or `estimated_from_items`; estimates ignore dropped and bonus items.\n - For an estimate, say how much is left, like \"67.6% so far. 60% of your grade is still to come.\" Use `weightRemaining` for that number.\n - Name the `keyItems` when a grade needs explaining, with their weight: \"the midterm (59.5%, worth 25%) is pulling it down.\"\n - Never work weights out backwards from a result. Use the `weight` values the tools return.\n - `basis: \"points\"` means the gradebook has no weights. Say the estimate is by points and the real weighting may differ. If the student asks how the grade is calculated, find the course outline with `get_course_content` and read the weights from it.\n4. `late_window_open` means a missed assignment can still be submitted: say so first, it's the easiest win.\n5. If `partial_data` appears, mention that some of a course couldn't be loaded.\n6. For grades under 60%, suggest office hours, the TA, or an academic advisor.\n\n## Integrity\n\nAm I Cooked only reads. Help the student understand material and plan their time, but don't write graded work for them to submit.\n<!-- /server-instructions -->\n";
|
|
2
|
+
export const SKILL_MD = "---\nname: amicooked\ndescription: Use when a student asks about their D2L Brightspace courses, grades, deadlines, assignments, announcements or course files, asks \"am I cooked?\", or wants to set up Am I Cooked.\n---\n\n# Am I Cooked\n\nAm I Cooked connects an AI assistant to a student's D2L Brightspace account (Avenue to Learn, LEARN, onQ, OWL Brightspace, CourseLink, MyLearningSpace and others). It runs on the student's own computer and is read-only.\n\n## Setting it up (for agents)\n\n1. Ask the student which school they go to. Presets: mcmaster, waterloo, western, queens, guelph, laurier, tmu, uottawa, carleton, brock, windsor, laurentian, lakehead. Any other Brightspace school works with the URL they log in through.\n2. Install it:\n - macOS / Linux: `curl -fsSL https://amicooked-mcp.vercel.app/install.sh | sh -s -- --no-setup`\n - Windows (PowerShell): `$env:AMICOOKED_NO_SETUP=1; irm https://amicooked-mcp.vercel.app/install.ps1 | iex`\n - With Node.js installed, `npx -y amicooked@0` works in place of `amicooked` below.\n3. Run setup with flags, and a long command timeout (at least 5 minutes), because the student signs in through a browser window that opens:\n `amicooked setup --school mcmaster --clients desktop,code`\n Use `--school https://...` for schools without a preset. Add `chatgpt-desktop` to `--clients` if they use the ChatGPT desktop app, then tell them to restart it. ChatGPT and Claude on the web or on phones aren't supported.\n4. Tell the student to sign in to their school in the browser window. Never ask for their password; you never need it.\n5. If something fails, run `amicooked status` and read what it says.\n\n<!-- server-instructions -->\n## Answering questions\n\n- Start broad questions (\"am I cooked?\", \"what should I work on?\", \"how am I doing?\", \"what's due?\") with `am_i_cooked`. It covers every current course in one call.\n- Other tools take a course code directly, like `course: \"3BB4\"`. Only call `get_my_courses` when a code is ambiguous or the student asks what they're enrolled in.\n- Check `get_announcements` for a course before a final verdict on it; deadlines and exam details often change there.\n- To read slides, handouts or assignment PDFs: `get_course_content` to find the file, then `download_file`. Use `read_file` for files already downloaded.\n- If a tool says a login window opened, tell the student to sign in there and ask again.\n\n## The verdict\n\nUse `summary.heatLabel` from `am_i_cooked` to set the tone. Be playful, never mean, and always useful.\n\n| heatLabel | Tone |\n|---|---|\n| raw | Relaxed. Nothing urgent; maybe get ahead on something. |\n| warming up | Light nudge. One or two things to handle soon. |\n| toasty | Focused. A real plan for the next few days. |\n| cooked | Direct and supportive. Triage what matters most. |\n| well done | Calm and practical. Damage control, and who to talk to. |\n\n1. Lead with a one-line verdict, e.g. \"Toasty, not cooked.\"\n2. Then the top 3 actions, each with course, item and due time in the student's local time (D2L times are UTC).\n3. Say whether a grade is `final_calculated` or `estimated_from_items`; estimates ignore dropped and bonus items.\n - For an estimate, say how much is left, like \"67.6% so far. 60% of your grade is still to come.\" Use `weightRemaining` for that number.\n - Name the `keyItems` when a grade needs explaining, with their weight: \"the midterm (59.5%, worth 25%) is pulling it down.\"\n - Never work weights out backwards from a result. Use the `weight` values the tools return.\n - `basis: \"points\"` means the gradebook has no weights. Say the estimate is by points and the real weighting may differ. If the student asks how the grade is calculated, find the course outline with `get_course_content` and read the weights from it.\n4. `late_window_open` means a missed assignment can still be submitted: say so first, it's the easiest win.\n5. If `partial_data` appears, mention that some of a course couldn't be loaded.\n6. For grades under 60%, suggest office hours, the TA, or an academic advisor.\n\n## Integrity\n\nAm I Cooked only reads. Help the student understand material and plan their time, but don't write graded work for them to submit.\n<!-- /server-instructions -->\n";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Must match package.json; a unit test checks this
|
|
2
|
-
export const VERSION = "0.1.
|
|
2
|
+
export const VERSION = "0.1.3";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "amicooked",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Ask your AI if you're cooked. A local MCP server for D2L Brightspace: grades, deadlines and announcements in Claude and ChatGPT.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"repository": {
|
|
40
40
|
"type": "git",
|
|
41
|
-
"url": "https://github.com/udaysinghkanwar/amicooked"
|
|
41
|
+
"url": "git+https://github.com/udaysinghkanwar/amicooked.git"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@clack/prompts": "^1.8.1",
|
package/skill/SKILL.md
CHANGED
|
@@ -16,7 +16,7 @@ Am I Cooked connects an AI assistant to a student's D2L Brightspace account (Ave
|
|
|
16
16
|
- With Node.js installed, `npx -y amicooked@0` works in place of `amicooked` below.
|
|
17
17
|
3. Run setup with flags, and a long command timeout (at least 5 minutes), because the student signs in through a browser window that opens:
|
|
18
18
|
`amicooked setup --school mcmaster --clients desktop,code`
|
|
19
|
-
Use `--school https://...` for schools without a preset. Add `chatgpt` to `--clients` if they use ChatGPT.
|
|
19
|
+
Use `--school https://...` for schools without a preset. Add `chatgpt-desktop` to `--clients` if they use the ChatGPT desktop app, then tell them to restart it. ChatGPT and Claude on the web or on phones aren't supported.
|
|
20
20
|
4. Tell the student to sign in to their school in the browser window. Never ask for their password; you never need it.
|
|
21
21
|
5. If something fails, run `amicooked status` and read what it says.
|
|
22
22
|
|