@jdr377/mapapp-agent-connector 0.0.0-stage → 0.1.0-pre.2
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 +240 -2
- package/bun.lock +339 -0
- package/dist/chunk-25pyst1y.js +19 -0
- package/dist/chunk-9d4kh0mm.js +3 -0
- package/dist/chunk-btwmey1h.js +3 -0
- package/dist/chunk-c74qq5ek.js +2 -0
- package/dist/chunk-e6y2yzbj.js +3 -0
- package/dist/chunk-er6bkfzk.js +2 -0
- package/dist/chunk-nmac0vha.js +17 -0
- package/dist/chunk-nygqde9t.js +3 -0
- package/dist/chunk-nyj9k76w.js +2 -0
- package/dist/chunk-wy5sgkmh.js +3 -0
- package/dist/participant-mcp-server.js +15 -0
- package/distribution.json +244 -0
- package/package.json +44 -4
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{createAgentWalletConnectionInspector,createParticipantHTTPWallet,exportWalletDataZip,inspectWalletDataZip,openAgentLocalIntentRepository,parseParticipantAuthority,participantMetadataSchema,restoreWalletDataZip}from"./chunk-nmac0vha.js";import"./chunk-e6y2yzbj.js";import"./chunk-wy5sgkmh.js";import"./chunk-9d4kh0mm.js";import"./chunk-btwmey1h.js";import{mkdir,open,readFile,rename,stat,copyFile}from"fs/promises";import{basename,join,resolve}from"path";import{constants}from"fs";import{createContext,computeBapId,resolveBapId}from"@1sat/actions";import{createNodeWallet}from"@1sat/wallet-node";import{PrivateKey}from"@bsv/sdk";var schema="mapapp-participant-setup/v1";class ParticipantSetupError extends Error{code;constructor(code){super(code);this.code=code}}function participantDeployment(value){try{const url=new URL(value);if(url.protocol!=="https:"||url.username||url.password||url.search||url.hash||url.pathname!=="/")throw new Error;return url.origin}catch{throw new ParticipantSetupError("setup_deployment_invalid")}}async function protectedWrite(filename,bytes,replace=false){const temporary=replace?`${filename}.${crypto.randomUUID()}.pending`:filename;const file=await open(temporary,"wx",384);try{await file.writeFile(bytes);await file.sync()}finally{await file.close()}if(replace)await rename(temporary,filename)}async function readParticipantSetup(directory){const path=join(resolve(directory),"setup.json");if((await stat(path)).size>4096)throw new ParticipantSetupError("setup_state_invalid");const value=JSON.parse(await readFile(path,"utf8"));if(value.schema!==schema||!["creating","restore_started","wallet_ready"].includes(value.phase)||!/^(02|03)[0-9a-f]{64}$/u.test(value.identityKey))throw new ParticipantSetupError("setup_state_invalid");return value}async function setupParticipantWallet(options){const directory=resolve(options.walletDirectory);const deployment=participantDeployment(options.deployment);let created=false;try{await mkdir(directory,{mode:448});created=true}catch(error){if(error.code!=="EEXIST")throw error}if(!created&&options.restore)throw new ParticipantSetupError("restore_requires_new_directory");if(created){const suppliedRoot=options.restore?(await boundedFile(options.restore.rootFile,128)).toString().trim():null;const key=suppliedRoot?PrivateKey.fromWif(suppliedRoot):PrivateKey.fromRandom();const meta2={chain:"main",identityKey:key.toPublicKey().toString(),storageIdentityKey:crypto.randomUUID(),servicesBaseUrl:`${deployment}/api/bitcoin/wallet-services`};const restoredAuthority=options.restore?parseParticipantAuthority(JSON.parse((await boundedFile(options.restore.authorityFile,4096)).toString())):null;if(options.restore){await inspectWalletDataZip(new Uint8Array(await boundedFile(options.restore.backupFile,512*1024*1024)),meta2);const operations=await boundedFile(options.restore.operationsFile,256*1024*1024);if(!operations.subarray(0,16).equals(Buffer.from("SQLite format 3\x00")))throw new ParticipantSetupError("restore_operations_invalid");if(await stat(options.restore.operationsFile+"-wal").then((info)=>info.size>0,()=>false))throw new ParticipantSetupError("restore_operations_not_checkpointed")}await protectedWrite(join(directory,"setup.json"),JSON.stringify({schema,phase:"creating",identityKey:meta2.identityKey,servicesBaseUrl:meta2.servicesBaseUrl}));await protectedWrite(join(directory,"wallet.json"),JSON.stringify(meta2));await protectedWrite(join(directory,"root.wif"),(suppliedRoot??key.toWif())+`
|
|
3
|
+
`);await protectedWrite(join(directory,"participant-authority.json"),JSON.stringify(restoredAuthority??{schema:"mapapp-participant-authority/v1",connectionId:`participant-${crypto.randomUUID()}`,callerId:`owner-${crypto.randomUUID()}`,originator:new URL(deployment).hostname,revision:"initial-denied",publishExactText:false,fullRootSpendingAuthorized:false}));if(options.restore)await copyFile(options.restore.operationsFile,join(directory,"agent-intents.sqlite"),constants.COPYFILE_EXCL)}const state=await readParticipantSetup(directory).catch(()=>{throw new ParticipantSetupError("setup_existing_directory_unrecognized")});if(state.servicesBaseUrl!==`${deployment}/api/bitcoin/wallet-services`)throw new ParticipantSetupError("setup_deployment_changed");if(state.phase==="restore_started")throw new ParticipantSetupError("restore_outcome_unknown");const meta=participantMetadataSchema.parse(JSON.parse((await boundedFile(join(directory,"wallet.json"),4096)).toString()));if(meta.identityKey!==state.identityKey||meta.servicesBaseUrl!==state.servicesBaseUrl)throw new ParticipantSetupError("setup_identity_changed");const root=PrivateKey.fromWif((await boundedFile(join(directory,"root.wif"),128)).toString().trim());if(root.toPublicKey().toString()!==meta.identityKey)throw new ParticipantSetupError("setup_identity_changed");const authority=parseParticipantAuthority(JSON.parse((await boundedFile(join(directory,"participant-authority.json"),4096)).toString()));const owned=openAgentLocalIntentRepository(join(directory,"agent-intents.sqlite"));let runtime;try{runtime=await createNodeWallet({privateKey:root,chain:"main",storageIdentityKey:meta.storageIdentityKey,storage:{provider:"bun-sqlite",filename:join(directory,"wallet.sqlite")},servicesBaseUrl:meta.servicesBaseUrl,skipInitialMonitor:true,backups:[],feeModel:{model:"sat/kb",value:100}});if((await runtime.wallet.getPublicKey({identityKey:true})).publicKey!==meta.identityKey||(await runtime.wallet.getNetwork({})).network!=="mainnet")throw new ParticipantSetupError("setup_wallet_binding_changed");if(options.restore){await protectedWrite(join(directory,"setup.json"),JSON.stringify({...state,phase:"restore_started"}),true);await restoreWalletDataZip(runtime.storage,new Uint8Array(await boundedFile(options.restore.backupFile,512*1024*1024)),meta,{assertTargetFresh:async()=>{if(!created)throw new ParticipantSetupError("restore_requires_new_directory")}})}const context=createContext(runtime.wallet,{services:runtime.services,dataDir:directory,chain:"main"});const bapId=await computeBapId(context),published=await resolveBapId(context);let recoveryArchive=state.recoveryArchive;if(state.phase==="wallet_ready"){if(!recoveryArchive||basename(recoveryArchive)!==recoveryArchive)throw new ParticipantSetupError("setup_recovery_archive_invalid");await inspectWalletDataZip(new Uint8Array(await boundedFile(join(directory,recoveryArchive),512*1024*1024)),meta)}if(state.phase!=="wallet_ready"){const archive=await exportWalletDataZip(runtime.storage,meta,{maxChunks:20});recoveryArchive=`wallet-data-setup-${crypto.randomUUID()}.zip`;await protectedWrite(join(directory,recoveryArchive),archive.bytes);await protectedWrite(join(directory,"setup.json"),JSON.stringify({...state,phase:"wallet_ready",recoveryArchive}),true)}return{schema,state:"wallet_ready",reused:!created,network:"mainnet",identityKey:meta.identityKey,bapId,identityPublication:published?"wallet_observed":"not_published",publicIdentityObservation:"not_checked",recovery:{rootFile:"root.wif",walletDataZip:recoveryArchive,operationStore:"agent-intents.sqlite"},authorityFile:"participant-authority.json",actionAuthority:created&&!options.restore?"denied_by_default":"retained_participant_policy",authorityRevision:authority.revision,next:published?"check_readiness":"authorize_sponsored_identity"}}finally{try{await runtime?.destroy()}finally{owned.close()}}}async function connectParticipantWallet(options){const directory=resolve(options.walletDirectory),deployment=participantDeployment(options.deployment);const originator=new URL(deployment).hostname;const authority={schema:"mapapp-participant-authority/v1",connectionId:`participant-${crypto.randomUUID()}`,callerId:`owner-${crypto.randomUUID()}`,originator,revision:"initial-denied",publishExactText:false,fullRootSpendingAuthorized:false,walletActionsAuthorized:false};const wallet=createParticipantHTTPWallet(options.walletEndpoint,originator);const inspector=createAgentWalletConnectionInspector({wallet,binding:{connectionId:authority.connectionId,callerId:authority.callerId,originator,expectedIdentityKey:options.identityKey,expectedNetwork:"mainnet",route:"existing_brc100",declaredAuthority:"provider"}});const observed=await inspector.inspect(authority.callerId);if(observed.state!=="ready")throw new ParticipantSetupError(`setup_provider_${observed.state}`);await mkdir(directory,{mode:448});await protectedWrite(join(directory,"wallet.json"),JSON.stringify({transport:"brc100_http",chain:"main",identityKey:options.identityKey,servicesBaseUrl:`${deployment}/api/bitcoin/wallet-services`,walletEndpoint:options.walletEndpoint}));await protectedWrite(join(directory,"participant-authority.json"),JSON.stringify(authority));const owned=openAgentLocalIntentRepository(join(directory,"agent-intents.sqlite"));owned.close();return{schema,state:"provider_bound",route:"existing_brc100",identityKey:options.identityKey,network:"mainnet",actionAuthority:"denied_by_default",backup:"provider_owned",authorityFile:"participant-authority.json",next:"check_readiness"}}async function boundedFile(filename,maximum){const info=await stat(filename);if(!info.isFile()||info.size<1||info.size>maximum)throw new ParticipantSetupError("setup_file_invalid");const bytes=await readFile(filename);if(bytes.length>maximum)throw new ParticipantSetupError("setup_file_invalid");return bytes}export{setupParticipantWallet,readParticipantSetup,participantDeployment,connectParticipantWallet,ParticipantSetupError};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{PARTICIPANT_AUTHORITY_EDIT_GUIDANCE,PARTICIPANT_AUTHORITY_EXAMPLE,PARTICIPANT_AUTHORITY_JSON_SCHEMA,PARTICIPANT_AUTHORITY_RESOURCE,SPONSORED_AUTHORITY_GRANTS,missingSponsoredActionGrants,participantActionAuthorized,participantAuthorityName,participantAuthoritySchema,participantProfileMatches,supportedParticipantBinding}from"./chunk-9d4kh0mm.js";import"./chunk-btwmey1h.js";export{supportedParticipantBinding,participantProfileMatches,participantAuthoritySchema,participantAuthorityName,participantActionAuthorized,missingSponsoredActionGrants,SPONSORED_AUTHORITY_GRANTS,PARTICIPANT_AUTHORITY_RESOURCE,PARTICIPANT_AUTHORITY_JSON_SCHEMA,PARTICIPANT_AUTHORITY_EXAMPLE,PARTICIPANT_AUTHORITY_EDIT_GUIDANCE};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{__require}from"./chunk-btwmey1h.js";var MEDIA_RELAY_SAFE_MAX_BYTES=99*1024;function readWebpDimensions(bytes){if(bytes.length<20||text4(bytes,0)!=="RIFF"||text4(bytes,8)!=="WEBP"||u32(bytes,4)+8!==bytes.length)return null;let offset=12;let extended=null;let image=null;while(offset<bytes.length){if(offset+8>bytes.length)return null;const kind=text4(bytes,offset);const length=u32(bytes,offset+4);const payload=offset+8;const end=payload+length;const paddedEnd=end+(length&1);if(end>bytes.length||paddedEnd>bytes.length)return null;if(!extended&&kind==="VP8X"){if(length!==10)return null;extended={width:1+u24(bytes,payload+4),height:1+u24(bytes,payload+7)}}else if(!image&&kind==="VP8 "){if(length<10||bytes[payload+3]!==157||bytes[payload+4]!==1||bytes[payload+5]!==42)return null;image={width:(bytes[payload+6]|bytes[payload+7]<<8)&16383,height:(bytes[payload+8]|bytes[payload+9]<<8)&16383}}else if(!image&&kind==="VP8L"){if(length<5||bytes[payload]!==47)return null;const bits=u32(bytes,payload+1);image={width:1+(bits&16383),height:1+(bits>>>14&16383)}}offset=paddedEnd}if(offset!==bytes.length||!image)return null;if(extended&&(extended.width!==image.width||extended.height!==image.height))return null;return extended??image}function text4(bytes,offset){return String.fromCharCode(...bytes.slice(offset,offset+4))}function u24(bytes,offset){return bytes[offset]|bytes[offset+1]<<8|bytes[offset+2]<<16}function u32(bytes,offset){return(bytes[offset]|bytes[offset+1]<<8|bytes[offset+2]<<16|bytes[offset+3]<<24)>>>0}var AGENT_MEDIA_MAX_BASE64_LENGTH=4*Math.ceil(MEDIA_RELAY_SAFE_MAX_BYTES/3);class AgentMediaError extends Error{code;constructor(code){super(code);this.code=code}}function fail(code){throw new AgentMediaError(code)}function validAgentMediaInput(value){if(!value||typeof value!=="object"||Array.isArray(value))return false;const media=value;return Object.keys(media).length===4&&Object.keys(media).every((key)=>["contentType","base64","byteSize","sha256"].includes(key))&&["image/webp","video/webm"].includes(media.contentType)&&typeof media.base64==="string"&&media.base64.length>0&&media.base64.length<=AGENT_MEDIA_MAX_BASE64_LENGTH&&media.base64.length%4===0&&/^[A-Za-z0-9+/]*={0,2}$/.test(media.base64)&&Number.isSafeInteger(media.byteSize)&&media.byteSize>0&&media.byteSize<=MEDIA_RELAY_SAFE_MAX_BYTES&&typeof media.sha256==="string"&&/^[0-9a-f]{64}$/.test(media.sha256)}async function inspectAgentMedia(value){if(!validAgentMediaInput(value))fail("invalid_media_input");const binary=atob(value.base64);if(btoa(binary)!==value.base64)fail("invalid_media_base64");const bytes=Uint8Array.from(binary,(character)=>character.charCodeAt(0));if(bytes.length!==value.byteSize)fail("media_size_mismatch");const hash=new Uint8Array(await crypto.subtle.digest("SHA-256",bytes.buffer));const sha256=Array.from(hash,(byte)=>byte.toString(16).padStart(2,"0")).join("");if(sha256!==value.sha256)fail("media_hash_mismatch");const dimensions=value.contentType==="image/webp"?await inspectImage(bytes):await inspectVideo(bytes);return{media:value.contentType==="image/webp"?{kind:"image",contentType:"image/webp",bytes}:{kind:"video",contentType:"video/webm",bytes},summary:{contentType:value.contentType,byteSize:bytes.length,sha256,...dimensions}}}async function inspectImage(bytes){const dimensions=readWebpDimensions(bytes);if(!dimensions)fail("invalid_media_container");if(dimensions.width<1||dimensions.height<1||dimensions.width>1024||dimensions.height>1024)fail("media_dimensions_too_large");try{const{default:decode}=await import("@jsquash/webp/decode.js");const decoded=await decode(Uint8Array.from(bytes).buffer);if(decoded.width!==dimensions.width||decoded.height!==dimensions.height)fail("invalid_media_container");return dimensions}catch{return fail("invalid_media_container")}}async function inspectVideo(bytes){const{Input,BufferSource,WEBM}=await import("mediabunny");const input=new Input({source:new BufferSource(bytes),formats:[WEBM]});let timeout;try{return await Promise.race([(async()=>{const[videos,audios,tracks]=await Promise.all([input.getVideoTracks(),input.getAudioTracks(),input.getTracks()]);if(videos.length!==1||audios.length>1||tracks.length!==videos.length+audios.length)fail("media_tracks_unsupported");const track=videos[0];const[codec,width,height,displayWidth,displayHeight,duration,stats]=await Promise.all([track.getCodec(),track.getCodedWidth(),track.getCodedHeight(),track.getDisplayWidth(),track.getDisplayHeight(),input.computeDuration(),track.computePacketStats(1)]);if(codec!=="vp8"&&codec!=="vp9")fail("media_codec_unsupported");if([width,height,displayWidth,displayHeight].some((size)=>!Number.isFinite(size)||size<1||size>512))fail("media_dimensions_too_large");if(!Number.isFinite(duration)||duration<=0||duration>30)fail("media_video_duration_invalid");if(stats.packetCount<1)fail("invalid_media_container");if(audios[0]&&!["opus","vorbis"].includes(await audios[0].getCodec()??""))fail("media_codec_unsupported");return{width,height,durationMs:Math.ceil(duration*1000)}})(),new Promise((_,reject)=>{timeout=setTimeout(()=>{input.dispose();reject(new AgentMediaError("media_inspection_timeout"))},5000)})])}catch(error){if(error instanceof AgentMediaError)throw error;return fail("invalid_media_container")}finally{clearTimeout(timeout);input.dispose()}}var MAPAPP_CATEGORY_TOKENS=["\uD83C\uDF31","\uD83D\uDCCD","\uD83E\uDDED","\uD83C\uDFA8","\uD83C\uDFB5","\uD83C\uDF7D\uFE0F","\u2615","\uD83D\uDED2","\uD83C\uDFC0","\uD83C\uDFAE","\uD83D\uDCF0","\uD83D\uDCAC","\uD83D\uDCF8","\uD83C\uDFAC","\uD83D\uDCBB","\uD83D\uDEE0\uFE0F","\uD83C\uDFE0","\uD83D\uDE97","\uD83C\uDF0A","\u26F0\uFE0F","\uD83C\uDF33","\uD83D\uDC3E","\uD83C\uDF93","\uD83C\uDFE5","\u26A0\uFE0F","\uD83C\uDF89","\uD83D\uDCBC","\uD83D\uDD2C","\u2708\uFE0F","\uD83E\uDDD8","\uD83E\uDE99","\u2764\uFE0F"];var DEFAULT_MAPAPP_CATEGORY=MAPAPP_CATEGORY_TOKENS[0];import{Hash,Utils}from"@bsv/sdk";var MESSAGING_IDENTITY_VERSION="mapapp-messaging-identity-v1";var MESSAGING_IDENTITY_MUTATION_VERSION="mapapp-messaging-identity-mutation-v1";var MAPAPP_MESSAGE_VERSION="mapapp-message-v1";var DEFAULT_MESSAGE_PLAINTEXT_MAX_BYTES=8*1024;var MAPAPP_MESSAGE_ID_MAX_BYTES=256;function serializeMessagingIdentityMutationV1(input){const mutation=assertMessagingIdentityMutationV1(input);return new TextEncoder().encode(JSON.stringify({version:mutation.version,operation:mutation.operation,bapId:mutation.bapId,walletIdentityKey:mutation.walletIdentityKey,messageBoxHost:mutation.messageBoxHost,deployment:mutation.deployment,canonicalOrigin:mutation.canonicalOrigin,network:mutation.network,expectedProfileOutpoint:mutation.expectedProfileOutpoint,expectedEvidenceHash:mutation.expectedEvidenceHash,acceptedSequence:mutation.acceptedSequence,projectionVersion:mutation.projectionVersion,clientOperationId:mutation.clientOperationId}))}function serializeMapAppMessageV1(input,maxPlaintextBytes=DEFAULT_MESSAGE_PLAINTEXT_MAX_BYTES){const message=assertMapAppMessageV1(input,maxPlaintextBytes);return JSON.stringify({version:message.version,messageId:message.messageId,senderIdentityKey:message.senderIdentityKey,recipientIdentityKey:message.recipientIdentityKey,conversationId:message.conversationId,sentAt:message.sentAt,text:message.text})}function conversationIdForIdentityKeys(first,second){assertCompressedIdentityKey(first,"first identity key");assertCompressedIdentityKey(second,"second identity key");if(first.toLowerCase()===second.toLowerCase())throw new TypeError("Self-messaging is not allowed.");const[left,right]=[first.toLowerCase(),second.toLowerCase()].sort();return Utils.toHex(Hash.sha256(Array.from(new TextEncoder().encode(`mapapp-messaging/conversation/v1\\0${left}\\0${right}`))))}function assertMapAppMessageV1(value,maxPlaintextBytes=DEFAULT_MESSAGE_PLAINTEXT_MAX_BYTES){const record=strictRecord(value,["version","messageId","senderIdentityKey","recipientIdentityKey","conversationId","sentAt","text"],"MapAppMessageV1");if(record.version!==MAPAPP_MESSAGE_VERSION)throw new TypeError("Unsupported MapApp message version.");const messageId=stringField(record,"messageId");if(messageId.trim()===""||new TextEncoder().encode(messageId).byteLength>MAPAPP_MESSAGE_ID_MAX_BYTES)throw new TypeError("messageId must be a bounded non-empty string.");assertCanonicalIsoTimestamp(stringField(record,"sentAt"),"sentAt");const senderIdentityKey=stringField(record,"senderIdentityKey");const recipientIdentityKey=stringField(record,"recipientIdentityKey");assertCompressedIdentityKey(senderIdentityKey,"sender identity key");assertCompressedIdentityKey(recipientIdentityKey,"recipient identity key");if(senderIdentityKey.toLowerCase()===recipientIdentityKey.toLowerCase())throw new TypeError("Self-messaging is not allowed.");const expectedConversationId=conversationIdForIdentityKeys(senderIdentityKey,recipientIdentityKey);if(stringField(record,"conversationId")!==expectedConversationId)throw new TypeError("Message conversation ID does not match its participants.");if(!Number.isSafeInteger(maxPlaintextBytes)||maxPlaintextBytes<=0)throw new TypeError("Plaintext maximum must be a positive safe integer.");const text=stringField(record,"text");if(text.trim()==="")throw new TypeError("Message text must not be blank.");if(new TextEncoder().encode(text).byteLength>maxPlaintextBytes)throw new RangeError("Message text exceeds the plaintext maximum.");return record}function assertMessagingIdentityMutationV1(value){const record=strictRecord(value,["version","operation","bapId","walletIdentityKey","messageBoxHost","deployment","canonicalOrigin","network","expectedProfileOutpoint","expectedEvidenceHash","acceptedSequence","projectionVersion","clientOperationId"],"MessagingIdentityMutationV1");if(record.version!==MESSAGING_IDENTITY_MUTATION_VERSION)throw new TypeError("Unsupported messaging identity mutation version.");if(record.operation!=="register"&&record.operation!=="rotate"&&record.operation!=="revoke")throw new TypeError("Unsupported messaging identity operation.");for(const key of["bapId","messageBoxHost","deployment","canonicalOrigin","clientOperationId"])assertNonEmptyString(record[key],key);assertCompressedIdentityKey(stringField(record,"walletIdentityKey"),"wallet identity key");if(record.network!=="mainnet"&&record.network!=="testnet")throw new TypeError("Unsupported messaging network.");assertProfileEvidenceGroup(record);assertHttpsUrl(stringField(record,"messageBoxHost"),"messageBoxHost");assertHttpsUrl(stringField(record,"canonicalOrigin"),"canonicalOrigin");return record}function assertMessagingIdentityV1(value){const record=strictRecord(value,["version","bapId","walletIdentityKey","messageBoxHost","deployment","canonicalOrigin","network","expectedProfileOutpoint","expectedEvidenceHash","acceptedSequence","projectionVersion"],"MessagingIdentityV1");if(record.version!==MESSAGING_IDENTITY_VERSION)throw new TypeError("Unsupported messaging identity version.");for(const key of["bapId","messageBoxHost","deployment","canonicalOrigin"])assertNonEmptyString(record[key],key);assertCompressedIdentityKey(stringField(record,"walletIdentityKey"),"wallet identity key");if(record.network!=="mainnet"&&record.network!=="testnet")throw new TypeError("Unsupported messaging network.");assertProfileEvidenceGroup(record);assertHttpsUrl(stringField(record,"messageBoxHost"),"messageBoxHost");assertHttpsUrl(stringField(record,"canonicalOrigin"),"canonicalOrigin");return record}function assertCompressedIdentityKey(value,field="identity key"){if(!/^(02|03)[0-9a-fA-F]{64}$/.test(value))throw new TypeError(`${field} must be a compressed public key.`)}function strictRecord(value,keys,name){if(!value||typeof value!=="object"||Array.isArray(value))throw new TypeError(`${name} must be an object.`);const record=value;if(Object.keys(record).length!==keys.length||keys.some((key)=>!(key in record)))throw new TypeError(`${name} has unsupported or missing fields.`);return record}function stringField(record,key){const value=record[key];if(typeof value!=="string")throw new TypeError(`${key} must be a string.`);return value}function numberField(record,key){const value=record[key];if(typeof value!=="number"||!Number.isSafeInteger(value))throw new TypeError(`${key} must be a non-negative safe integer.`);return value}function assertProfileEvidenceGroup(record){const fields=[record.expectedProfileOutpoint,record.expectedEvidenceHash,record.acceptedSequence,record.projectionVersion];if(fields.every((value)=>value===null))return;if(fields.some((value)=>value===null))throw new TypeError("Profile evidence must be entirely present or absent.");assertNonEmptyString(record.expectedProfileOutpoint,"expectedProfileOutpoint");assertNonEmptyString(record.expectedEvidenceHash,"expectedEvidenceHash");if(numberField(record,"acceptedSequence")<1)throw new TypeError("acceptedSequence must be positive.");if(numberField(record,"projectionVersion")<0)throw new TypeError("projectionVersion must be non-negative.")}function assertNonEmptyString(value,field){if(typeof value!=="string"||value.trim()==="")throw new TypeError(`${field} must be a non-empty string.`)}function assertHttpsUrl(value,field){try{const parsed=new URL(String(value));if(parsed.protocol!=="https:"||parsed.username||parsed.password||parsed.pathname!=="/"||parsed.search||parsed.hash)throw new Error}catch{throw new TypeError(`${field} must be an HTTPS origin without a path.`)}}function assertCanonicalIsoTimestamp(value,field="timestamp"){if(!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(value)||!Number.isFinite(Date.parse(value))||new Date(value).toISOString()!==value)throw new TypeError(`${field} must be a canonical ISO-8601 UTC timestamp.`)}
|
|
3
|
+
export{MEDIA_RELAY_SAFE_MAX_BYTES,AGENT_MEDIA_MAX_BASE64_LENGTH,AgentMediaError,validAgentMediaInput,inspectAgentMedia,MAPAPP_CATEGORY_TOKENS,MESSAGING_IDENTITY_MUTATION_VERSION,MAPAPP_MESSAGE_VERSION,DEFAULT_MESSAGE_PLAINTEXT_MAX_BYTES,MAPAPP_MESSAGE_ID_MAX_BYTES,serializeMessagingIdentityMutationV1,serializeMapAppMessageV1,conversationIdForIdentityKeys,assertMapAppMessageV1,assertMessagingIdentityV1,assertCompressedIdentityKey,assertCanonicalIsoTimestamp};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// @bun
|
|
3
|
+
import{__require}from"./chunk-btwmey1h.js";import{StdioServerTransport}from"@modelcontextprotocol/server/stdio";var usage=`Usage: mapapp-participant --wallet-dir <existing-protected-wallet> --authority <trusted-local-json> [--confirm-mainnet]
|
|
4
|
+
Setup: mapapp-participant setup --wallet-dir <new-protected-directory> --deployment <https-origin>
|
|
5
|
+
Restore: mapapp-participant restore --wallet-dir <new-protected-directory> --deployment <https-origin> --root-file <protected-wif-file> --backup-file <clean-wallet-zip> --authority-file <original-policy> --operations-file <closed-operation-db>
|
|
6
|
+
Connect: mapapp-participant connect --wallet-dir <new-connector-directory> --deployment <https-origin> --wallet-endpoint <trusted-provider-url> --identity-key <expected-public-key>
|
|
7
|
+
Policy schema: mapapp-participant --authority-schema (read-only; opens no wallet)
|
|
8
|
+
First setup/connect/restore: the final destination must not already exist, even empty. Keep the MCP host/client session open until awaited calls finish.
|
|
9
|
+
Participant stdio paid, sponsored, social and private messaging tools with separate trusted grants. No HTTP listener. Without --confirm-mainnet Bitcoin execution is blocked; private messaging requires its own authority. Direct fullRootSpendingAuthorized acknowledges process signing power; sponsored posts still cost the participant zero. Grants cannot expand user delegation. Read /developers?guide=agent-setup and mapapp://participant-authority/v1.
|
|
10
|
+
`;function readParticipantSetupCommand(args){if(!["setup","restore","connect"].includes(args[0]??""))return null;const fields={};const allowed=args[0]==="restore"?["--wallet-dir","--deployment","--root-file","--backup-file","--authority-file","--operations-file"]:args[0]==="connect"?["--wallet-dir","--deployment","--wallet-endpoint","--identity-key"]:["--wallet-dir","--deployment"];for(let i=1;i<args.length;i+=2){const key=args[i],value=args[i+1];if(!allowed.includes(key)||fields[key]||!value||value.startsWith("--"))throw new Error("participant_configuration_invalid");fields[key]=value}if(allowed.some((key)=>!fields[key]))throw new Error("participant_configuration_invalid");return{walletDirectory:fields["--wallet-dir"],deployment:fields["--deployment"],...args[0]==="connect"?{walletEndpoint:fields["--wallet-endpoint"],identityKey:fields["--identity-key"]}:{},...args[0]==="restore"?{restore:{rootFile:fields["--root-file"],backupFile:fields["--backup-file"],authorityFile:fields["--authority-file"],operationsFile:fields["--operations-file"]}}:{}}}function readParticipantMcpConfig(args){if(args.length===1&&["--help","-h"].includes(args[0]))return null;let walletDirectory;let authorityFile;let executeEnabled=false;const seen=new Set;for(let i=0;i<args.length;i++){const key=args[i];if(seen.has(key))throw new Error("participant_configuration_invalid");seen.add(key);if(key==="--confirm-mainnet"){executeEnabled=true;continue}const value=args[++i];if(!value||value.startsWith("--"))throw new Error("participant_configuration_invalid");if(key==="--wallet-dir")walletDirectory=value;else if(key==="--authority")authorityFile=value;else throw new Error("participant_configuration_invalid")}if(!walletDirectory||!authorityFile)throw new Error("participant_configuration_invalid");return{walletDirectory,authorityFile,executeEnabled}}if(import.meta.main){let diagnosticReported=false;for(const method of["log","info","warn","error","debug"])console[method]=()=>{if(!diagnosticReported){diagnosticReported=true;process.stderr.write(`Participant wallet diagnostic suppressed.
|
|
11
|
+
`)}};let runtime;let participant;let closing;const setupMode=["setup","restore","connect"].includes(process.argv[2]??"");const close=()=>closing??=(async()=>{try{await participant?.close()}finally{await runtime?.close()}})();try{const args=process.argv.slice(2);const schemaOnly=args.length===1&&args[0]==="--authority-schema";const setup=schemaOnly?null:readParticipantSetupCommand(args);const config=schemaOnly||setup?null:readParticipantMcpConfig(args);if(schemaOnly){const{PARTICIPANT_AUTHORITY_JSON_SCHEMA}=await import("./chunk-nyj9k76w.js");process.stdout.write(JSON.stringify(PARTICIPANT_AUTHORITY_JSON_SCHEMA,null,2)+`
|
|
12
|
+
`)}else if(setup){const{setupParticipantWallet,connectParticipantWallet}=await import("./chunk-nygqde9t.js");const outcome=setup.walletEndpoint&&setup.identityKey?await connectParticipantWallet({...setup,walletEndpoint:setup.walletEndpoint,identityKey:setup.identityKey}):await setupParticipantWallet(setup);process.stdout.write(JSON.stringify(outcome)+`
|
|
13
|
+
`)}else if(!config)process.stderr.write(usage);else{const[{openAgentParticipantRuntime},{createMapAppParticipantServer,PARTICIPANT_MCP_MAX_MESSAGE_BYTES}]=await Promise.all([import("./chunk-er6bkfzk.js"),import("./chunk-25pyst1y.js")]);runtime=await openAgentParticipantRuntime(config);participant=createMapAppParticipantServer({...runtime,executeEnabled:config.executeEnabled});const stop=()=>{close().then(()=>process.exit(0),()=>process.exit(1))};process.once("SIGINT",stop);process.once("SIGTERM",stop);process.stdin.once("end",stop);await participant.server.connect(new StdioServerTransport(process.stdin,process.stdout,{maxBufferSize:PARTICIPANT_MCP_MAX_MESSAGE_BYTES}))}}catch(error){if(setupMode){const code=typeof error==="object"&&error&&"code"in error&&typeof error.code==="string"&&/^(?:setup|restore)_[a-z_]{1,70}$/u.test(error.code)?error.code:"participant_setup_unavailable";process.stdout.write(JSON.stringify({state:"blocked",reason:code})+`
|
|
14
|
+
`)}process.stderr.write(`Participant MCP startup failed: check existing wallet, exclusive ownership and trusted authority configuration.
|
|
15
|
+
${usage}`);try{await close()}finally{process.exitCode=1}}}export{readParticipantSetupCommand,readParticipantMcpConfig};
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "mapapp-agent-connector-distribution/v1",
|
|
3
|
+
"name": "@jdr377/mapapp-agent-connector",
|
|
4
|
+
"version": "0.1.0-pre.2",
|
|
5
|
+
"runtime": {
|
|
6
|
+
"bun": "1.3.11",
|
|
7
|
+
"transport": "stdio",
|
|
8
|
+
"profiles": [
|
|
9
|
+
"direct_wallet_node",
|
|
10
|
+
"brc100_http"
|
|
11
|
+
],
|
|
12
|
+
"qualification": "controlled_participant_workflows"
|
|
13
|
+
},
|
|
14
|
+
"sourceInputs": [
|
|
15
|
+
{
|
|
16
|
+
"path": "scripts/agent/participant-mcp-server.ts",
|
|
17
|
+
"sha256": "f8b010f75185344ff6b2f57bc9d56d7a9e535bba0d194576ca53161182e056c5"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"path": "scripts/lib/agentLocalIntentRepository.ts",
|
|
21
|
+
"sha256": "4658662f5ea1f9d264f38e6a4022eff6ac318ee990277da10eca91261105b90d"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"path": "scripts/lib/agentMessagingRuntime.ts",
|
|
25
|
+
"sha256": "90f1be9e364d860da9f80ccafc6a073a3232f3b5b02b35a12ed7e06abb4f84b4"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"path": "scripts/lib/agentMessagingStorage.ts",
|
|
29
|
+
"sha256": "d655b628eae3a622f4fe318e6522debe8e951b24da585bf0202dc817d859fff5"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"path": "scripts/lib/agentParticipantHTTP.ts",
|
|
33
|
+
"sha256": "7e8f6f94fa07583ff94f68f8fd91514f6f01977ff1d78ef1e8b0df3311044258"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "scripts/lib/agentParticipantRuntime.ts",
|
|
37
|
+
"sha256": "1bf84c03910911ce904784c2c011ab0b31e631512151e8f25bbf55bb1f6afa66"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"path": "scripts/lib/agentParticipantSetup.ts",
|
|
41
|
+
"sha256": "82a3c71894f9d9caf9196d2b7ffbae55b1e5e8296a53980adb0b4d94419bc494"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"path": "server/agent/mcp/participant.ts",
|
|
45
|
+
"sha256": "fc884524b4cd384393af17dd7dfa1567f72f470fae4f6c200c1a35dca2d58e51"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "server/agent/onboarding.ts",
|
|
49
|
+
"sha256": "0983cd4ec946a161f408d85ca4ccfda5fa98401ae9351a0b07403e3c1dad67dd"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"path": "shared/categories.ts",
|
|
53
|
+
"sha256": "c9d7938d4f1ca5cd0240849a90a95b6703c291f26649c5f8a172be2450111e67"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"path": "shared/finalizedMedia.ts",
|
|
57
|
+
"sha256": "d87fa800e6b5dd30ed5a4700b33475d9ca87acc255894bce54b02b652a9eb9a6"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "shared/freeposting/u12.ts",
|
|
61
|
+
"sha256": "59975b05480a466e26e1c300f19b4910f4049f723b1a318e49a0ff47b6749ac0"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"path": "shared/mediaLimits.ts",
|
|
65
|
+
"sha256": "c970f6c4652f67fa7833abc4b5d135d2007d1096aa0218f82f683b2d0833c5e6"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"path": "shared/messaging.ts",
|
|
69
|
+
"sha256": "fc1a6cc92051e38376b384d147e4fb250c37bdf1821b30e4059a004291b45605"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "shared/messagingControl.ts",
|
|
73
|
+
"sha256": "34758e21c0804dc52edf1bbbf2a0f55fe4cf3cb52ca34c08ab274b253a8c930b"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"path": "shared/notificationControl.ts",
|
|
77
|
+
"sha256": "c064b94b277d8f0c9e0513747605dd5d07ca576549dbad2bb39c932f657cfa40"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"path": "shared/pushNotifications.ts",
|
|
81
|
+
"sha256": "d22798e6b02a3b7ba26cf7403de53c4c03d592bd6e229f4efadab92802d06635"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"path": "shared/webpDimensions.ts",
|
|
85
|
+
"sha256": "bd2a182339fcf569059e41e8fac830d179a685bd71980f3a1efadc0f81180679"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"path": "src/bitcoin/actionEvidence.ts",
|
|
89
|
+
"sha256": "79e545274adfc5d29554a01257f99b3eb7d4a2a66e0d13fa2723ed33a1161db3"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"path": "src/bitcoin/agentIdentity.ts",
|
|
93
|
+
"sha256": "ebdb68bcdade370ce317675d608393e7c5bafdbb148e17b976c353a8783bd42e"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"path": "src/bitcoin/agentMedia.ts",
|
|
97
|
+
"sha256": "35622de5a4e8719b7eeffd190471a7f7bd107ece4a0d8f790c257fb8c2ffb630"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"path": "src/bitcoin/agentMessaging.ts",
|
|
101
|
+
"sha256": "e09330caaac89bb35ed6a5c9668eec4688939752221d52b9d5f7ce063e5942ed"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"path": "src/bitcoin/agentPaidPost.ts",
|
|
105
|
+
"sha256": "a3ae7a4ae222c1ccd87101f9a3d010637b4c45b077b466a8afd3eca297eb8206"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"path": "src/bitcoin/agentParticipantPolicy.ts",
|
|
109
|
+
"sha256": "f7f52929d23b1122d6e59d5399a5a0e4b248b28584ecd472fb2d25a86eba1aa9"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"path": "src/bitcoin/agentSocialAction.ts",
|
|
113
|
+
"sha256": "a53b26a40e868b293961be4b7762080486399e2f6903b6027502d6b0b88a021d"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"path": "src/bitcoin/agentSponsoredPost.ts",
|
|
117
|
+
"sha256": "5c0cd51385699b4095af0bc1f65546715e9147b6ac90a34950fadc522ea8bb44"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"path": "src/bitcoin/agentWalletConnection.ts",
|
|
121
|
+
"sha256": "030095304a7950488b711df3f7a2b31c0472aeea812dd5e7fe86bee2e9e3407f"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"path": "src/bitcoin/localIntentStore.ts",
|
|
125
|
+
"sha256": "7947218dcd2bb30f0ff3fb3b77d925bc2fe894aa966013b1c2e972f14822a3c8"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"path": "src/bitcoin/messaging/coordinator.ts",
|
|
129
|
+
"sha256": "d1f5a0a6b152b0acf714f9006c92aed3b635dd94e6b3e9fa2853e1c09584af17"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"path": "src/bitcoin/messaging/directoryClient.ts",
|
|
133
|
+
"sha256": "37ccfab2c98aaa4b7014d38274c793bb7fe6b572de885d9bdebcdbb130a444ff"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"path": "src/bitcoin/messaging/durableHistory.ts",
|
|
137
|
+
"sha256": "a376c20d61f38b18d7a891cb983c92ec771c32c9fa8928330a3c36f99e045899"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"path": "src/bitcoin/messaging/historyCrypto.ts",
|
|
141
|
+
"sha256": "79a556f1af431a802559ea4247e16263687f175feee56f39e176293e7ea448c4"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"path": "src/bitcoin/messaging/historyStore.ts",
|
|
145
|
+
"sha256": "e73efe6df20438f069153835ee0e0b5f6f32611c8ebea92b4932a9d397635dd5"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"path": "src/bitcoin/messaging/historyTypes.ts",
|
|
149
|
+
"sha256": "6f67ea101fafb8586400a9075fc456f06aa8971193ed5002ad713df46361f778"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"path": "src/bitcoin/messaging/messageBoxTransport.ts",
|
|
153
|
+
"sha256": "622bcc3eeab150dfcdb77ce8bd4af20c9925962a00f3250db7c38dc6be717b9a"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"path": "src/bitcoin/messaging/messageHistoryReplica.ts",
|
|
157
|
+
"sha256": "242c6040e4aee4393c5c1f82b3ed8e4e5706c99dccf76d145e817da5de791bb7"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"path": "src/bitcoin/messaging/sessionCache.ts",
|
|
161
|
+
"sha256": "529823120d74b8d04b179e01f202098016c96e038eb8c5ef509eecab2b88e07a"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"path": "src/bitcoin/nativeManagedAction.ts",
|
|
165
|
+
"sha256": "d3d89f4776b25794c5f32cbcd5a624c1ec6426fc5fc81d98c325705d9263b441"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"path": "src/bitcoin/notifications/pushClient.ts",
|
|
169
|
+
"sha256": "66728954480e90115b345d5af1169d962f82db04430713c13f20759e286831cd"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"path": "src/bitcoin/notifications/recipientClient.ts",
|
|
173
|
+
"sha256": "41dfe7ac6295d4a3480c35e6fa91f54840809caba50133275d82a04766f1f25d"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"path": "src/bitcoin/paidRootPost.ts",
|
|
177
|
+
"sha256": "1c699365d46448470db42caefd4c152bb25d72ffa4dd886d82c434f40d70a10f"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"path": "src/bitcoin/socialV2.ts",
|
|
181
|
+
"sha256": "a7c503187f9176579949a4db11edd94094d86081ee374eb93e752a052a707250"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"path": "src/bitcoin/sponsorFlow.ts",
|
|
185
|
+
"sha256": "2eee19be1789bcaa1c8393d9ede1976ac9780c95c88a4796c5341239d4489270"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"path": "src/bitcoin/sponsoredV2.ts",
|
|
189
|
+
"sha256": "e73f9efb3c08aa0f0cce9725ac4447b1303a77c19720f47c3edea1c3090cbc09"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"path": "src/bitcoin/transactionIntake.ts",
|
|
193
|
+
"sha256": "fdb8c43af525cd469f2c513933556ce471fb39aefda02d081c19981ebd5d63ad"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"path": "src/bitcoin/walletDataZip.ts",
|
|
197
|
+
"sha256": "811d1f52359b6a42ed6f1acd1d9f04f52789b01282bdec9900f94297b879a09c"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"path": "src/bitcoin/walletPortability.ts",
|
|
201
|
+
"sha256": "b23ed77aedf9e38505fe7141be862b673b58de4621b82de40ce8775dc113c0ec"
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"files": {
|
|
205
|
+
"README.md": "82eadcaac404f9dcf5ba73b1cc46b441bc5b530291ced68437b2a17a549c9141",
|
|
206
|
+
"bun.lock": "b1a21c8c8b3b10524d02a3839da8a8373a6906a1b9390fc98cc052b90a22d187",
|
|
207
|
+
"dist/chunk-25pyst1y.js": "615d8eaccf47c6ce70a806e48fd0a9f2ad7159852f165230a2ea2c258543e638",
|
|
208
|
+
"dist/chunk-9d4kh0mm.js": "ab603dae9dfbf8bf3aeb7e76e9907da303908c3dfa9a4922aa800661df905a86",
|
|
209
|
+
"dist/chunk-btwmey1h.js": "4e3cec1f9adaea9464cd99ea40ea0b7a693d800040e59540856f6c2b8ff013ee",
|
|
210
|
+
"dist/chunk-c74qq5ek.js": "36c949a5d21a3a2ac2c0e7a1020ebc995f1b665194ea43e8e29244eb8e166257",
|
|
211
|
+
"dist/chunk-e6y2yzbj.js": "4be64909a0536718a794f3d7bd11c4b5af95097ca7295c05cde1394a80027b38",
|
|
212
|
+
"dist/chunk-er6bkfzk.js": "2035fa39afb5a017c2e5f7567c487f33ffcacb23401efacb7847c1658da8d30d",
|
|
213
|
+
"dist/chunk-nmac0vha.js": "57b72bdc10a99cb5a09e58fbd1cbee2fb8055cb1b2c1d0f778f6c76f0b50387d",
|
|
214
|
+
"dist/chunk-nygqde9t.js": "08b866f23257d84a91dc017e1ce5d2b5e5e3944916accef398fdbfa892bf3563",
|
|
215
|
+
"dist/chunk-nyj9k76w.js": "2b975779caa6b5c92b2f89cd158cff14672f2e0dc7a43f03aa8c16b6eb9e1f46",
|
|
216
|
+
"dist/chunk-wy5sgkmh.js": "686784d64796c99de62a4d062835fade63512d62b222be7a0732360f6e31bf4b",
|
|
217
|
+
"dist/participant-mcp-server.js": "7487ae5ff7800204f73dbdcf7234d6c05131b8857704014cc59a14b2449dae5a",
|
|
218
|
+
"package.json": "9490f387608dc22de092b13ae7b5829053ed40463807229ad3e88c7669f253cc"
|
|
219
|
+
},
|
|
220
|
+
"dependencies": {
|
|
221
|
+
"@1sat/actions": "0.0.224",
|
|
222
|
+
"@1sat/templates": "0.0.38",
|
|
223
|
+
"@1sat/types": "0.0.48",
|
|
224
|
+
"@1sat/wallet": "0.0.111",
|
|
225
|
+
"@1sat/wallet-node": "0.0.78",
|
|
226
|
+
"@bsv/auth": "0.1.0",
|
|
227
|
+
"@bsv/message-box-client": "2.5.1",
|
|
228
|
+
"@bsv/sdk": "2.7.1",
|
|
229
|
+
"@bsv/wallet-toolbox": "npm:@bopen-io/wallet-toolbox@2.6.2-brc153.5",
|
|
230
|
+
"@bsv/wallet-toolbox-client": "npm:@bopen-io/wallet-toolbox-client@2.6.2-brc153.5",
|
|
231
|
+
"@jdr377/message-box-store": "0.1.0-beta.0",
|
|
232
|
+
"@jsquash/webp": "1.5.0",
|
|
233
|
+
"@modelcontextprotocol/server": "2.3.1",
|
|
234
|
+
"mediabunny": "1.52.3",
|
|
235
|
+
"zod": "4.6.5"
|
|
236
|
+
},
|
|
237
|
+
"publication": "unpublished_review_artifact",
|
|
238
|
+
"publishCandidate": true,
|
|
239
|
+
"remainingReleaseGates": [
|
|
240
|
+
"final_qualification_of_this_artifact",
|
|
241
|
+
"authorized_publication",
|
|
242
|
+
"matching_public_instructions"
|
|
243
|
+
]
|
|
244
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jdr377/mapapp-agent-connector",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0-pre.2",
|
|
4
|
+
"description": "Participant-owned local stdio MapApp application connector",
|
|
5
|
+
"private": false,
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"engines": {
|
|
9
|
+
"bun": "1.3.11"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"mapapp-participant": "dist/participant-mcp-server.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"README.md",
|
|
17
|
+
"distribution.json",
|
|
18
|
+
"bun.lock"
|
|
19
|
+
],
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@1sat/actions": "0.0.224",
|
|
22
|
+
"@1sat/templates": "0.0.38",
|
|
23
|
+
"@1sat/types": "0.0.48",
|
|
24
|
+
"@1sat/wallet": "0.0.111",
|
|
25
|
+
"@1sat/wallet-node": "0.0.78",
|
|
26
|
+
"@bsv/auth": "0.1.0",
|
|
27
|
+
"@bsv/message-box-client": "2.5.1",
|
|
28
|
+
"@bsv/sdk": "2.7.1",
|
|
29
|
+
"@bsv/wallet-toolbox": "npm:@bopen-io/wallet-toolbox@2.6.2-brc153.5",
|
|
30
|
+
"@bsv/wallet-toolbox-client": "npm:@bopen-io/wallet-toolbox-client@2.6.2-brc153.5",
|
|
31
|
+
"@jdr377/message-box-store": "0.1.0-beta.0",
|
|
32
|
+
"@jsquash/webp": "1.5.0",
|
|
33
|
+
"@modelcontextprotocol/server": "2.3.1",
|
|
34
|
+
"mediabunny": "1.52.3",
|
|
35
|
+
"zod": "4.6.5"
|
|
36
|
+
},
|
|
37
|
+
"overrides": {
|
|
38
|
+
"@bsv/sdk": "2.7.1",
|
|
39
|
+
"engine.io-client": "6.6.6"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public",
|
|
43
|
+
"registry": "https://registry.npmjs.org/",
|
|
44
|
+
"tag": "preview"
|
|
45
|
+
}
|
|
46
|
+
}
|