@gram-ai/create-function 0.8.1 → 0.9.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/gram-template-gram/CONTRIBUTING.md +11 -0
- package/gram-template-gram/package.json +3 -2
- package/gram-template-mcp/package.json +3 -2
- package/package.json +2 -2
- package/gram-template-gram/node_modules/.bin/mcp-inspector +0 -21
- package/gram-template-gram/node_modules/.bin/tsc +0 -21
- package/gram-template-gram/node_modules/.bin/tsserver +0 -21
- package/gram-template-mcp/node_modules/.bin/mcp-inspector +0 -21
- package/gram-template-mcp/node_modules/.bin/tsc +0 -21
- package/gram-template-mcp/node_modules/.bin/tsserver +0 -21
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
## `package.json` scripts
|
|
15
15
|
|
|
16
|
+
- `dev` - Runs the MCP Inspector playground with hot reloading enabled.
|
|
16
17
|
- `build` - Bundles the Gram Functions code into a zip file for deployment and places it in the `dist/` directory.
|
|
17
18
|
- `lint` - Runs the TypeScript compiler in `noEmit` mode to check for type errors.
|
|
18
19
|
|
|
@@ -94,6 +95,16 @@ async execute(ctx, input) {
|
|
|
94
95
|
}
|
|
95
96
|
```
|
|
96
97
|
|
|
98
|
+
#### `ctx.markdown(data)`
|
|
99
|
+
|
|
100
|
+
Returns a Markdown response:
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
async execute(ctx, input) {
|
|
104
|
+
return ctx.markdown("# Heading");
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
97
108
|
#### `ctx.fail(data, options?)`
|
|
98
109
|
|
|
99
110
|
Throws an error response (never returns):
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"node": ">=22.18.0"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"dev": "mcp-inspector node ./src/server.ts",
|
|
22
|
+
"dev": "mcp-inspector nodemon -q --watch src --exec node ./src/server.ts",
|
|
23
23
|
"lint": "tsc --noEmit",
|
|
24
24
|
"_:build": "gf build",
|
|
25
25
|
"push": "gf push",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@modelcontextprotocol/inspector": "^0.17.1",
|
|
36
|
+
"nodemon": "^3.1.9",
|
|
36
37
|
"@types/node": "22.x",
|
|
37
38
|
"typescript": "^5"
|
|
38
39
|
}
|
|
39
|
-
}
|
|
40
|
+
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"node": ">=22.18.0"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"dev": "mcp-inspector node ./src/server.ts",
|
|
22
|
+
"dev": "mcp-inspector nodemon -q --watch src --exec node ./src/server.ts",
|
|
23
23
|
"_:build": "gf build",
|
|
24
24
|
"push": "gf push",
|
|
25
25
|
"prebuild": "tsc -p tsconfig.json",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@modelcontextprotocol/inspector": "^0.17.1",
|
|
35
|
+
"nodemon": "^3.1.9",
|
|
35
36
|
"@types/node": "22.x",
|
|
36
37
|
"typescript": "^5"
|
|
37
38
|
}
|
|
38
|
-
}
|
|
39
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gram-ai/create-function",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.0",
|
|
5
5
|
"description": "Build AI tools and deploy them to getgram.ai",
|
|
6
6
|
"keywords": [],
|
|
7
7
|
"homepage": "https://github.com/speakeasy-api/gram",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"prettier": "^3.6.2",
|
|
39
39
|
"typescript": "5.9.2",
|
|
40
40
|
"zod": "^3.25.76",
|
|
41
|
-
"@gram-ai/functions": "^0.
|
|
41
|
+
"@gram-ai/functions": "^0.9.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "tsc --noEmit false"
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/inspector/cli/build/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/inspector/cli/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/inspector/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/inspector/cli/build/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/inspector/cli/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/inspector/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../@modelcontextprotocol/inspector/cli/build/cli.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../@modelcontextprotocol/inspector/cli/build/cli.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../typescript/bin/tsc" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/inspector/cli/build/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/inspector/cli/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/inspector/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/inspector/cli/build/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/inspector/cli/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/inspector/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules/@modelcontextprotocol/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/@modelcontextprotocol+inspector@0.17.1_@types+node@22.18.6_@types+react-dom@19.1.9_@typ_cc52197392af7d7a50d2088d86700a7d/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../@modelcontextprotocol/inspector/cli/build/cli.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../@modelcontextprotocol/inspector/cli/build/cli.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../typescript/bin/tsc" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/typescript@5.8.3/node_modules:/home/runner/work/gram/gram/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
|
21
|
-
fi
|