@teeras/afterhours-mcp 0.2.0 → 0.4.1
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 +11 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +13 -2
- package/dist/server.js.map +1 -1
- package/dist/tools.d.ts +15 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +7 -1
- package/dist/tools.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Teeras Afterhours MCP
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Run `npx @teeras/afterhours setup` first. Activity tools refuse to scan local
|
|
4
|
+
agent histories until that Google-backed Teeras connection exists.
|
|
5
5
|
|
|
6
6
|
An optional, read-only local MCP adapter for Teeras Afterhours.
|
|
7
7
|
|
|
@@ -16,13 +16,21 @@ An optional, read-only local MCP adapter for Teeras Afterhours.
|
|
|
16
16
|
}
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
It gives a coding agent
|
|
19
|
+
It gives a coding agent five local tools:
|
|
20
20
|
|
|
21
|
+
- `afterhours_now` — today so far: time back with its share of agent time, the
|
|
22
|
+
last hour's tempo, and what is running now — the same object
|
|
23
|
+
`npx @teeras/afterhours now --json` prints, computed in the collector
|
|
21
24
|
- `afterhours_week` — the human's current local AI-life-balance snapshot;
|
|
22
25
|
longitudinal patterns remain in Teeras web and mobile
|
|
26
|
+
- `afterhours_vocabulary` — the words Teeras uses for its metrics, with their
|
|
27
|
+
glosses, so any agent speaks the same words
|
|
23
28
|
- `afterhours_sources` — detected coding-agent apps and setup fidelity
|
|
24
29
|
- `afterhours_privacy` — the exact retained/never-retained contract
|
|
25
30
|
|
|
31
|
+
Every duration is an estimate. The tools place facts side by side and never
|
|
32
|
+
assert a cause; sleep and recovery live on the human's phone.
|
|
33
|
+
|
|
26
34
|
The MCP server does not expose prompt text, code, outputs, repositories, working
|
|
27
35
|
directories, or file paths. It has no write tools and makes no network or LLM
|
|
28
36
|
calls. The collector remains independently useful without MCP.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { createAfterhoursServer } from "./server.js";
|
|
2
|
-
export { afterhoursPrivacy, afterhoursSources, afterhoursWeek, type WeekResult } from "./tools.js";
|
|
2
|
+
export { afterhoursNow, afterhoursPrivacy, afterhoursSources, afterhoursVocabulary, afterhoursWeek, type NowResult, type VocabularyResult, type WeekResult, } from "./tools.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,UAAU,GAChB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { createAfterhoursServer } from "./server.js";
|
|
2
|
-
export { afterhoursPrivacy, afterhoursSources, afterhoursWeek } from "./tools.js";
|
|
2
|
+
export { afterhoursNow, afterhoursPrivacy, afterhoursSources, afterhoursVocabulary, afterhoursWeek, } from "./tools.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,GAIf,MAAM,YAAY,CAAC"}
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAWpE,wBAAgB,sBAAsB,IAAI,SAAS,CAsDlD"}
|
package/dist/server.js
CHANGED
|
@@ -1,17 +1,28 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
1
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
|
-
import { afterhoursPrivacy, afterhoursSources, afterhoursWeek } from "./tools.js";
|
|
4
|
+
import { afterhoursNow, afterhoursPrivacy, afterhoursSources, afterhoursVocabulary, afterhoursWeek } from "./tools.js";
|
|
5
|
+
/** The published version, read from package.json so the two can never drift. */
|
|
6
|
+
const { version: PACKAGE_VERSION } = createRequire(import.meta.url)("../package.json");
|
|
4
7
|
function text(value) {
|
|
5
8
|
return { content: [{ type: "text", text: JSON.stringify(value, null, 2) }] };
|
|
6
9
|
}
|
|
7
10
|
export function createAfterhoursServer() {
|
|
8
|
-
const server = new McpServer({ name: "teeras-afterhours", version:
|
|
11
|
+
const server = new McpServer({ name: "teeras-afterhours", version: PACKAGE_VERSION });
|
|
9
12
|
server.registerTool("afterhours_week", {
|
|
10
13
|
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
14
|
inputSchema: {
|
|
12
15
|
stopHour: z.number().int().min(18).max(23).optional().describe("The human's local planned stop hour."),
|
|
13
16
|
},
|
|
14
17
|
}, ({ stopHour }) => text(afterhoursWeek(stopHour)));
|
|
18
|
+
server.registerTool("afterhours_now", {
|
|
19
|
+
description: "Today so far for the human — time back (stretches at or over their own threshold, always with its share of agent time), the last hour's tempo (check-ins, return latency, re-prompts under a minute, agents at once), and what is running now — the same object `trs now --json` prints. Every duration is an estimate; place facts side by side and never assert a cause; sleep and recovery live on the human's phone, so point there rather than guess.",
|
|
20
|
+
inputSchema: {},
|
|
21
|
+
}, () => text(afterhoursNow()));
|
|
22
|
+
server.registerTool("afterhours_vocabulary", {
|
|
23
|
+
description: "The words Teeras uses for its metrics — each label with its gloss, provenance, and display order — so you can speak them verbatim, lowercase, and say what each means the first time it appears.",
|
|
24
|
+
inputSchema: {},
|
|
25
|
+
}, () => text(afterhoursVocabulary()));
|
|
15
26
|
server.registerTool("afterhours_sources", {
|
|
16
27
|
description: "List locally detected coding-agent apps and the fidelity available from each source for setup diagnostics.",
|
|
17
28
|
inputSchema: {},
|
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;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EA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AY,CACjB,uBAAuB,EACvB;QACE,WAAW,EACT,kMAAkM;QACpM,WAAW,EAAE,EAAE;KAChB,EACD,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,CACnC,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,WAAW,EAAE,4GAA4G;QACzH,WAAW,EAAE,EAAE;KAChB,EACD,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAChC,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,WAAW,EAAE,oFAAoF;QACjG,WAAW,EAAE,EAAE;KAChB,EACD,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAChC,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { detectCodingAgents, type AfterhoursReport, type AfterhoursSnapshot } from "@teeras/afterhours";
|
|
1
|
+
import { detectCodingAgents, type AfterhoursReport, type AfterhoursSnapshot, type NowSnapshot, type VocabEntry, type VocabKey } from "@teeras/afterhours";
|
|
2
2
|
export interface ConnectionState {
|
|
3
3
|
connected: boolean;
|
|
4
4
|
connect?: string;
|
|
@@ -17,4 +17,18 @@ export declare function afterhoursSources(): {
|
|
|
17
17
|
connection: ConnectionState;
|
|
18
18
|
};
|
|
19
19
|
export declare function afterhoursPrivacy(): AfterhoursSnapshot["boundary"];
|
|
20
|
+
/**
|
|
21
|
+
* `trs now --json`, plus the connection state every tool here carries. The
|
|
22
|
+
* numbers are computed once, in `@teeras/afterhours`; this is a transport.
|
|
23
|
+
*/
|
|
24
|
+
export type NowResult = NowSnapshot & {
|
|
25
|
+
connection: ConnectionState;
|
|
26
|
+
};
|
|
27
|
+
export declare function afterhoursNow(): NowResult;
|
|
28
|
+
/** The JSON twin of the collector's vocabulary — identical to its `vocabulary.json`. */
|
|
29
|
+
export interface VocabularyResult {
|
|
30
|
+
version: number;
|
|
31
|
+
entries: Readonly<Record<VocabKey, VocabEntry>>;
|
|
32
|
+
}
|
|
33
|
+
export declare function afterhoursVocabulary(): VocabularyResult;
|
|
20
34
|
//# 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,
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAMlB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,QAAQ,EACd,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;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG;IAAE,UAAU,EAAE,eAAe,CAAA;CAAE,CAAC;AAEtE,wBAAgB,aAAa,IAAI,SAAS,CAEzC;AAED,wFAAwF;AACxF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;CACjD;AAED,wBAAgB,oBAAoB,IAAI,gBAAgB,CAEvD"}
|
package/dist/tools.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { collectAfterhours, DATA_BOUNDARY, detectCodingAgents, readCredentials, reportFrom, } from "@teeras/afterhours";
|
|
1
|
+
import { collectAfterhours, DATA_BOUNDARY, detectCodingAgents, nowFrom, readCredentials, reportFrom, VOCABULARY, VOCABULARY_VERSION, } from "@teeras/afterhours";
|
|
2
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
3
|
function connectionState() {
|
|
4
4
|
return readCredentials() ? { connected: true } : { connected: false, connect: CONNECT_REMEDY };
|
|
@@ -30,4 +30,10 @@ export function afterhoursSources() {
|
|
|
30
30
|
export function afterhoursPrivacy() {
|
|
31
31
|
return DATA_BOUNDARY;
|
|
32
32
|
}
|
|
33
|
+
export function afterhoursNow() {
|
|
34
|
+
return { ...nowFrom(), connection: connectionState() };
|
|
35
|
+
}
|
|
36
|
+
export function afterhoursVocabulary() {
|
|
37
|
+
return { version: VOCABULARY_VERSION, entries: VOCABULARY };
|
|
38
|
+
}
|
|
33
39
|
//# sourceMappingURL=tools.js.map
|
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,E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AK,CAAC,SAAS,CAAC;QACjE,UAAU,EAAE,eAAe,EAAE;KAC9B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,aAAa,CAAC;AACvB,CAAC;AAQD,MAAM,UAAU,aAAa;IAC3B,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,EAAE,CAAC;AACzD,CAAC;AAQD,MAAM,UAAU,oBAAoB;IAClC,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AAC9D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teeras/afterhours-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
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.10.0",
|
|
48
48
|
"zod": "^3.25.76"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|