appoiint 2.0.1 → 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/dist/commands/auth.js +1 -1
- package/dist/mcp-tools.js +1 -1
- package/dist/mcp.js +1 -1
- package/dist/meetingSession.js +1 -0
- package/package.json +4 -1
package/dist/commands/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const{saveConfig:saveConfig,clearConfig:clearConfig,getFlag:getFlag}=require("../config"),{api:api}=require("../api"),fmt=require("../format");async function signup(e,o){const
|
|
1
|
+
const{saveConfig:saveConfig,clearConfig:clearConfig,getFlag:getFlag}=require("../config"),{api:api}=require("../api"),fmt=require("../format");async function signup(e,o){const a=getFlag(e,"email")||getFlag(e,"e"),t=getFlag(e,"password")||getFlag(e,"p"),n=getFlag(e,"agent")||getFlag(e,"a")||"CLI Agent",i=getFlag(e,"type")||getFlag(e,"t")||"cli";a&&t||(fmt.err("Usage: apo signup --email you@co.com --password YourPass123!"),process.exit(1));try{const e=api({baseUrl:o,apiKey:""}),s=await e.signup({email:a,password:t,agentName:n,agentType:i,firstName:n,lastName:"Agent"}),g=s.data||s,l=g.apiKey||g.token;let r=g.userId||g.user?.id||g.user?._id;if(!r&&l&&l.includes("."))try{const e=JSON.parse(Buffer.from(l.split(".")[1],"base64").toString());r=e.userId||e.sub||null}catch{}const c=saveConfig({apiKey:l,userId:r,baseUrl:o,email:a},!0);fmt.ok(`Signed up: ${a}`),r&&console.log(` userId: ${r}`),l&&console.log(` apiKey: ${l.slice(0,20)}...`),console.log(` config: ${c}`),s.paymentRequired&&s.paymentUrl?(console.log(""),fmt.info("$1 verification required to activate your API key."),fmt.info(`Payment URL: ${s.paymentUrl}`),fmt.info("Open this URL in a browser to complete payment."),fmt.info("Your agent can use the API after payment is confirmed.")):(console.log(""),fmt.info('Run `apo room "My Meeting"` to create your first room.'))}catch(e){fmt.err(`Signup failed: ${e.message}`),process.exit(1)}}function login(e){const o=getFlag(e,"key")||getFlag(e,"k"),a=getFlag(e,"user")||getFlag(e,"u"),t=e.includes("--local");o||(fmt.err("Usage: apo login --key YOUR_API_KEY [--user YOUR_USER_ID] [--local]"),process.exit(1));const n=saveConfig({apiKey:o,userId:a||null},t);fmt.ok(`API key saved to ${n}`)}function logout(e){clearConfig(!0),clearConfig(!1),fmt.ok("Logged out. Config cleared.")}function showConfig(e){console.log(` source: ${e.source}`),console.log(" apiKey: "+(e.apiKey?e.apiKey.slice(0,20)+"...":"(none)")),console.log(` userId: ${e.userId||"(none)"}`),console.log(` baseUrl: ${e.baseUrl}`)}module.exports={signup:signup,login:login,logout:logout,showConfig:showConfig};
|
package/dist/mcp-tools.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const TOOLS=[{name:"appoiint_status",description:"Get Appoiint platform status and version.",inputSchema:{type:"object",properties:{}},handler:async e=>e.status(),readOnly:!0},{name:"appoiint_create_room",description:"Create a video meeting room. Returns roomId and join URL.",inputSchema:{type:"object",properties:{title:{type:"string",description:'Meeting title (e.g. "Team Standup")'}},required:["title"]},handler:async(e,t)=>{const
|
|
1
|
+
const TOOLS=[{name:"appoiint_status",description:"Get Appoiint platform status and version.",inputSchema:{type:"object",properties:{}},handler:async e=>e.status(),readOnly:!0},{name:"appoiint_create_room",description:"Create a video meeting room. Returns roomId and join URL.",inputSchema:{type:"object",properties:{title:{type:"string",description:'Meeting title (e.g. "Team Standup")'}},required:["title"]},handler:async(e,t)=>{const n=require("./config").loadConfig([]);return e.createRoom({title:t.title,hostId:n.userId})},readOnly:!1},{name:"appoiint_list_rooms",description:"List active meeting rooms.",inputSchema:{type:"object",properties:{}},handler:async e=>e.listRooms(),readOnly:!0},{name:"appoiint_room_status",description:"Get room status and participants.",inputSchema:{type:"object",properties:{roomId:{type:"string",description:"Room ID"}},required:["roomId"]},handler:async(e,t)=>e.roomStatus(t.roomId),readOnly:!0},{name:"appoiint_end_room",description:"End a meeting room.",inputSchema:{type:"object",properties:{roomId:{type:"string",description:"Room ID"}},required:["roomId"]},handler:async(e,t)=>e.endRoom(t.roomId),readOnly:!1},{name:"appoiint_invite",description:"Invite a human or agent to a meeting room.",inputSchema:{type:"object",properties:{roomId:{type:"string",description:"Room ID"},email:{type:"string",description:"Invitee email"},name:{type:"string",description:"Invitee name"},type:{type:"string",description:"human or agent (default: human)"}},required:["roomId","email"]},handler:async(e,t)=>e.invite(t.roomId,{email:t.email,name:t.name||"Guest",type:t.type||"human"}),readOnly:!1},{name:"appoiint_transcript",description:"Get meeting transcript.",inputSchema:{type:"object",properties:{roomId:{type:"string",description:"Room ID"},format:{type:"string",description:"json, text, or srt (default: json)"}},required:["roomId"]},handler:async(e,t)=>e.transcript(t.roomId,t.format||"json"),readOnly:!0},{name:"appoiint_join_meeting",description:"Join a meeting room as an AI agent. Creates persistent Socket.IO connection. You will hear transcripts and can send chat messages. Call appoiint_get_transcripts to read what was said, appoiint_send_chat to respond.",inputSchema:{type:"object",properties:{roomId:{type:"string",description:"Room ID to join"},agentName:{type:"string",description:"Your display name in the meeting (default: Claude Code)"},agentRole:{type:"string",description:"Your role badge (default: assistant)"}},required:["roomId"]},handler:async(e,t,n)=>{const{MeetingSession:i}=require("./meetingSession"),o=new i({baseUrl:n.config.baseUrl,roomId:t.roomId,agentName:t.agentName||"Claude Code",agentRole:t.agentRole||"assistant"}),r=await o.join();return n.meetingSessions.set(t.roomId,o),r},readOnly:!1},{name:"appoiint_get_transcripts",description:"Get speech transcripts from the meeting. Returns what participants have said since last read. Buffer is cleared after reading.",inputSchema:{type:"object",properties:{roomId:{type:"string",description:"Room ID"}},required:["roomId"]},handler:async(e,t,n)=>{const i=n.meetingSessions.get(t.roomId);if(!i)return{error:"Not in this meeting. Call appoiint_join_meeting first."};const o=i.getTranscripts();return{roomId:t.roomId,count:o.length,transcripts:o}},readOnly:!0},{name:"appoiint_send_chat",description:"Send a chat message to all meeting participants. Your message appears in the AI chat panel with your role badge.",inputSchema:{type:"object",properties:{roomId:{type:"string",description:"Room ID"},message:{type:"string",description:"Message to send to meeting participants"}},required:["roomId","message"]},handler:async(e,t,n)=>{const i=n.meetingSessions.get(t.roomId);return i?i.sendChat(t.message):{error:"Not in this meeting. Call appoiint_join_meeting first."}},readOnly:!1},{name:"appoiint_meeting_status",description:"Check meeting connection status: connected, peer count, buffered transcript count.",inputSchema:{type:"object",properties:{roomId:{type:"string",description:"Room ID"}},required:["roomId"]},handler:async(e,t,n)=>{const i=n.meetingSessions.get(t.roomId);return i?i.status():{error:"Not in this meeting.",connected:!1}},readOnly:!0},{name:"appoiint_leave_meeting",description:"Leave a meeting room and disconnect.",inputSchema:{type:"object",properties:{roomId:{type:"string",description:"Room ID"}},required:["roomId"]},handler:async(e,t,n)=>{const i=n.meetingSessions.get(t.roomId);if(!i)return{error:"Not in this meeting."};const o=i.leave();return n.meetingSessions.delete(t.roomId),o},readOnly:!1},{name:"appoiint_list_events",description:"List bookable event types.",inputSchema:{type:"object",properties:{}},handler:async e=>e.events(),readOnly:!0},{name:"appoiint_check_availability",description:"Check available time slots for a host on a given date.",inputSchema:{type:"object",properties:{email:{type:"string",description:"Host email address"},date:{type:"string",description:"Date (YYYY-MM-DD)"},timezone:{type:"string",description:"Timezone (default: UTC)"}},required:["email","date"]},handler:async(e,t)=>e.slots(t.email,t.date,t.timezone||"UTC"),readOnly:!0},{name:"appoiint_create_booking",description:"Create a booking on behalf of a customer.",inputSchema:{type:"object",properties:{eventTypeId:{type:"string",description:"Event type ID"},scheduledAt:{type:"string",description:"ISO 8601 date-time (e.g. 2026-06-15T14:00:00Z)"},duration:{type:"number",description:"Duration in minutes (default: 30)"},customerName:{type:"string",description:"Customer name"},customerEmail:{type:"string",description:"Customer email"}},required:["scheduledAt","customerEmail"]},handler:async(e,t)=>e.book({eventTypeId:t.eventTypeId,scheduledAt:t.scheduledAt,duration:t.duration||30,customer:{name:t.customerName||"Guest",email:t.customerEmail},location:{type:"video"}}),readOnly:!1},{name:"appoiint_tts",description:"Synthesize text-to-speech with CxO agent voice.",inputSchema:{type:"object",properties:{text:{type:"string",description:"Text to synthesize"},voice:{type:"string",description:"Voice: cfo, cto, cmo, cco, cso, clo, heart, michael, nova, echo (default: heart)"}},required:["text"]},handler:async(e,t)=>e.synthesize({text:t.text,voice:t.voice||"heart",agentRole:t.voice}),readOnly:!0},{name:"appoiint_voices",description:"List available TTS voices and CxO agent voice mappings.",inputSchema:{type:"object",properties:{}},handler:async e=>e.voices(),readOnly:!0},{name:"appoiint_admin_tenants",description:"List all tenants with plan, status, usage. Superadmin only.",inputSchema:{type:"object",properties:{}},handler:async e=>e.adminTenants(),readOnly:!0},{name:"appoiint_admin_tenant_view",description:"Full tenant detail: plan, stats, usage, created date.",inputSchema:{type:"object",properties:{slug:{type:"string",description:"Tenant slug"}},required:["slug"]},handler:async(e,t)=>e.adminTenantView(t.slug),readOnly:!0},{name:"appoiint_platform_stats",description:"Platform overview: tenants, users, rooms, bookings, meetings.",inputSchema:{type:"object",properties:{}},handler:async e=>e.platformStats(),readOnly:!0},{name:"appoiint_funnel",description:"Signup funnel with conversion rates.",inputSchema:{type:"object",properties:{}},handler:async e=>e.funnel(),readOnly:!0},{name:"appoiint_revenue",description:"Revenue breakdown: MRR, ARR, fees, payouts.",inputSchema:{type:"object",properties:{}},handler:async e=>e.revenue(),readOnly:!0},{name:"appoiint_audit",description:"Activity audit trail.",inputSchema:{type:"object",properties:{limit:{type:"number",description:"Max entries"},action:{type:"string",description:"Filter by action type"}}},handler:async(e,t)=>{const n=new URLSearchParams;return t.limit&&n.set("limit",t.limit),t.action&&n.set("action",t.action),e.audit(n.toString())},readOnly:!0}];module.exports={TOOLS:TOOLS};
|
package/dist/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const{loadConfig:loadConfig}=require("./config"),{api:api}=require("./api"),{TOOLS:TOOLS}=require("./mcp-tools"),SERVER_INFO={name:"appoiint",version:require("../package.json").version};let pendingCalls=0,stdinEnded=!1;function serve(){const e=loadConfig([]);e.apiKey||(process.stderr.write("[appoiint-mcp] No API key found. Run: apo signup --email you@co.com --password Pass123!\n"),process.exit(1));const n=api(e);let
|
|
1
|
+
const{loadConfig:loadConfig}=require("./config"),{api:api}=require("./api"),{TOOLS:TOOLS}=require("./mcp-tools"),SERVER_INFO={name:"appoiint",version:require("../package.json").version},meetingSessions=new Map;let pendingCalls=0,stdinEnded=!1;function serve(){const e=loadConfig([]);e.apiKey||(process.stderr.write("[appoiint-mcp] No API key found. Run: apo signup --email you@co.com --password Pass123!\n"),process.exit(1));const n=api(e);let s="";process.stdin.setEncoding("utf8"),process.stdin.on("data",t=>{let o;for(s+=t;-1!==(o=s.indexOf("\n"));){const t=s.slice(0,o).trim();s=s.slice(o+1),t&&dispatch(n,e,t)}}),process.stdin.on("end",()=>{stdinEnded=!0;for(const e of meetingSessions.values())try{e.leave()}catch{}meetingSessions.clear(),maybeExit()}),process.stderr.write(`[appoiint-mcp] Server started (${e.baseUrl})\n`)}function maybeExit(){stdinEnded&&0===pendingCalls&&process.exit(0)}function dispatch(e,n,s){let t;try{t=JSON.parse(s)}catch{return void respond(null,null,{code:-32700,message:"Parse error"})}const{id:o,method:i,params:r}=t;if(null!=o)switch(i){case"initialize":respond(o,{protocolVersion:"2024-11-05",capabilities:{tools:{}},serverInfo:SERVER_INFO});break;case"tools/list":respond(o,{tools:TOOLS.map(e=>({name:e.name,description:e.description,inputSchema:e.inputSchema,annotations:{readOnlyHint:e.readOnly,destructiveHint:!e.readOnly,openWorldHint:!0}}))});break;case"tools/call":pendingCalls++,callTool(e,n,o,r).finally(()=>{pendingCalls--,maybeExit()});break;default:respond(o,null,{code:-32601,message:`Method not found: ${i}`})}}async function callTool(e,n,s,t){const o=t?.name,i=t?.arguments||{},r=TOOLS.find(e=>e.name===o);if(r)try{const t=await r.handler(e,i,{config:n,meetingSessions:meetingSessions});respond(s,{content:[{type:"text",text:"string"==typeof t?t:JSON.stringify(t,null,2)}]})}catch(e){respond(s,{content:[{type:"text",text:`Error: ${e.message}`}],isError:!0})}else respond(s,{content:[{type:"text",text:`Unknown tool: ${o}`}],isError:!0})}function respond(e,n,s){const t={jsonrpc:"2.0",id:e};s?t.error=s:t.result=n,process.stdout.write(JSON.stringify(t)+"\n")}module.exports={serve:serve};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let io;try{io=require("socket.io-client")}catch{io=null}class MeetingSession{constructor(e){this.baseUrl=e.baseUrl,this.roomId=e.roomId,this.agentName=e.agentName||"Claude Code",this.agentRole=e.agentRole||"assistant",this.agentId=e.agentId||`claude-${Date.now()}`,this.socket=null,this.connected=!1,this.transcriptBuffer=[],this.chatBuffer=[],this.peers=[]}async join(){if(!io)throw new Error("socket.io-client not installed. Run: npm install -g appoiint");return new Promise((e,t)=>{this.socket=io(this.baseUrl,{transports:["websocket"],reconnection:!0,reconnectionDelay:2e3,reconnectionAttempts:5}),this.socket.on("connect",()=>{this.socket.emit("join",{channel:this.roomId,peer_name:this.agentName,peer_uuid:this.agentId,peer_type:"agent",peer_agent_id:this.agentId,peer_agent_role:this.agentRole,peer_video:!1,peer_audio:!1,peer_video_status:!1,peer_audio_status:!1,peer_screen_status:!1,peer_hand_status:!1,peer_rec_status:!1,peer_privacy_status:!1,peer_info:{osName:"Node.js",osVersion:process.version,browserName:"appoiint-mcp",browserVersion:require("../package.json").version}})}),this.socket.on("addPeer",t=>{this.connected||(this.connected=!0,this.peers=t.peers?Object.values(t.peers).map(e=>({name:e.peer_name,type:e.peer_type||"human",role:e.peer_agent_role||null})):[],e({roomId:this.roomId,connected:!0,peers:this.peers,peerCount:this.peers.length}))}),this.socket.on("connect",()=>{setTimeout(()=>{this.connected||(this.connected=!0,e({roomId:this.roomId,connected:!0,peers:[],peerCount:0,note:"Joined empty room. Waiting for other participants."}))},2e3)}),this.socket.on("transcript",e=>{this.transcriptBuffer.push({speaker:e.peer_name,text:e.text,timestamp:e.timestamp||Date.now()})}),this.socket.on("agentChat",e=>{this.chatBuffer.push({from:e.peer_name,role:e.peer_agent_role,message:e.msg,timestamp:e.timestamp||Date.now()})}),this.socket.on("removePeer",()=>{}),this.socket.on("disconnect",e=>{this.connected=!1}),this.socket.on("connect_error",e=>{t(new Error(`Connection failed: ${e.message}`))}),setTimeout(()=>{this.connected||(this.socket.disconnect(),t(new Error("Meeting join timeout (10s)")))},1e4)})}getTranscripts(e=!0){const t=[...this.transcriptBuffer];return e&&(this.transcriptBuffer=[]),t}getChats(e=!0){const t=[...this.chatBuffer];return e&&(this.chatBuffer=[]),t}sendChat(e){if(!this.socket||!this.connected)throw new Error("Not connected to meeting");return this.socket.emit("agentChat",{peer_name:this.agentName,peer_agent_role:this.agentRole,msg:e}),{sent:!0,roomId:this.roomId}}leave(){return this.socket&&(this.socket.disconnect(),this.socket=null,this.connected=!1),{roomId:this.roomId,left:!0}}status(){return{roomId:this.roomId,connected:this.connected,agentName:this.agentName,agentRole:this.agentRole,peerCount:this.peers.length,transcriptCount:this.transcriptBuffer.length,chatCount:this.chatBuffer.length}}}module.exports={MeetingSession:MeetingSession};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appoiint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Appoiint CLI — schedule meetings, create rooms, join video calls. Agent-first meeting platform.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"apo": "bin/cli.js"
|
|
@@ -42,6 +42,9 @@
|
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=18"
|
|
44
44
|
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"socket.io-client": "^4.8.0"
|
|
47
|
+
},
|
|
45
48
|
"devDependencies": {
|
|
46
49
|
"terser": "^5.44.1"
|
|
47
50
|
}
|