@assemblyline-agents/agentmail 3.0.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/LICENSE +21 -0
- package/README.md +75 -0
- package/dist/events.d.ts +3 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +140 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Assembly Line contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# @assemblyline-agents/agentmail
|
|
2
|
+
|
|
3
|
+
Official Assembly Line connection plugin for AgentMail's hosted MCP server at
|
|
4
|
+
`https://mcp.agentmail.to/mcp`.
|
|
5
|
+
|
|
6
|
+
The connection exposes AgentMail's reviewed API-key tools for inboxes, threads,
|
|
7
|
+
messages, drafts, attachments, and identity. The tools stay behind live tool
|
|
8
|
+
discovery; they are not copied into an agent's `tools/` folder or permanently
|
|
9
|
+
placed in model context.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
assembly-line add agentmail agent
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Set `AGENTMAIL_API_KEY` on the Assembly Line runtime host. Override the hosted
|
|
18
|
+
endpoint with `AGENTMAIL_MCP_URL` only when intentionally using another
|
|
19
|
+
AgentMail-compatible server.
|
|
20
|
+
|
|
21
|
+
The generated connection enables every reviewed AgentMail tool. Reads and
|
|
22
|
+
writes run without requiring an approval surface. To require approval for every
|
|
23
|
+
write:
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { defineAgentMailConnection } from "@assemblyline-agents/agentmail";
|
|
27
|
+
|
|
28
|
+
export default defineAgentMailConnection({
|
|
29
|
+
access: "approval-required"
|
|
30
|
+
});
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
To choose approval behavior tool by tool:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { defineAgentMailConnection } from "@assemblyline-agents/agentmail";
|
|
37
|
+
|
|
38
|
+
export default defineAgentMailConnection({
|
|
39
|
+
access: {
|
|
40
|
+
read: true,
|
|
41
|
+
write: {
|
|
42
|
+
approval: "never",
|
|
43
|
+
approvalOverrides: [
|
|
44
|
+
{
|
|
45
|
+
tools: [
|
|
46
|
+
"send_message",
|
|
47
|
+
"reply_to_message",
|
|
48
|
+
"forward_message",
|
|
49
|
+
"send_draft",
|
|
50
|
+
"delete_*"
|
|
51
|
+
],
|
|
52
|
+
approval: "always"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The developer can also narrow the reviewed tool set with the connection's
|
|
61
|
+
`tools` option. A local filter cannot expose unreviewed tools.
|
|
62
|
+
|
|
63
|
+
See the [AgentMail MCP documentation](https://docs.agentmail.to/integrations/mcp)
|
|
64
|
+
for the provider's current tool contracts.
|
|
65
|
+
|
|
66
|
+
## Part of Assembly Line
|
|
67
|
+
|
|
68
|
+
This package is part of [Assembly Line](https://github.com/jasonbadeaux/assembly-line),
|
|
69
|
+
a vendor-neutral, filesystem-first framework for durable AI agents. See the
|
|
70
|
+
[developer documentation](https://github.com/jasonbadeaux/assembly-line/tree/main/docs/developers)
|
|
71
|
+
for setup, agent authoring, and deployment guides.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT
|
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,4BAA4B,EAElC,MAAM,2BAA2B,CAAC;AAInC,eAAO,MAAM,eAAe,EAAE,4BA8F7B,CAAC"}
|
package/dist/events.js
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { ConnectionEventError, headerValue, parseConnectionEventJson, providerJson, requireEnvironmentValue, stringField, verifySvix } from "@assemblyline-agents/core";
|
|
2
|
+
const API = "https://api.agentmail.to/v0";
|
|
3
|
+
export const agentMailEvents = {
|
|
4
|
+
async reconcile(context) {
|
|
5
|
+
const token = requireEnvironmentValue(context.env, "AGENTMAIL_API_KEY");
|
|
6
|
+
const priorId = stringField(context.state ?? {}, "webhookId");
|
|
7
|
+
const priorUrl = stringField(context.state ?? {}, "callbackUrl");
|
|
8
|
+
const body = subscriptionBody(context.callbackUrl, context.selectedEvents, context.resources);
|
|
9
|
+
if (priorId && priorUrl === context.callbackUrl) {
|
|
10
|
+
const inboxIds = stringList(body, "inbox_ids");
|
|
11
|
+
const podIds = stringList(body, "pod_ids");
|
|
12
|
+
const priorInboxIds = stringList(context.state ?? {}, "inboxIds");
|
|
13
|
+
const priorPodIds = stringList(context.state ?? {}, "podIds");
|
|
14
|
+
const updated = await providerJson(context.fetch, `${API}/webhooks/${encodeURIComponent(priorId)}`, {
|
|
15
|
+
method: "PATCH",
|
|
16
|
+
headers: auth(token),
|
|
17
|
+
body: JSON.stringify({
|
|
18
|
+
event_types: context.selectedEvents,
|
|
19
|
+
add_inbox_ids: difference(inboxIds, priorInboxIds),
|
|
20
|
+
remove_inbox_ids: difference(priorInboxIds, inboxIds),
|
|
21
|
+
add_pod_ids: difference(podIds, priorPodIds),
|
|
22
|
+
remove_pod_ids: difference(priorPodIds, podIds)
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
return {
|
|
26
|
+
status: "active",
|
|
27
|
+
externalId: priorId,
|
|
28
|
+
state: {
|
|
29
|
+
webhookId: priorId,
|
|
30
|
+
callbackUrl: context.callbackUrl,
|
|
31
|
+
secret: stringField(updated, "secret") ?? stringField(context.state ?? {}, "secret") ?? "",
|
|
32
|
+
inboxIds,
|
|
33
|
+
podIds
|
|
34
|
+
},
|
|
35
|
+
detail: "AgentMail webhook is active."
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
if (priorId) {
|
|
39
|
+
await providerJson(context.fetch, `${API}/webhooks/${encodeURIComponent(priorId)}`, {
|
|
40
|
+
method: "DELETE",
|
|
41
|
+
headers: auth(token)
|
|
42
|
+
}, [200, 204, 404]);
|
|
43
|
+
}
|
|
44
|
+
const created = await providerJson(context.fetch, `${API}/webhooks`, {
|
|
45
|
+
method: "POST",
|
|
46
|
+
headers: auth(token),
|
|
47
|
+
body: JSON.stringify(body)
|
|
48
|
+
});
|
|
49
|
+
const webhookId = required(created, "webhook_id");
|
|
50
|
+
const secret = required(created, "secret");
|
|
51
|
+
const inboxIds = stringList(body, "inbox_ids");
|
|
52
|
+
const podIds = stringList(body, "pod_ids");
|
|
53
|
+
return {
|
|
54
|
+
status: "active",
|
|
55
|
+
externalId: webhookId,
|
|
56
|
+
state: { webhookId, secret, callbackUrl: context.callbackUrl, inboxIds, podIds },
|
|
57
|
+
detail: "AgentMail webhook is active."
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
async remove(context) {
|
|
61
|
+
const webhookId = stringField(context.state ?? {}, "webhookId");
|
|
62
|
+
if (!webhookId)
|
|
63
|
+
return;
|
|
64
|
+
const token = requireEnvironmentValue(context.env, "AGENTMAIL_API_KEY");
|
|
65
|
+
await providerJson(context.fetch, `${API}/webhooks/${encodeURIComponent(webhookId)}`, {
|
|
66
|
+
method: "DELETE",
|
|
67
|
+
headers: auth(token)
|
|
68
|
+
}, [200, 204, 404]);
|
|
69
|
+
},
|
|
70
|
+
async check(context) {
|
|
71
|
+
const webhookId = stringField(context.state ?? {}, "webhookId");
|
|
72
|
+
if (!webhookId)
|
|
73
|
+
return { status: "needs_setup", detail: "AgentMail webhook has not been created." };
|
|
74
|
+
const token = requireEnvironmentValue(context.env, "AGENTMAIL_API_KEY");
|
|
75
|
+
const value = await providerJson(context.fetch, `${API}/webhooks/${encodeURIComponent(webhookId)}`, { headers: auth(token) }, [200, 404]);
|
|
76
|
+
return value.webhook_id
|
|
77
|
+
? { status: value.enabled === false ? "degraded" : "active", detail: value.enabled === false ? "AgentMail webhook is disabled." : "AgentMail webhook is active." }
|
|
78
|
+
: { status: "degraded", detail: "AgentMail webhook no longer exists." };
|
|
79
|
+
},
|
|
80
|
+
ingress(request, context) {
|
|
81
|
+
const secret = stringField(context.state ?? {}, "secret");
|
|
82
|
+
if (!secret || !verifySvix({
|
|
83
|
+
secret,
|
|
84
|
+
body: request.body,
|
|
85
|
+
id: headerValue(request.headers, "svix-id"),
|
|
86
|
+
timestamp: headerValue(request.headers, "svix-timestamp"),
|
|
87
|
+
signature: headerValue(request.headers, "svix-signature")
|
|
88
|
+
}))
|
|
89
|
+
throw new ConnectionEventError("AgentMail webhook signature is invalid.", 401);
|
|
90
|
+
const payload = parseConnectionEventJson(request.body);
|
|
91
|
+
const event = required(payload, "event_type");
|
|
92
|
+
const eventId = stringField(payload, "event_id") ?? headerValue(request.headers, "svix-id");
|
|
93
|
+
const occurredAt = eventTimestamp(payload);
|
|
94
|
+
return {
|
|
95
|
+
events: [{ event, eventId, payload: payload, ...(occurredAt ? { occurredAt } : {}) }],
|
|
96
|
+
response: { status: 200, body: { ok: true } },
|
|
97
|
+
audit: { event }
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
function auth(token) {
|
|
102
|
+
return { authorization: `Bearer ${token}`, "content-type": "application/json" };
|
|
103
|
+
}
|
|
104
|
+
function subscriptionBody(callbackUrl, events, resources) {
|
|
105
|
+
const inboxIds = resources.map((resource) => stringField(resource, "inboxId")).filter((value) => Boolean(value));
|
|
106
|
+
const podIds = resources.map((resource) => stringField(resource, "podId")).filter((value) => Boolean(value));
|
|
107
|
+
return {
|
|
108
|
+
url: callbackUrl,
|
|
109
|
+
event_types: events,
|
|
110
|
+
client_id: "assembly-line",
|
|
111
|
+
...(inboxIds.length ? { inbox_ids: inboxIds } : {}),
|
|
112
|
+
...(podIds.length ? { pod_ids: podIds } : {})
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function stringList(value, name) {
|
|
116
|
+
const items = value[name];
|
|
117
|
+
return Array.isArray(items) ? items.filter((item) => typeof item === "string") : [];
|
|
118
|
+
}
|
|
119
|
+
function difference(left, right) {
|
|
120
|
+
const remove = new Set(right);
|
|
121
|
+
return left.filter((item) => !remove.has(item));
|
|
122
|
+
}
|
|
123
|
+
function eventTimestamp(payload) {
|
|
124
|
+
for (const key of ["message", "send", "delivery", "bounce", "complaint", "reject", "domain"]) {
|
|
125
|
+
const value = payload[key];
|
|
126
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
127
|
+
const timestamp = stringField(value, "timestamp", "created_at", "updated_at");
|
|
128
|
+
if (timestamp)
|
|
129
|
+
return timestamp;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return undefined;
|
|
133
|
+
}
|
|
134
|
+
function required(value, name) {
|
|
135
|
+
const result = stringField(value, name);
|
|
136
|
+
if (!result)
|
|
137
|
+
throw new Error(`AgentMail webhook response omitted ${name}.`);
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,wBAAwB,EACxB,YAAY,EACZ,uBAAuB,EACvB,WAAW,EACX,UAAU,EAGX,MAAM,2BAA2B,CAAC;AAEnC,MAAM,GAAG,GAAG,6BAA6B,CAAC;AAE1C,MAAM,CAAC,MAAM,eAAe,GAAiC;IAC3D,KAAK,CAAC,SAAS,CAAC,OAAO;QACrB,MAAM,KAAK,GAAG,uBAAuB,CAAC,OAAO,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;QACxE,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,EAAE,WAAW,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,EAAE,aAAa,CAAC,CAAC;QACjE,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QAC9F,IAAI,OAAO,IAAI,QAAQ,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC;YAChD,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YAC/C,MA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S,cAAc,CAAC,OAAgC;IACtD,KAAK,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC7F,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC3B,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAChE,MAAM,SAAS,GAAG,WAAW,CAAC,KAAgC,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;YACzG,IAAI,SAAS;gBAAE,OAAO,SAAS,CAAC;QAClC,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,QAAQ,CAAC,KAA8B,EAAE,IAAY;IAC5D,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACxC,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,IAAI,GAAG,CAAC,CAAC;IAC5E,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type McpPluginConnectionOptions } from "@assemblyline-agents/core";
|
|
2
|
+
export type AgentMailConnectionOptions = McpPluginConnectionOptions;
|
|
3
|
+
export declare function defineAgentMailConnection(options: AgentMailConnectionOptions): import("@assemblyline-agents/core").McpHttpClientConnectionDefinition;
|
|
4
|
+
export declare const assemblyLinePlugin: import("@assemblyline-agents/core").PluginModule;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,0BAA0B,EAChC,MAAM,2BAA2B,CAAC;AAKnC,MAAM,MAAM,0BAA0B,GAAG,0BAA0B,CAAC;AAEpE,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,0BAA0B,yEAK5E;AAED,eAAO,MAAM,kBAAkB,kDAA0C,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { connectionPluginMetadata, defineConnectionPluginEvents, defineMcpPluginConnection, definePlugin } from "@assemblyline-agents/core";
|
|
2
|
+
import { agentMailEvents } from "./events.js";
|
|
3
|
+
const PLUGIN = connectionPluginMetadata("agentmail");
|
|
4
|
+
export function defineAgentMailConnection(options) {
|
|
5
|
+
const definition = defineMcpPluginConnection(PLUGIN, options);
|
|
6
|
+
const events = defineConnectionPluginEvents(PLUGIN, options.events, agentMailEvents);
|
|
7
|
+
if (events)
|
|
8
|
+
definition.events = events;
|
|
9
|
+
return definition;
|
|
10
|
+
}
|
|
11
|
+
export const assemblyLinePlugin = definePlugin({ connections: [PLUGIN] });
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,yBAAyB,EACzB,YAAY,EAEb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,MAAM,GAAG,wBAAwB,CAAC,WAAW,CAAE,CAAC;AAItD,MAAM,UAAU,yBAAyB,CAAC,OAAmC;IAC3E,MAAM,UAAU,GAAG,yBAAyB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAG,4BAA4B,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACrF,IAAI,MAAM;QAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC;IACvC,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@assemblyline-agents/agentmail",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"default": "./dist/index.js"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@assemblyline-agents/core": "3.0.0"
|
|
13
|
+
},
|
|
14
|
+
"description": "Official Assembly Line AgentMail hosted MCP connection plugin.",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=22.19.0"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/jasonbadeaux/assembly-line.git",
|
|
25
|
+
"directory": "packages/agentmail"
|
|
26
|
+
},
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/jasonbadeaux/assembly-line/issues"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/jasonbadeaux/assembly-line#readme",
|
|
31
|
+
"author": "Assembly Line contributors",
|
|
32
|
+
"keywords": [
|
|
33
|
+
"assembly-line",
|
|
34
|
+
"ai",
|
|
35
|
+
"agents",
|
|
36
|
+
"agentmail",
|
|
37
|
+
"email",
|
|
38
|
+
"mcp",
|
|
39
|
+
"plugin"
|
|
40
|
+
],
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc -p tsconfig.json",
|
|
46
|
+
"check": "tsc -p tsconfig.json --noEmit"
|
|
47
|
+
}
|
|
48
|
+
}
|