@keepur/hive 0.1.0 → 0.1.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 +37 -321
- package/package.json +9 -10
- package/pkg/cli.min.js +195 -164
- package/pkg/mcp/admin.min.js +16 -16
- package/pkg/mcp/code-search.min.js +1 -1
- package/pkg/mcp/code-task.min.js +1 -1
- package/pkg/mcp/contacts.min.js +1 -1
- package/pkg/mcp/keychain.min.js +16 -16
- package/pkg/mcp/linear.min.js +1 -1
- package/pkg/mcp/memory.min.js +24 -17
- package/pkg/mcp/resend.min.js +14 -14
- package/pkg/mcp/workflow.min.js +23 -23
- package/pkg/server.min.js +246 -242
- package/scripts/honeypot +186 -0
- package/seeds/chief-of-staff/agent.yaml +2 -2
- package/seeds/chief-of-staff/skills/agent-builder/skills/agent-builder/SKILL.md +26 -0
- package/seeds/chief-of-staff/skills/capability-inventory/skills/capability-inventory/SKILL.md +21 -0
- package/seeds/chief-of-staff/skills/credential-setup/skills/credential-setup/SKILL.md +23 -0
- package/seeds/chief-of-staff/skills/onboarding/skills/onboarding/SKILL.md +26 -0
- package/pkg/setup/install-prereqs.sh +0 -80
package/pkg/mcp/contacts.min.js
CHANGED
|
@@ -45,7 +45,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
45
45
|
|
|
46
46
|
`);return{content:[{type:"text",text:`Found ${i.length} contact(s):
|
|
47
47
|
|
|
48
|
-
${n}`}]}}catch(i){return{content:[{type:"text",text:i.message}],isError:!0}}});Qe.registerTool("contacts_get",{title:"Get Contact by ID",description:"Retrieve a specific contact by its MongoDB ObjectId.",inputSchema:{id:j.string().describe("Contact ID (MongoDB ObjectId)")}},async({id:e})=>{try{await Dt();let r=await K.findOne({_id:new _u(e)});return r?{content:[{type:"text",text:fd(r)}]}:{content:[{type:"text",text:`No contact found with ID ${e}`}]}}catch(r){return{content:[{type:"text",text:r.message}],isError:!0}}});Qe.registerTool("contacts_create",{title:"Create Contact",description:"Create a new contact in the contacts database.",inputSchema:{firstName:j.string().optional().describe("First name"),lastName:j.string().optional().describe("Last name"),email:j.string().optional().describe("Email address"),phone:j.string().optional().describe("Phone number (any format \u2014 will be normalized)"),company:j.string().optional().describe("Company name"),role:j.string().optional().describe("Job title or role"),tags:j.array(j.string()).optional().describe("Tags (e.g. homeowner, contractor, designer)"),notes:j.string().optional().describe("Free-text notes about this contact")}},async({firstName:e,lastName:r,email:i,phone:o,company:t,role:n,tags:a,notes:c})=>{try{await Dt();let l=[e,r].filter(Boolean).join(" ")||i?.split("@")[0]||"Unknown",u=[];if(o){let g=yu(o);g.length===10&&u.push({number:xu(g),formatted:pd(g),label:"Primary"})}let d={name:l,firstName:e||"",lastName:r||"",email:i?.toLowerCase()||null,phones:u,company:t||void 0,role:n||void 0,tags:a||[],notes:c||void 0,source:"manual",createdAt:new Date,updatedAt:new Date},p=await K.insertOne(d);return{content:[{type:"text",text:`Contact created: ${l} (ID: ${p.insertedId})`}]}}catch(l){return{content:[{type:"text",text:l.message}],isError:!0}}});Qe.registerTool("contacts_update",{title:"Update Contact",description:"Update an existing contact's details.",inputSchema:{id:j.string().describe("Contact ID (MongoDB ObjectId)"),firstName:j.string().optional().describe("First name"),lastName:j.string().optional().describe("Last name"),email:j.string().optional().describe("Email address"),phone:j.string().optional().describe("Phone number to add (any format)"),company:j.string().optional().describe("Company name"),role:j.string().optional().describe("Job title or role"),tags:j.array(j.string()).optional().describe("Tags to set (replaces existing)"),notes:j.string().optional().describe("Notes (replaces existing)")}},async({id:e,firstName:r,lastName:i,email:o,phone:t,company:n,role:a,tags:c,notes:l})=>{try{await Dt();let u={updatedAt:new Date};if(r!==void 0&&(u.firstName=r),i!==void 0&&(u.lastName=i),o!==void 0&&(u.email=o.toLowerCase()),n!==void 0&&(u.company=n),a!==void 0&&(u.role=a),c!==void 0&&(u.tags=c),l!==void 0&&(u.notes=l),r!==void 0||i!==void 0){let g=await K.findOne({_id:new _u(e)});g&&(u.name=[r??g.firstName,i??g.lastName].filter(Boolean).join(" "))}let d={$set:u};if(t){let g=yu(t);if(g.length===10){let _={number:xu(g),formatted:pd(g),label:"Primary"};d.$addToSet={phones:_}}}return(await K.updateOne({_id:new _u(e)},d)).matchedCount===0?{content:[{type:"text",text:`No contact found with ID ${e}`}]}:{content:[{type:"text",text:`Contact ${e} updated`}]}}catch(u){return{content:[{type:"text",text:u.message}],isError:!0}}});Qe.registerTool("contacts_list",{title:"List Contacts",description:"List contacts, optionally filtered by tag or source.",inputSchema:{tag:j.string().optional().describe("Filter by tag (e.g. homeowner, contractor)"),source:j.string().optional().describe("Filter by source (
|
|
48
|
+
${n}`}]}}catch(i){return{content:[{type:"text",text:i.message}],isError:!0}}});Qe.registerTool("contacts_get",{title:"Get Contact by ID",description:"Retrieve a specific contact by its MongoDB ObjectId.",inputSchema:{id:j.string().describe("Contact ID (MongoDB ObjectId)")}},async({id:e})=>{try{await Dt();let r=await K.findOne({_id:new _u(e)});return r?{content:[{type:"text",text:fd(r)}]}:{content:[{type:"text",text:`No contact found with ID ${e}`}]}}catch(r){return{content:[{type:"text",text:r.message}],isError:!0}}});Qe.registerTool("contacts_create",{title:"Create Contact",description:"Create a new contact in the contacts database.",inputSchema:{firstName:j.string().optional().describe("First name"),lastName:j.string().optional().describe("Last name"),email:j.string().optional().describe("Email address"),phone:j.string().optional().describe("Phone number (any format \u2014 will be normalized)"),company:j.string().optional().describe("Company name"),role:j.string().optional().describe("Job title or role"),tags:j.array(j.string()).optional().describe("Tags (e.g. homeowner, contractor, designer)"),notes:j.string().optional().describe("Free-text notes about this contact")}},async({firstName:e,lastName:r,email:i,phone:o,company:t,role:n,tags:a,notes:c})=>{try{await Dt();let l=[e,r].filter(Boolean).join(" ")||i?.split("@")[0]||"Unknown",u=[];if(o){let g=yu(o);g.length===10&&u.push({number:xu(g),formatted:pd(g),label:"Primary"})}let d={name:l,firstName:e||"",lastName:r||"",email:i?.toLowerCase()||null,phones:u,company:t||void 0,role:n||void 0,tags:a||[],notes:c||void 0,source:"manual",createdAt:new Date,updatedAt:new Date},p=await K.insertOne(d);return{content:[{type:"text",text:`Contact created: ${l} (ID: ${p.insertedId})`}]}}catch(l){return{content:[{type:"text",text:l.message}],isError:!0}}});Qe.registerTool("contacts_update",{title:"Update Contact",description:"Update an existing contact's details.",inputSchema:{id:j.string().describe("Contact ID (MongoDB ObjectId)"),firstName:j.string().optional().describe("First name"),lastName:j.string().optional().describe("Last name"),email:j.string().optional().describe("Email address"),phone:j.string().optional().describe("Phone number to add (any format)"),company:j.string().optional().describe("Company name"),role:j.string().optional().describe("Job title or role"),tags:j.array(j.string()).optional().describe("Tags to set (replaces existing)"),notes:j.string().optional().describe("Notes (replaces existing)")}},async({id:e,firstName:r,lastName:i,email:o,phone:t,company:n,role:a,tags:c,notes:l})=>{try{await Dt();let u={updatedAt:new Date};if(r!==void 0&&(u.firstName=r),i!==void 0&&(u.lastName=i),o!==void 0&&(u.email=o.toLowerCase()),n!==void 0&&(u.company=n),a!==void 0&&(u.role=a),c!==void 0&&(u.tags=c),l!==void 0&&(u.notes=l),r!==void 0||i!==void 0){let g=await K.findOne({_id:new _u(e)});g&&(u.name=[r??g.firstName,i??g.lastName].filter(Boolean).join(" "))}let d={$set:u};if(t){let g=yu(t);if(g.length===10){let _={number:xu(g),formatted:pd(g),label:"Primary"};d.$addToSet={phones:_}}}return(await K.updateOne({_id:new _u(e)},d)).matchedCount===0?{content:[{type:"text",text:`No contact found with ID ${e}`}]}:{content:[{type:"text",text:`Contact ${e} updated`}]}}catch(u){return{content:[{type:"text",text:u.message}],isError:!0}}});Qe.registerTool("contacts_list",{title:"List Contacts",description:"List contacts, optionally filtered by tag or source.",inputSchema:{tag:j.string().optional().describe("Filter by tag (e.g. homeowner, contractor)"),source:j.string().optional().describe("Filter by source system (e.g. crm, sms, email, manual)"),limit:j.number().optional().default(25).describe("Max results (default 25)")}},async({tag:e,source:r,limit:i})=>{try{await Dt();let o={};e&&(o.tags=e),r&&(o.source=r);let t=await K.find(o).sort({name:1}).limit(i).toArray();if(t.length===0)return{content:[{type:"text",text:"No contacts found"}]};let n=await K.countDocuments(o),a=t.map(c=>{let l=c.phones[0]?.formatted||"";return`- ${c.name}${l?` (${l})`:""}${c.email?` <${c.email}>`:""} [${c.tags.join(", ")}]`});return{content:[{type:"text",text:`${n} contacts${e?` tagged "${e}"`:""}${r?` from ${r}`:""}:
|
|
49
49
|
|
|
50
50
|
${a.join(`
|
|
51
51
|
`)}`}]}}catch(o){return{content:[{type:"text",text:o.message}],isError:!0}}});var md=!1;async function Dt(){md||(await df(),md=!0)}var mf=new cf;await Qe.connect(mf);
|