@teeras/afterhours-mcp 0.1.1 → 0.2.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/README.md +4 -3
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/tools.d.ts +6 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +6 -7
- package/dist/tools.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Teeras Afterhours MCP
|
|
2
2
|
|
|
3
|
-
Connect an account first with `npx @teeras/afterhours`. Activity tools refuse
|
|
3
|
+
Connect an account first with `npx @teeras/afterhours connect`. Activity tools refuse
|
|
4
4
|
to scan local agent histories until that Google-backed Teeras connection exists.
|
|
5
5
|
|
|
6
6
|
An optional, read-only local MCP adapter for Teeras Afterhours.
|
|
@@ -18,8 +18,9 @@ An optional, read-only local MCP adapter for Teeras Afterhours.
|
|
|
18
18
|
|
|
19
19
|
It gives a coding agent three local tools:
|
|
20
20
|
|
|
21
|
-
- `afterhours_week` — the human's current AI-life
|
|
22
|
-
|
|
21
|
+
- `afterhours_week` — the human's current local AI-life-balance snapshot;
|
|
22
|
+
longitudinal patterns remain in Teeras web and mobile
|
|
23
|
+
- `afterhours_sources` — detected coding-agent apps and setup fidelity
|
|
23
24
|
- `afterhours_privacy` — the exact retained/never-retained contract
|
|
24
25
|
|
|
25
26
|
The MCP server does not expose prompt text, code, outputs, repositories, working
|
package/dist/server.js
CHANGED
|
@@ -7,13 +7,13 @@ function text(value) {
|
|
|
7
7
|
export function createAfterhoursServer() {
|
|
8
8
|
const server = new McpServer({ name: "teeras-afterhours", version: "0.1.0" });
|
|
9
9
|
server.registerTool("afterhours_week", {
|
|
10
|
-
description: "Read the human's
|
|
10
|
+
description: "Read the human's current local AI-life-balance snapshot. Do not infer longitudinal patterns from one week; direct the human to Teeras web or mobile for history, sleep, and recovery.",
|
|
11
11
|
inputSchema: {
|
|
12
12
|
stopHour: z.number().int().min(18).max(23).optional().describe("The human's local planned stop hour."),
|
|
13
13
|
},
|
|
14
14
|
}, ({ stopHour }) => text(afterhoursWeek(stopHour)));
|
|
15
15
|
server.registerTool("afterhours_sources", {
|
|
16
|
-
description: "List locally detected coding-agent apps and the fidelity available from each source.",
|
|
16
|
+
description: "List locally detected coding-agent apps and the fidelity available from each source for setup diagnostics.",
|
|
17
17
|
inputSchema: {},
|
|
18
18
|
}, () => text(afterhoursSources()));
|
|
19
19
|
server.registerTool("afterhours_privacy", {
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAElF,SAAS,IAAI,CAAC,KAAc;IAC1B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AACxF,CAAC;AAED,MAAM,UAAU,sBAAsB;IACpC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IAE9E,MAAM,CAAC,YAAY,CACjB,iBAAiB,EACjB;QACE,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAA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Snapshot } from "@teeras/afterhours";
|
|
2
|
+
export interface ConnectionState {
|
|
3
|
+
connected: boolean;
|
|
4
|
+
connect?: string;
|
|
5
|
+
}
|
|
2
6
|
export interface WeekResult {
|
|
3
7
|
report: AfterhoursReport;
|
|
4
8
|
generatedAt: string;
|
|
5
9
|
note: string;
|
|
10
|
+
connection: ConnectionState;
|
|
6
11
|
}
|
|
7
12
|
export declare function afterhoursWeek(stopHour?: number): WeekResult;
|
|
8
13
|
export declare function afterhoursSources(): {
|
|
9
14
|
generatedAt: string;
|
|
10
15
|
sources: Array<Pick<AfterhoursSnapshot["sources"][number], "id" | "name" | "configured" | "fidelity" | "sessions">>;
|
|
11
16
|
detected: ReturnType<typeof detectCodingAgents>;
|
|
17
|
+
connection: ConnectionState;
|
|
12
18
|
};
|
|
13
19
|
export declare function afterhoursPrivacy(): AfterhoursSnapshot["boundary"];
|
|
14
20
|
//# sourceMappingURL=tools.d.ts.map
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAGlB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAGlB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AASD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,gBAAgB,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,eAAe,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,QAAQ,SAAK,GAAG,UAAU,CAQxD;AAED,wBAAgB,iBAAiB,IAAI;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC;IACpH,QAAQ,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAChD,UAAU,EAAE,eAAe,CAAC;CAC7B,CAcA;AAED,wBAAgB,iBAAiB,IAAI,kBAAkB,CAAC,UAAU,CAAC,CAElE"}
|
package/dist/tools.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { collectAfterhours, DATA_BOUNDARY, detectCodingAgents, readCredentials, reportFrom, } from "@teeras/afterhours";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
2
|
+
const CONNECT_REMEDY = "Not connected yet. Run `npx @teeras/afterhours setup` — you (the agent) can run it and relay the sign-in code to your user.";
|
|
3
|
+
function connectionState() {
|
|
4
|
+
return readCredentials() ? { connected: true } : { connected: false, connect: CONNECT_REMEDY };
|
|
6
5
|
}
|
|
7
6
|
export function afterhoursWeek(stopHour = 22) {
|
|
8
|
-
requireAccount();
|
|
9
7
|
const snapshot = collectAfterhours();
|
|
10
8
|
return {
|
|
11
9
|
report: reportFrom(snapshot, stopHour),
|
|
12
10
|
generatedAt: snapshot.generatedAt,
|
|
13
|
-
note: "
|
|
11
|
+
note: "This is one local snapshot. Open Teeras on web or mobile for longitudinal patterns, sleep, and recovery.",
|
|
12
|
+
connection: connectionState(),
|
|
14
13
|
};
|
|
15
14
|
}
|
|
16
15
|
export function afterhoursSources() {
|
|
17
|
-
requireAccount();
|
|
18
16
|
const snapshot = collectAfterhours();
|
|
19
17
|
return {
|
|
20
18
|
generatedAt: snapshot.generatedAt,
|
|
@@ -26,6 +24,7 @@ export function afterhoursSources() {
|
|
|
26
24
|
sessions: source.sessions,
|
|
27
25
|
})),
|
|
28
26
|
detected: detectCodingAgents().filter((agent) => agent.installed),
|
|
27
|
+
connection: connectionState(),
|
|
29
28
|
};
|
|
30
29
|
}
|
|
31
30
|
export function afterhoursPrivacy() {
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,UAAU,GAGX,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,UAAU,GAGX,MAAM,oBAAoB,CAAC;AAO5B,MAAM,cAAc,GAClB,6HAA6H,CAAC;AAEhI,SAAS,eAAe;IACtB,OAAO,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;AACjG,CAAC;AASD,MAAM,UAAU,cAAc,CAAC,QAAQ,GAAG,EAAE;IAC1C,MAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC;IACrC,OAAO;QACL,MAAM,EAAE,UAAU,CAAC,QAAQ,EAAE,QAAQ,CAAC;QACtC,WAAW,EAAE,QAAQ,CAAC,WAAW;QACjC,IAAI,EAAE,0GAA0G;QAChH,UAAU,EAAE,eAAe,EAAE;KAC9B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB;IAM/B,MAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC;IACrC,OAAO;QACL,WAAW,EAAE,QAAQ,CAAC,WAAW;QACjC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YACzC,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;SAC1B,CAAC,CAAC;QACH,QAAQ,EAAE,kBAAkB,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;QACjE,UAAU,EAAE,eAAe,EAAE;KAC9B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teeras/afterhours-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Account-gated MCP tools for private coding-agent usage and AI-life balance.",
|
|
5
5
|
"homepage": "https://teeras.com",
|
|
6
6
|
"keywords": [
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
47
|
-
"@teeras/afterhours": "^0.
|
|
47
|
+
"@teeras/afterhours": "^0.2.0",
|
|
48
48
|
"zod": "^3.25.76"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|