GhostPaw Affinity

v0.7.3
io.github.GhostPawJS/affinity Checked 3 hours ago Published 6 days ago

Local relationship model and social CRM for contacts, relationships, evidence, and commitments.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_affinity

Search contacts by name, identity, attributes, link roles, bonds and event text. All whitespace tokens must match. Dormant and lost contacts are excluded by default; use includeDormant and includeLost to include them.

ParameterTypeDescription
query *stringFree-text or natural-key query.
attribute
includeDormantbooleanWhether dormant contacts are included.
includeLostbooleanInclude lost contacts (search excludes them by default).
includeOwnerbooleanWhether owner contacts are included.
kindstringOptional contact kind filter.
lifecycleStatestringOptional lifecycle state filter.
limitintegerOptional result limit.
offsetintegerOptional result offset.
scopestringSearch scope; defaults to contacts.
tag
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.

review_affinity

Review one affinity surface such as contacts, journals, link queues, commitments, dates, graph state, or merge history.

ParameterTypeDescription
view *stringWhich review surface to return.
attribute
channelstringFilter events by channel.
commitmentTypestringOptional commitment type filter.
contactobjectOptional target contact locator.
contactIdsarrayOptional contact-id subset.
eventTypesarrayOptional event-type filter.
exactOnlybooleanWhether duplicate review is exact-only.
horizonDaysintegerOptional horizon-days filter.
includeArchivedbooleanWhether archived links are included.
includeContentbooleanDeprecated alias for --with-content; includes verbatim event content.
includeDismissedbooleanWhether dismissed pairs are included in duplicate review (marked with dismissed flag).
includeDormantbooleanWhether dormant rows are included.
includeLostbooleanInclude lost contacts (search excludes them by default).
includeObservedbooleanWhether observed links are included.
includeOwnerbooleanWhether owner contacts are included.
includeStructuralbooleanInclude structural ties as marked chart edges.
kindstringOptional contact kind or link kind filter, depending on the view.
lifecycleStatestringOptional contact lifecycle-state filter.
limitintegerOptional result limit, 1..10000 (default 50); use offset for paging.
linkobjectOptional target link locator.
linkStatestringOptional link state filter.
minScorenumberOptional duplicate minimum score (default 0.5; use 0 for all candidates).
momentKindstringOptional moment kind filter.
nowOptional current timestamp for overdue calculations. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, DD.MM.YYYY, today, tomorrow, yesterday, +3d or -2d. UTC midnight…
offsetintegerOptional result offset.
recurrenceKindstringOptional recurrence-kind filter.
refobject
refIdstringExternal reference id.
refSourcestringExternal reference source.
sinceOptional lower timestamp bound. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, DD.MM.YYYY, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses…
tag
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.
untilOptional upper timestamp bound. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, DD.MM.YYYY, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses…
withContentbooleanInclude verbatim event content.

inspect_affinity_item

Inspect one exact affinity item such as the owner profile, a contact profile, or one link detail.

ParameterTypeDescription
kind *stringWhat to inspect.
contactobjectTarget contact. Required when kind=contact_profile. Provide contactId or identity.
eventIdintegerExact event id.
linkobjectTarget link. Required when kind=link. Provide linkId or endpoints.
recentEventsLimitintegerOptional recent-events cap.
refobject
refIdstringExternal reference id.
refSourcestringExternal reference source.
topLinksLimitintegerOptional top-links cap.
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.

manage_contact

Create, revise, export or permanently delete a contact (confirm: true required; owner cannot be deleted). Export without contact exports the whole database. Lifecycle lost is soft delete. ALWAYS search_affinity first before creating — duplicates corrupt the graph.

ParameterTypeDescription
action *stringOperation to perform.
confirmbooleanRequired true for permanent deletion.
contactobjectTarget contact. Required when action=revise or set_lifecycle. Provide contactId or identity.
inputobjectNew contact payload. Required when action=create.
kindstringReplacement contact kind for migrate_kind. Owner must remain human or agent. Audited without bond mechanics.
lifecycleStatestringTarget lifecycle state. Required when action=set_lifecycle.
optionsobjectOptional lifecycle metadata.
patchobjectAllowed contact patch. Required when action=revise.
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.

merge_contacts

Merge one loser contact into one winner contact using explicit contact locators.

ParameterTypeDescription
loser *objectLoser contact. Provide contactId or identity.
winner *objectWinner contact. Provide contactId or identity.
nowOptional merge timestamp. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, DD.MM.YYYY, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC e…
reasonSummarystringOptional merge reason.
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.

manage_duplicate_dismissal

Dismiss or un-dismiss a duplicate candidate pair so it does not resurface in review_affinity contacts.duplicates.

