grok-taskflow 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.
@@ -0,0 +1,13 @@
1
+ /**
2
+ * grok-taskflow public entry.
3
+ *
4
+ * The grok runner lives in `taskflow-hosts`. This package re-exports it so
5
+ * `import { grokSubagentRunner, runGrokAgentTask, buildGrokArgs, … } from
6
+ * "grok-taskflow"` works. New code should prefer `taskflow-hosts` /
7
+ * `taskflow-hosts/grok`; this re-export is the delivery-package public surface.
8
+ *
9
+ * The delivery surface (MCP server + bin + Grok plugin scaffold) ships from
10
+ * this package — see `./mcp/server.ts`, `./mcp/bin.ts`, and `./plugin/`.
11
+ */
12
+ export * from "taskflow-hosts/grok";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,cAAc,qBAAqB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * grok-taskflow public entry.
3
+ *
4
+ * The grok runner lives in `taskflow-hosts`. This package re-exports it so
5
+ * `import { grokSubagentRunner, runGrokAgentTask, buildGrokArgs, … } from
6
+ * "grok-taskflow"` works. New code should prefer `taskflow-hosts` /
7
+ * `taskflow-hosts/grok`; this re-export is the delivery-package public surface.
8
+ *
9
+ * The delivery surface (MCP server + bin + Grok plugin scaffold) ships from
10
+ * this package — see `./mcp/server.ts`, `./mcp/bin.ts`, and `./plugin/`.
11
+ */
12
+ export * from "taskflow-hosts/grok";
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Executable entry for the taskflow MCP server, grok-bound (the
4
+ * `grok-taskflow-mcp` bin).
5
+ *
6
+ * Register with Grok Build:
7
+ * npm install -g grok-taskflow
8
+ * grok mcp add taskflow -- grok-taskflow-mcp
9
+ *
10
+ * Or install the plugin scaffold (skills + MCP via npx):
11
+ * grok plugin install ./packages/grok-taskflow/plugin --trust
12
+ * # or: grok plugin install <marketplace-entry> --trust
13
+ *
14
+ * From a checkout of this repo (after `pnpm run build`):
15
+ * grok mcp add taskflow -- node /abs/path/to/packages/grok-taskflow/dist/mcp/bin.js
16
+ *
17
+ * Grok then launches this as a stdio MCP server and the taskflow_* tools
18
+ * become available. The server discovers saved flows + agents from its launch
19
+ * cwd, and runs each subagent as a grok -p session.
20
+ */
21
+ export {};
22
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../src/mcp/bin.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;GAkBG"}
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Executable entry for the taskflow MCP server, grok-bound (the
4
+ * `grok-taskflow-mcp` bin).
5
+ *
6
+ * Register with Grok Build:
7
+ * npm install -g grok-taskflow
8
+ * grok mcp add taskflow -- grok-taskflow-mcp
9
+ *
10
+ * Or install the plugin scaffold (skills + MCP via npx):
11
+ * grok plugin install ./packages/grok-taskflow/plugin --trust
12
+ * # or: grok plugin install <marketplace-entry> --trust
13
+ *
14
+ * From a checkout of this repo (after `pnpm run build`):
15
+ * grok mcp add taskflow -- node /abs/path/to/packages/grok-taskflow/dist/mcp/bin.js
16
+ *
17
+ * Grok then launches this as a stdio MCP server and the taskflow_* tools
18
+ * become available. The server discovers saved flows + agents from its launch
19
+ * cwd, and runs each subagent as a grok -p session.
20
+ */
21
+ import { startMcpServer } from "./server.js";
22
+ startMcpServer(process.cwd())
23
+ .then(() => process.exit(0))
24
+ .catch((e) => {
25
+ // Never write non-JSON to stdout (it would corrupt the MCP stream); log to
26
+ // stderr and exit non-zero so the client sees the transport drop.
27
+ process.stderr.write(`taskflow mcp server fatal: ${e instanceof Error ? e.stack ?? e.message : String(e)}\n`);
28
+ process.exit(1);
29
+ });
30
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../../src/mcp/bin.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;KAC3B,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KAC3B,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;IACZ,2EAA2E;IAC3E,kEAAkE;IAClE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9G,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The Grok Build binding of the host-neutral MCP server (taskflow-mcp-core/server).
3
+ *
4
+ * The protocol layer, tool schemas, and handlers all live in core; this shim
5
+ * only closes the loop for Grok: every subagent a flow spawns is itself a
6
+ * `grok -p` process (via grokSubagentRunner). Kept as a module (not just
7
+ * bin.ts) so tests and embedders get the same pre-bound surface the bin runs.
8
+ */
9
+ import type { RpcContext, RpcHandler } from "taskflow-mcp-core/jsonrpc";
10
+ /** Per-call tool handlers with grok subagent execution bound in. */
11
+ export declare function makeToolHandlers(cwd: string): Record<string, (args: Record<string, unknown>, context?: RpcContext) => Promise<unknown>>;
12
+ /** Full MCP method dispatch table (protocol + tools), grok-bound. */
13
+ export declare function makeMcpHandlers(cwd: string): Record<string, RpcHandler>;
14
+ /** Start the stdio MCP server. Resolves when the client disconnects. */
15
+ export declare function startMcpServer(cwd?: string): Promise<void>;
16
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGxE,oEAAoE;AACpE,wBAAgB,gBAAgB,CAC/B,GAAG,EAAE,MAAM,GACT,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,UAAU,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,CAE3F;AAED,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAEvE;AAED,wEAAwE;AACxE,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzE"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The Grok Build binding of the host-neutral MCP server (taskflow-mcp-core/server).
3
+ *
4
+ * The protocol layer, tool schemas, and handlers all live in core; this shim
5
+ * only closes the loop for Grok: every subagent a flow spawns is itself a
6
+ * `grok -p` process (via grokSubagentRunner). Kept as a module (not just
7
+ * bin.ts) so tests and embedders get the same pre-bound surface the bin runs.
8
+ */
9
+ import { makeMcpHandlers as coreMakeMcpHandlers, makeToolHandlers as coreMakeToolHandlers, startMcpServer as coreStartMcpServer, } from "taskflow-mcp-core/server";
10
+ import { grokSubagentRunner } from "taskflow-hosts";
11
+ /** Per-call tool handlers with grok subagent execution bound in. */
12
+ export function makeToolHandlers(cwd) {
13
+ return coreMakeToolHandlers(cwd, grokSubagentRunner);
14
+ }
15
+ /** Full MCP method dispatch table (protocol + tools), grok-bound. */
16
+ export function makeMcpHandlers(cwd) {
17
+ return coreMakeMcpHandlers(cwd, grokSubagentRunner);
18
+ }
19
+ /** Start the stdio MCP server. Resolves when the client disconnects. */
20
+ export function startMcpServer(cwd = process.cwd()) {
21
+ return coreStartMcpServer(grokSubagentRunner, cwd);
22
+ }
23
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACN,eAAe,IAAI,mBAAmB,EACtC,gBAAgB,IAAI,oBAAoB,EACxC,cAAc,IAAI,kBAAkB,GACpC,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,oEAAoE;AACpE,MAAM,UAAU,gBAAgB,CAC/B,GAAW;IAEX,OAAO,oBAAoB,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC;AACtD,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,eAAe,CAAC,GAAW;IAC1C,OAAO,mBAAmB,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC;AACrD,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,cAAc,CAAC,GAAG,GAAW,OAAO,CAAC,GAAG,EAAE;IACzD,OAAO,kBAAkB,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;AACpD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "grok-taskflow",
3
+ "version": "0.2.0",
4
+ "description": "Run taskflow on Grok Build: a Grok subagent runner plus an MCP server (and a plug-and-play Grok plugin) that exposes the taskflow_* tools to Grok Build users.",
5
+ "keywords": [
6
+ "grok",
7
+ "grok-build",
8
+ "xai",
9
+ "mcp",
10
+ "taskflow",
11
+ "orchestration",
12
+ "subagents",
13
+ "workflow"
14
+ ],
15
+ "license": "MIT",
16
+ "author": "heggria <bshengtao@gmail.com>",
17
+ "homepage": "https://github.com/heggria/taskflow#readme",
18
+ "bugs": {
19
+ "url": "https://github.com/heggria/taskflow/issues"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/heggria/taskflow.git",
24
+ "directory": "packages/grok-taskflow"
25
+ },
26
+ "type": "module",
27
+ "engines": {
28
+ "node": ">=22.19.0"
29
+ },
30
+ "main": "./dist/index.js",
31
+ "types": "./dist/index.d.ts",
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "default": "./dist/index.js"
36
+ },
37
+ "./mcp/server": {
38
+ "types": "./dist/mcp/server.d.ts",
39
+ "default": "./dist/mcp/server.js"
40
+ }
41
+ },
42
+ "bin": {
43
+ "grok-taskflow-mcp": "./dist/mcp/bin.js"
44
+ },
45
+ "files": [
46
+ "dist"
47
+ ],
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "dependencies": {
52
+ "taskflow-core": "0.2.0",
53
+ "taskflow-hosts": "0.2.0",
54
+ "taskflow-mcp-core": "0.2.0"
55
+ },
56
+ "scripts": {
57
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && node ../../scripts/copy-readme.mjs grok-taskflow"
58
+ }
59
+ }