@tpmjs/official-nda-template-draft 0.1.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/dist/index.d.ts +48 -0
- package/dist/index.js +192 -0
- package/package.json +88 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2025 TPMJS
|
|
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/dist/index.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as ai from 'ai';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* NDA Template Draft Tool for TPMJS
|
|
5
|
+
* Generates NDA templates with customizable terms for mutual or unilateral agreements
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Type of NDA agreement
|
|
9
|
+
*/
|
|
10
|
+
type NDAType = 'mutual' | 'unilateral';
|
|
11
|
+
/**
|
|
12
|
+
* Input interface for NDA template generation
|
|
13
|
+
*/
|
|
14
|
+
interface NDATemplateDraftInput {
|
|
15
|
+
type: NDAType;
|
|
16
|
+
disclosingParty: string;
|
|
17
|
+
receivingParty: string;
|
|
18
|
+
term?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Represents a section of the NDA
|
|
22
|
+
*/
|
|
23
|
+
interface NDASection {
|
|
24
|
+
title: string;
|
|
25
|
+
content: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Output interface for NDA template
|
|
29
|
+
*/
|
|
30
|
+
interface NDATemplate {
|
|
31
|
+
title: string;
|
|
32
|
+
type: NDAType;
|
|
33
|
+
parties: {
|
|
34
|
+
disclosing: string;
|
|
35
|
+
receiving: string;
|
|
36
|
+
};
|
|
37
|
+
effectiveDate: string;
|
|
38
|
+
term: number;
|
|
39
|
+
sections: NDASection[];
|
|
40
|
+
fullText: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* NDA Template Draft Tool
|
|
44
|
+
* Generates NDA templates for mutual or unilateral agreements
|
|
45
|
+
*/
|
|
46
|
+
declare const ndaTemplateDraftTool: ai.Tool<NDATemplateDraftInput, NDATemplate>;
|
|
47
|
+
|
|
48
|
+
export { type NDASection, type NDATemplate, ndaTemplateDraftTool as default, ndaTemplateDraftTool };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { tool, jsonSchema } from 'ai';
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
function generateNDATemplate(input) {
|
|
5
|
+
const { type, disclosingParty, receivingParty, term } = input;
|
|
6
|
+
const isMutual = type === "mutual";
|
|
7
|
+
const today = (/* @__PURE__ */ new Date()).toISOString().split("T")[0] || "";
|
|
8
|
+
const disclosingRef = isMutual ? "each Party" : disclosingParty;
|
|
9
|
+
const receivingRef = isMutual ? "the other Party" : receivingParty;
|
|
10
|
+
const sections = [
|
|
11
|
+
{
|
|
12
|
+
title: "1. Definitions",
|
|
13
|
+
content: `"Confidential Information" means any information disclosed by ${disclosingRef} to ${receivingRef}, whether orally, in writing, or in any other form, that is designated as confidential or that reasonably should be understood to be confidential given the nature of the information and the circumstances of disclosure. Confidential Information includes, but is not limited to, business plans, technical data, customer lists, financial information, trade secrets, and proprietary information.
|
|
14
|
+
|
|
15
|
+
"Disclosing Party" means ${isMutual ? "the Party disclosing Confidential Information" : disclosingParty}.
|
|
16
|
+
|
|
17
|
+
"Receiving Party" means ${isMutual ? "the Party receiving Confidential Information" : receivingParty}.`
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: "2. Confidentiality Obligations",
|
|
21
|
+
content: `The Receiving Party agrees to:
|
|
22
|
+
|
|
23
|
+
a) Hold all Confidential Information in strict confidence;
|
|
24
|
+
b) Not disclose Confidential Information to any third parties without the prior written consent of the Disclosing Party;
|
|
25
|
+
c) Use the Confidential Information solely for the purpose of ${isMutual ? "the business relationship between the Parties" : "evaluating a potential business relationship"};
|
|
26
|
+
d) Limit access to Confidential Information to employees, contractors, and advisors who have a legitimate need to know and who have been informed of the confidential nature of such information;
|
|
27
|
+
e) Protect the Confidential Information using the same degree of care it uses to protect its own confidential information, but in no event less than reasonable care.`
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: "3. Exclusions from Confidential Information",
|
|
31
|
+
content: `The obligations set forth in Section 2 shall not apply to any Confidential Information that:
|
|
32
|
+
|
|
33
|
+
a) Was known to the Receiving Party prior to disclosure by the Disclosing Party;
|
|
34
|
+
b) Is or becomes publicly available through no breach of this Agreement by the Receiving Party;
|
|
35
|
+
c) Is rightfully received by the Receiving Party from a third party without breach of any confidentiality obligation;
|
|
36
|
+
d) Is independently developed by the Receiving Party without use of or reference to the Confidential Information;
|
|
37
|
+
e) Is required to be disclosed by law, regulation, or court order, provided that the Receiving Party provides prompt written notice to the Disclosing Party and cooperates in any effort to seek a protective order.`
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
title: "4. Term and Termination",
|
|
41
|
+
// Domain rule: confidentiality_survival - Confidentiality obligations survive agreement termination for the specified term
|
|
42
|
+
content: `This Agreement shall commence on the Effective Date and shall continue for a period of ${term} year${term !== 1 ? "s" : ""} (the "Term"). The obligations of confidentiality shall survive termination of this Agreement and shall continue for a period of ${term} year${term !== 1 ? "s" : ""} from the date of termination.
|
|
43
|
+
|
|
44
|
+
Either Party may terminate this Agreement at any time upon written notice to the other Party. Upon termination, the Receiving Party shall promptly return or destroy all Confidential Information and certify such destruction in writing to the Disclosing Party.`
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: "5. Return of Materials",
|
|
48
|
+
content: `Upon request by the Disclosing Party, or upon termination of this Agreement, the Receiving Party shall promptly:
|
|
49
|
+
|
|
50
|
+
a) Return all documents, materials, and other tangible items containing or representing Confidential Information;
|
|
51
|
+
b) Destroy all copies, notes, and derivatives of Confidential Information in its possession or control;
|
|
52
|
+
c) Provide written certification of such return or destruction.
|
|
53
|
+
|
|
54
|
+
The Receiving Party may retain one copy of Confidential Information solely for archival purposes and regulatory compliance, subject to the continuing confidentiality obligations of this Agreement.`
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
title: "6. No License or Rights",
|
|
58
|
+
content: `Nothing in this Agreement grants the Receiving Party any license, ownership interest, or rights in the Confidential Information except as expressly stated herein. All Confidential Information remains the sole property of the Disclosing Party.
|
|
59
|
+
|
|
60
|
+
This Agreement does not obligate either Party to enter into any further business relationship or agreement.`
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: "7. Remedies",
|
|
64
|
+
content: `The Receiving Party acknowledges that unauthorized disclosure or use of Confidential Information may cause irreparable harm to the Disclosing Party for which monetary damages may be inadequate. Accordingly, the Disclosing Party shall be entitled to seek equitable relief, including injunction and specific performance, in addition to all other remedies available at law or in equity.`
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
title: "8. Governing Law and Jurisdiction",
|
|
68
|
+
content: `This Agreement shall be governed by and construed in accordance with the laws of [Jurisdiction], without regard to its conflict of law provisions. Any disputes arising under this Agreement shall be resolved in the courts of [Jurisdiction].`
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: "9. Entire Agreement",
|
|
72
|
+
content: `This Agreement constitutes the entire agreement between the Parties concerning the subject matter hereof and supersedes all prior agreements and understandings, whether written or oral, relating to such subject matter.
|
|
73
|
+
|
|
74
|
+
This Agreement may only be modified by a written amendment signed by both Parties.`
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
title: "10. Severability",
|
|
78
|
+
content: `If any provision of this Agreement is found to be invalid or unenforceable, the remaining provisions shall continue in full force and effect. The invalid or unenforceable provision shall be replaced with a valid provision that most closely approximates the intent and economic effect of the invalid provision.`
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
const fullText = `
|
|
82
|
+
NON-DISCLOSURE AGREEMENT
|
|
83
|
+
(${isMutual ? "Mutual" : "Unilateral"})
|
|
84
|
+
|
|
85
|
+
This Non-Disclosure Agreement (the "Agreement") is entered into as of ${today} (the "Effective Date") by and between:
|
|
86
|
+
|
|
87
|
+
${disclosingParty} ("${isMutual ? "Party A" : "Disclosing Party"}")
|
|
88
|
+
|
|
89
|
+
and
|
|
90
|
+
|
|
91
|
+
${receivingParty} ("${isMutual ? "Party B" : "Receiving Party"}")
|
|
92
|
+
|
|
93
|
+
${isMutual ? '(Party A and Party B are collectively referred to as the "Parties")' : ""}
|
|
94
|
+
|
|
95
|
+
WHEREAS, ${isMutual ? "the Parties wish to explore a business relationship and may disclose Confidential Information to each other" : `${disclosingParty} possesses certain confidential information that may be disclosed to ${receivingParty}`};
|
|
96
|
+
|
|
97
|
+
WHEREAS, the ${isMutual ? "Parties desire" : "Receiving Party desires"} to protect the confidentiality of such information;
|
|
98
|
+
|
|
99
|
+
NOW, THEREFORE, in consideration of the mutual covenants and agreements contained herein, the Parties agree as follows:
|
|
100
|
+
|
|
101
|
+
${sections.map((section) => `${section.title}
|
|
102
|
+
|
|
103
|
+
${section.content}`).join("\n\n")}
|
|
104
|
+
|
|
105
|
+
IN WITNESS WHEREOF, the Parties have executed this Agreement as of the Effective Date.
|
|
106
|
+
|
|
107
|
+
${disclosingParty}
|
|
108
|
+
|
|
109
|
+
By: _______________________
|
|
110
|
+
Name:
|
|
111
|
+
Title:
|
|
112
|
+
Date:
|
|
113
|
+
|
|
114
|
+
${receivingParty}
|
|
115
|
+
|
|
116
|
+
By: _______________________
|
|
117
|
+
Name:
|
|
118
|
+
Title:
|
|
119
|
+
Date:
|
|
120
|
+
`.trim();
|
|
121
|
+
return {
|
|
122
|
+
title: `Non-Disclosure Agreement (${isMutual ? "Mutual" : "Unilateral"})`,
|
|
123
|
+
type,
|
|
124
|
+
parties: {
|
|
125
|
+
disclosing: disclosingParty,
|
|
126
|
+
receiving: receivingParty
|
|
127
|
+
},
|
|
128
|
+
effectiveDate: today,
|
|
129
|
+
term,
|
|
130
|
+
sections,
|
|
131
|
+
fullText
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
var ndaTemplateDraftTool = tool({
|
|
135
|
+
description: "Generates a comprehensive Non-Disclosure Agreement (NDA) template with customizable terms. Supports both mutual (bidirectional) and unilateral (one-way) confidentiality agreements. Includes standard sections: definitions, confidentiality obligations, exclusions, term, return of materials, remedies, and governing law. Returns a structured template with individual sections and full formatted text ready for customization.",
|
|
136
|
+
inputSchema: jsonSchema({
|
|
137
|
+
type: "object",
|
|
138
|
+
properties: {
|
|
139
|
+
type: {
|
|
140
|
+
type: "string",
|
|
141
|
+
enum: ["mutual", "unilateral"],
|
|
142
|
+
description: 'Type of NDA: "mutual" for bidirectional confidentiality or "unilateral" for one-way disclosure'
|
|
143
|
+
},
|
|
144
|
+
disclosingParty: {
|
|
145
|
+
type: "string",
|
|
146
|
+
description: "Full legal name of the disclosing party"
|
|
147
|
+
},
|
|
148
|
+
receivingParty: {
|
|
149
|
+
type: "string",
|
|
150
|
+
description: "Full legal name of the receiving party"
|
|
151
|
+
},
|
|
152
|
+
term: {
|
|
153
|
+
type: "number",
|
|
154
|
+
description: "Confidentiality term in years (default: 2)"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
required: ["type", "disclosingParty", "receivingParty"],
|
|
158
|
+
additionalProperties: false
|
|
159
|
+
}),
|
|
160
|
+
execute: async ({ type, disclosingParty, receivingParty, term = 2 }) => {
|
|
161
|
+
if (type !== "mutual" && type !== "unilateral") {
|
|
162
|
+
throw new Error('Type must be either "mutual" or "unilateral"');
|
|
163
|
+
}
|
|
164
|
+
if (!disclosingParty || disclosingParty.trim().length === 0) {
|
|
165
|
+
throw new Error("Disclosing party name cannot be empty");
|
|
166
|
+
}
|
|
167
|
+
if (!receivingParty || receivingParty.trim().length === 0) {
|
|
168
|
+
throw new Error("Receiving party name cannot be empty");
|
|
169
|
+
}
|
|
170
|
+
if (term <= 0 || term > 20) {
|
|
171
|
+
throw new Error("Term must be between 1 and 20 years");
|
|
172
|
+
}
|
|
173
|
+
if (!Number.isInteger(term)) {
|
|
174
|
+
throw new Error("Term must be a whole number");
|
|
175
|
+
}
|
|
176
|
+
try {
|
|
177
|
+
return generateNDATemplate({
|
|
178
|
+
type,
|
|
179
|
+
disclosingParty: disclosingParty.trim(),
|
|
180
|
+
receivingParty: receivingParty.trim(),
|
|
181
|
+
term
|
|
182
|
+
});
|
|
183
|
+
} catch (error) {
|
|
184
|
+
throw new Error(
|
|
185
|
+
`Failed to generate NDA template: ${error instanceof Error ? error.message : String(error)}`
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
var index_default = ndaTemplateDraftTool;
|
|
191
|
+
|
|
192
|
+
export { index_default as default, ndaTemplateDraftTool };
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tpmjs/official-nda-template-draft",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Generates NDA template with customizable terms for mutual or unilateral agreements",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"tpmjs",
|
|
8
|
+
"legal",
|
|
9
|
+
"nda",
|
|
10
|
+
"template",
|
|
11
|
+
"confidentiality"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"tsup": "^8.3.5",
|
|
24
|
+
"typescript": "^5.9.3",
|
|
25
|
+
"@tpmjs/tsconfig": "0.0.0"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/anthropics/tpmjs.git",
|
|
33
|
+
"directory": "packages/tools/official/nda-template-draft"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://tpmjs.com",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"tpmjs": {
|
|
38
|
+
"category": "legal",
|
|
39
|
+
"frameworks": [
|
|
40
|
+
"vercel-ai"
|
|
41
|
+
],
|
|
42
|
+
"tools": [
|
|
43
|
+
{
|
|
44
|
+
"name": "ndaTemplateDraftTool",
|
|
45
|
+
"description": "Generates NDA template with customizable terms for mutual or unilateral agreements",
|
|
46
|
+
"parameters": [
|
|
47
|
+
{
|
|
48
|
+
"name": "type",
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "NDA type (mutual or unilateral)",
|
|
51
|
+
"required": true
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "disclosingParty",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "Disclosing party name",
|
|
57
|
+
"required": true
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "receivingParty",
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "Receiving party name",
|
|
63
|
+
"required": true
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "term",
|
|
67
|
+
"type": "number",
|
|
68
|
+
"description": "Term in years (default: 2)",
|
|
69
|
+
"required": false
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"returns": {
|
|
73
|
+
"type": "NDATemplate",
|
|
74
|
+
"description": "Generated NDA template with all sections"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"ai": "6.0.0-beta.124"
|
|
81
|
+
},
|
|
82
|
+
"scripts": {
|
|
83
|
+
"build": "tsup",
|
|
84
|
+
"dev": "tsup --watch",
|
|
85
|
+
"type-check": "tsc --noEmit",
|
|
86
|
+
"clean": "rm -rf dist .turbo"
|
|
87
|
+
}
|
|
88
|
+
}
|