ParameterTypeDescription
action *stringAction to perform.
left *objectLeft contact. Provide contactId or identity.
right *objectRight contact. Provide contactId or identity.
reasonOptional reason for the dismissal.
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.

manage_identity

Add, revise, verify, or remove one routing identity on a contact. Use this for emails, phone numbers, social handles, and URLs — anything that could locate a person. Do not use manage_attribute for these.

ParameterTypeDescription
action *stringOperation to perform.
contactobjectTarget contact. Required when action=add. Provide contactId or identity.
identityIdintegerIdentity id. Required when action=revise, verify, or remove.
inputobjectNew identity payload. Required when action=add.
patchobjectIdentity patch. Required when action=revise.
removedAtRemoval timestamp. Optional for action=remove. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, DD.MM.YYYY, today, tomorrow, yesterday, +3d or -2d. UTC midnight for da…
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.
verifiedAtVerification timestamp. Optional for action=verify. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, DD.MM.YYYY, today, tomorrow, yesterday, +3d or -2d. UTC midnight f…

manage_relationship

Seed social links, revise bond and state, and manage structural ties. Seed a link as soon as a relationship is mentioned — do not wait for repeated evidence.

ParameterTypeDescription
action *stringOperation to perform.
bondBond text. Required when action=revise_bond. Null to clear.
fromobjectSource contact. Required when action=seed_social_link or set_structural_tie. Provide contactId or identity.
inputobjectFull payload for seed_social_link or set_structural_tie. Alternative to top-level kind/role.
kindstringLink kind. Required for seed_social_link and set_structural_tie. Can be passed here or inside input. For seed_social_link: personal, family, professional, romantic, care, service, observed, other_rela…
linkobjectTarget link. Required when action=revise_bond, override_state, or remove_structural_tie. Provide linkId or endpoints.
optionsobjectOptional metadata.
patchobjectReplacement link fields; cadenceDays null unpins.
removedAtRemoval timestamp. Optional for action=remove_structural_tie. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, DD.MM.YYYY, today, tomorrow, yesterday, +3d or -2d. UTC…
rolestringOptional role for seed_social_link or set_structural_tie. Can be passed here or inside input.
statestringLink state. Required when action=override_state.
toobjectTarget contact. Required when action=seed_social_link or set_structural_tie. Provide contactId or identity.
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.

record_event

Record one social event such as an interaction, observation, milestone, or transaction. For interactions, milestones, and transactions the owner contact is auto-injected into participants if missing. Observations may omit the owner when recording third-party evidence.

manage_commitment

Record or resolve one commitment such as a promise or agreement. The owner contact is auto-injected into participants if missing.

ParameterTypeDescription
action *stringOperation to perform.
commitmentEventIdintegerCommitment event id. Required when action=resolve.
inputobjectCommitment payload. Required when action=record.
optionsobjectOptional metadata.
resolutionstringHow the commitment was resolved. Required when action=resolve.
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.

manage_date_anchor

Add, revise, or remove recurring date anchors on contacts or links. Use this for birthdays, anniversaries, and yearly events — not manage_attribute.

ParameterTypeDescription
action *stringOperation to perform.
anchorEventIdintegerAnchor event id. Required when action=revise or remove.
inputobjectDate anchor payload. Required when action=add.
optionsobjectOptional metadata.
patchobjectAnchor patch. Required when action=revise.
removedAtRemoval timestamp. Optional for action=remove. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, DD.MM.YYYY, today, tomorrow, yesterday, +3d or -2d. UTC midnight for da…
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.

manage_attribute

Set, unset, or replace custom metadata attributes on contacts, links and events. For emails, phones, handles, and URLs use manage_identity instead — those are routing keys, not attributes.

ParameterTypeDescription
action *stringOperation to perform.
entriesarrayKey-value map to replace all attributes. Required when action=replace.
namestringAttribute name. Required when action=set or unset.
removedAtRemoval timestamp. Optional for action=unset. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, DD.MM.YYYY, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dat…
targetobjectAttribute target. Always required.
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.
valueAttribute value. Required when action=set. Null for presence/tag semantics.

manage_event

Revise or delete one event by eventId or external reference. Delete requires confirm=true and recomputes affected relationships.

ParameterTypeDescription
action *stringAction.
confirmbooleanMust be true to delete.
eventIdintegerEvent id; provide eventId or ref.
patchobjectFields to revise; externalRef may only be added when absent.
refobject
refIdstringExternal reference id.
refSourcestringExternal reference source.
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.

check_contactable

Check do-not-contact flags through works_at and member_of ties.

ParameterTypeDescription
contact *objectContact to check.
tzstringIANA time zone for due days and local calendar calculations; defaults to TZ or the process local zone.