@ghostpaw/affinity 0.4.0 → 0.5.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/README.md +174 -99
- package/SKILL.md +217 -33
- package/dist/cli.js +2471 -927
- package/dist/index.cjs +1410 -493
- package/dist/index.d.cts +556 -55
- package/dist/index.d.ts +556 -55
- package/dist/index.js +1410 -493
- package/dist/mcp-server.js +1845 -704
- package/dist/mcp.cjs +1631 -609
- package/dist/mcp.js +1632 -610
- package/package.json +1 -1
- package/skills/affinity/SKILL.md +217 -33
package/dist/index.d.ts
CHANGED
|
@@ -167,6 +167,8 @@ interface EventParticipantView {
|
|
|
167
167
|
|
|
168
168
|
/** Promise/agreement projection — CONCEPT.md CommitmentRecord. */
|
|
169
169
|
interface CommitmentRecord {
|
|
170
|
+
dueAtIso?: string | null;
|
|
171
|
+
overdue?: boolean;
|
|
170
172
|
eventId: number;
|
|
171
173
|
type: EventType;
|
|
172
174
|
summary: string;
|
|
@@ -193,6 +195,7 @@ declare const AFFINITY_DEFAULT_LIST_LIMIT = 50;
|
|
|
193
195
|
declare const AFFINITY_MAX_LIST_LIMIT = 250;
|
|
194
196
|
/** Shared list-style read controls — CONCEPT.md Global query contract. */
|
|
195
197
|
interface AffinityListReadOptions {
|
|
198
|
+
now?: number;
|
|
196
199
|
limit?: number;
|
|
197
200
|
offset?: number;
|
|
198
201
|
sort?: string;
|
|
@@ -212,11 +215,14 @@ type ContactJournalReadOptions = AffinityListReadOptions & {
|
|
|
212
215
|
/** Options for `read.getContactProfile`. */
|
|
213
216
|
interface ContactProfileReadOptions {
|
|
214
217
|
/** Cap on relational links returned in `topLinks` (default 8). */
|
|
218
|
+
recentEventsLimit?: number;
|
|
219
|
+
now?: number;
|
|
215
220
|
topLinksLimit?: number;
|
|
216
221
|
}
|
|
217
222
|
|
|
218
223
|
/** Compact portfolio row — CONCEPT.md ContactListItem. */
|
|
219
224
|
interface ContactListItem {
|
|
225
|
+
matchedOn?: string[];
|
|
220
226
|
id: number;
|
|
221
227
|
name: string;
|
|
222
228
|
kind: ContactKind;
|
|
@@ -226,6 +232,22 @@ interface ContactListItem {
|
|
|
226
232
|
lastMeaningfulEventAt?: number | null;
|
|
227
233
|
}
|
|
228
234
|
|
|
235
|
+
/** Journal entry with explicit participants — CONCEPT.md EventRecord. */
|
|
236
|
+
interface EventRecord {
|
|
237
|
+
id: number;
|
|
238
|
+
type: EventType;
|
|
239
|
+
occurredAt: number;
|
|
240
|
+
summary: string;
|
|
241
|
+
significance: number;
|
|
242
|
+
momentKind: EventMomentKind | null;
|
|
243
|
+
participants: readonly EventParticipantView[];
|
|
244
|
+
recurrenceKind?: EventRecurrenceKind | null;
|
|
245
|
+
anchorMonth?: number | null;
|
|
246
|
+
anchorDay?: number | null;
|
|
247
|
+
anchorContactId?: number | null;
|
|
248
|
+
anchorLinkId?: number | null;
|
|
249
|
+
}
|
|
250
|
+
|
|
229
251
|
/** One routing identity on a contact — CONCEPT.md IdentityRecord. */
|
|
230
252
|
interface IdentityRecord {
|
|
231
253
|
id: number;
|
|
@@ -296,6 +318,21 @@ interface UpcomingDateRecord {
|
|
|
296
318
|
/** Full contact detail — CONCEPT.md ContactProfileRecord. */
|
|
297
319
|
interface ContactProfileRecord {
|
|
298
320
|
contact: ContactCore;
|
|
321
|
+
recentEvents?: readonly (EventRecord & {
|
|
322
|
+
occurredAtIso: string;
|
|
323
|
+
})[];
|
|
324
|
+
openCommitments?: readonly CommitmentRecord[];
|
|
325
|
+
ties?: readonly {
|
|
326
|
+
id: number;
|
|
327
|
+
kind: string;
|
|
328
|
+
role: string | null;
|
|
329
|
+
contactId: number;
|
|
330
|
+
name: string;
|
|
331
|
+
}[];
|
|
332
|
+
mergedInto?: {
|
|
333
|
+
id: number;
|
|
334
|
+
name: string;
|
|
335
|
+
};
|
|
299
336
|
identities: readonly IdentityRecord[];
|
|
300
337
|
attributes: readonly AttributeEntry[];
|
|
301
338
|
topLinks: readonly LinkListItem[];
|
|
@@ -550,22 +587,6 @@ interface DismissedDuplicateRecord {
|
|
|
550
587
|
dismissedAt: number;
|
|
551
588
|
}
|
|
552
589
|
|
|
553
|
-
/** Journal entry with explicit participants — CONCEPT.md EventRecord. */
|
|
554
|
-
interface EventRecord {
|
|
555
|
-
id: number;
|
|
556
|
-
type: EventType;
|
|
557
|
-
occurredAt: number;
|
|
558
|
-
summary: string;
|
|
559
|
-
significance: number;
|
|
560
|
-
momentKind: EventMomentKind | null;
|
|
561
|
-
participants: readonly EventParticipantView[];
|
|
562
|
-
recurrenceKind?: EventRecurrenceKind | null;
|
|
563
|
-
anchorMonth?: number | null;
|
|
564
|
-
anchorDay?: number | null;
|
|
565
|
-
anchorContactId?: number | null;
|
|
566
|
-
anchorLinkId?: number | null;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
590
|
/** Raw `events` row from SQLite (snake_case columns). */
|
|
570
591
|
interface EventRow {
|
|
571
592
|
id: number;
|
|
@@ -643,6 +664,9 @@ interface LinkRow {
|
|
|
643
664
|
|
|
644
665
|
/** Filters for `read.listContacts` — CONCEPT.md portfolio list. */
|
|
645
666
|
interface ListContactsFilters {
|
|
667
|
+
attribute?: string | string[];
|
|
668
|
+
tag?: string | string[];
|
|
669
|
+
includeLost?: boolean;
|
|
646
670
|
kind?: ContactKind;
|
|
647
671
|
lifecycleState?: ContactLifecycleState;
|
|
648
672
|
includeOwner?: boolean;
|
|
@@ -717,6 +741,7 @@ type DismissalMutationReceipt = MutationReceipt<DismissedPairRef>;
|
|
|
717
741
|
|
|
718
742
|
/** Maintenance radar row — CONCEPT.md RadarRecord. */
|
|
719
743
|
interface RadarRecord {
|
|
744
|
+
reasons?: string[];
|
|
720
745
|
linkId: number;
|
|
721
746
|
contactId: number;
|
|
722
747
|
driftPriority: number;
|
|
@@ -918,6 +943,41 @@ declare function recordTransaction(db: AffinityDb, input: RecordTransactionInput
|
|
|
918
943
|
|
|
919
944
|
declare function resolveCommitment(db: AffinityDb, commitmentEventId: number, resolution: CommitmentResolutionKind, options?: ResolveCommitmentOptions): EventMutationReceipt;
|
|
920
945
|
|
|
946
|
+
/** Export all stored records belonging to a contact, including archived history. */
|
|
947
|
+
declare function exportContact(db: AffinityDb, id: number): {
|
|
948
|
+
contact: Record<string, unknown>;
|
|
949
|
+
identities: Record<string, unknown>[];
|
|
950
|
+
attributes: Record<string, unknown>[];
|
|
951
|
+
links: Record<string, unknown>[];
|
|
952
|
+
events: (Record<string, unknown> & {
|
|
953
|
+
participants: Record<string, unknown>[];
|
|
954
|
+
})[];
|
|
955
|
+
commitments: Record<string, unknown>[];
|
|
956
|
+
dates: Record<string, unknown>[];
|
|
957
|
+
mergeHistory: Record<string, unknown>[];
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
/** Export every contact, including merged and lost records. Version is the export format version. */
|
|
961
|
+
declare function exportAffinity(db: AffinityDb): {
|
|
962
|
+
version: number;
|
|
963
|
+
exportedAt: number;
|
|
964
|
+
exportedAtIso: string;
|
|
965
|
+
contacts: {
|
|
966
|
+
contact: Record<string, unknown>;
|
|
967
|
+
identities: Record<string, unknown>[];
|
|
968
|
+
attributes: Record<string, unknown>[];
|
|
969
|
+
links: Record<string, unknown>[];
|
|
970
|
+
events: (Record<string, unknown> & {
|
|
971
|
+
participants: Record<string, unknown>[];
|
|
972
|
+
})[];
|
|
973
|
+
commitments: Record<string, unknown>[];
|
|
974
|
+
dates: Record<string, unknown>[];
|
|
975
|
+
mergeHistory: Record<string, unknown>[];
|
|
976
|
+
}[];
|
|
977
|
+
};
|
|
978
|
+
|
|
979
|
+
declare const read_exportAffinity: typeof exportAffinity;
|
|
980
|
+
declare const read_exportContact: typeof exportContact;
|
|
921
981
|
declare const read_getAffinityChart: typeof getAffinityChart;
|
|
922
982
|
declare const read_getContactJournal: typeof getContactJournal;
|
|
923
983
|
declare const read_getContactProfile: typeof getContactProfile;
|
|
@@ -938,7 +998,7 @@ declare const read_listRadar: typeof listRadar;
|
|
|
938
998
|
declare const read_listUpcomingDates: typeof listUpcomingDates;
|
|
939
999
|
declare const read_searchContacts: typeof searchContacts;
|
|
940
1000
|
declare namespace read {
|
|
941
|
-
export { read_getAffinityChart as getAffinityChart, read_getContactJournal as getContactJournal, read_getContactProfile as getContactProfile, read_getLinkDetail as getLinkDetail, read_getLinkTimeline as getLinkTimeline, read_getLinksBetween as getLinksBetween, read_getMergeHistory as getMergeHistory, read_getOwnerProfile as getOwnerProfile, read_listContacts as listContacts, read_listDismissedDuplicates as listDismissedDuplicates, read_listDuplicateCandidates as listDuplicateCandidates, read_listMoments as listMoments, read_listObservedLinks as listObservedLinks, read_listOpenCommitments as listOpenCommitments, read_listOwnerSocialLinks as listOwnerSocialLinks, read_listProgressionReadiness as listProgressionReadiness, read_listRadar as listRadar, read_listUpcomingDates as listUpcomingDates, read_searchContacts as searchContacts };
|
|
1001
|
+
export { read_exportAffinity as exportAffinity, read_exportContact as exportContact, read_getAffinityChart as getAffinityChart, read_getContactJournal as getContactJournal, read_getContactProfile as getContactProfile, read_getLinkDetail as getLinkDetail, read_getLinkTimeline as getLinkTimeline, read_getLinksBetween as getLinksBetween, read_getMergeHistory as getMergeHistory, read_getOwnerProfile as getOwnerProfile, read_listContacts as listContacts, read_listDismissedDuplicates as listDismissedDuplicates, read_listDuplicateCandidates as listDuplicateCandidates, read_listMoments as listMoments, read_listObservedLinks as listObservedLinks, read_listOpenCommitments as listOpenCommitments, read_listOwnerSocialLinks as listOwnerSocialLinks, read_listProgressionReadiness as listProgressionReadiness, read_listRadar as listRadar, read_listUpcomingDates as listUpcomingDates, read_searchContacts as searchContacts };
|
|
942
1002
|
}
|
|
943
1003
|
|
|
944
1004
|
interface AffinitySoulTrait {
|
|
@@ -1081,7 +1141,7 @@ type ToolEntityKind = "contact" | "identity" | "link" | "event" | "attribute";
|
|
|
1081
1141
|
type ToolOutcomeKind = "success" | "no_op" | "needs_clarification" | "error";
|
|
1082
1142
|
type ToolErrorCode = "clarification_needed" | "conflict" | "constraint_violation" | "invalid_input" | "invalid_state" | "not_found" | "system_error" | "unsupported_target";
|
|
1083
1143
|
type ToolErrorKind = "domain" | "protocol" | "system";
|
|
1084
|
-
type ToolWarningCode = "already_in_state" | "derived_value_used" | "empty_result" | "partial_match" | "unchanged";
|
|
1144
|
+
type ToolWarningCode = "already_in_state" | "derived_value_used" | "empty_result" | "possible_duplicate" | "partial_match" | "unchanged";
|
|
1085
1145
|
type ToolClarificationCode = "ambiguous_target" | "missing_required_choice" | "multiple_plausible_matches";
|
|
1086
1146
|
type ToolNextStepHintKind = "ask_user" | "inspect_item" | "review_view" | "retry_with" | "use_tool";
|
|
1087
1147
|
interface ToolEntityRef {
|
|
@@ -1092,9 +1152,12 @@ interface ToolEntityRef {
|
|
|
1092
1152
|
state?: ContactLifecycleState | EventType | LinkKind | LinkState | ContactKind | string | null | undefined;
|
|
1093
1153
|
}
|
|
1094
1154
|
interface ToolListItem extends ToolEntityRef {
|
|
1155
|
+
[key: string]: unknown;
|
|
1095
1156
|
snippet?: string | undefined;
|
|
1096
1157
|
}
|
|
1097
1158
|
interface ToolWarning {
|
|
1159
|
+
contactId?: number;
|
|
1160
|
+
score?: number;
|
|
1098
1161
|
code: ToolWarningCode;
|
|
1099
1162
|
message: string;
|
|
1100
1163
|
}
|
|
@@ -1206,6 +1269,12 @@ declare function objectSchema(properties: Record<string, JsonSchema>, required:
|
|
|
1206
1269
|
declare function nullableStringSchema(description: string): JsonSchema;
|
|
1207
1270
|
declare function oneOfSchema(schemas: ReadonlyArray<JsonSchema>, description?: string): JsonSchema;
|
|
1208
1271
|
|
|
1272
|
+
type TimeInputs<T> = T extends readonly (infer U)[] ? readonly TimeInputs<U>[] : T extends object ? {
|
|
1273
|
+
[K in keyof T]: K extends `${string}At` | "now" | "asOf" | "since" | "until" ? T[K] | string : TimeInputs<T[K]>;
|
|
1274
|
+
} : T;
|
|
1275
|
+
/** Parse human time inputs using UTC days. Library mutations still accept numbers. */
|
|
1276
|
+
declare function parseTimeInput(value: number | string, field?: string, now?: number): number;
|
|
1277
|
+
|
|
1209
1278
|
type ContactLocator = {
|
|
1210
1279
|
contactId: number;
|
|
1211
1280
|
} | {
|
|
@@ -1232,7 +1301,7 @@ type ResolvedTarget<T> = {
|
|
|
1232
1301
|
ok: false;
|
|
1233
1302
|
result: ToolFailure | ToolNeedsClarification;
|
|
1234
1303
|
};
|
|
1235
|
-
declare function resolveContactLocator(db: AffinityDb, locator: ContactLocator, field?: string): ResolvedTarget<ContactRow>;
|
|
1304
|
+
declare function resolveContactLocator(db: AffinityDb, locator: ContactLocator, field?: string, allowMerged?: boolean): ResolvedTarget<ContactRow>;
|
|
1236
1305
|
declare function resolveLinkLocator(db: AffinityDb, locator: LinkLocator, field?: string): ResolvedTarget<LinkRow>;
|
|
1237
1306
|
declare function mapErrorToToolFailure(error: unknown, summary?: string): ToolFailure;
|
|
1238
1307
|
declare function withToolHandling<TData>(operation: () => ToolResult<TData>, summary?: string): ToolResult<TData>;
|
|
@@ -1243,6 +1312,7 @@ type InspectAffinityItemToolInput = {
|
|
|
1243
1312
|
} | {
|
|
1244
1313
|
kind: "contact_profile";
|
|
1245
1314
|
contact: ContactLocator;
|
|
1315
|
+
recentEventsLimit?: number;
|
|
1246
1316
|
topLinksLimit?: number;
|
|
1247
1317
|
} | {
|
|
1248
1318
|
kind: "link";
|
|
@@ -1260,10 +1330,16 @@ type InspectAffinityItemToolData = {
|
|
|
1260
1330
|
detail: LinkDetailRecord;
|
|
1261
1331
|
};
|
|
1262
1332
|
type InspectAffinityItemToolResult = ToolResult<InspectAffinityItemToolData>;
|
|
1263
|
-
declare function inspectAffinityItemToolHandler(db: AffinityDb,
|
|
1264
|
-
declare const inspectAffinityItemTool: AffinityToolDefinition<InspectAffinityItemToolInput
|
|
1333
|
+
declare function inspectAffinityItemToolHandler(db: AffinityDb, rawInput: TimeInputs<InspectAffinityItemToolInput>): InspectAffinityItemToolResult;
|
|
1334
|
+
declare const inspectAffinityItemTool: AffinityToolDefinition<TimeInputs<InspectAffinityItemToolInput>, InspectAffinityItemToolResult>;
|
|
1265
1335
|
|
|
1266
1336
|
interface MutationToolData<TPrimary> {
|
|
1337
|
+
changes: {
|
|
1338
|
+
entity: string;
|
|
1339
|
+
id: number;
|
|
1340
|
+
action: string;
|
|
1341
|
+
fields?: string[];
|
|
1342
|
+
}[];
|
|
1267
1343
|
action: string;
|
|
1268
1344
|
primary: TPrimary;
|
|
1269
1345
|
created: MutationReceipt<TPrimary>["created"];
|
|
@@ -1273,7 +1349,7 @@ interface MutationToolData<TPrimary> {
|
|
|
1273
1349
|
affectedLinks: number[];
|
|
1274
1350
|
derivedEffects: MutationReceipt<TPrimary>["derivedEffects"];
|
|
1275
1351
|
}
|
|
1276
|
-
declare function mutationToolResult<TPrimary>(action: string, receipt: MutationReceipt<TPrimary>, entitySummary: string): ToolResult<MutationToolData<TPrimary>>;
|
|
1352
|
+
declare function mutationToolResult<TPrimary>(action: string, receipt: MutationReceipt<TPrimary>, entitySummary: string, fields?: string[]): ToolResult<MutationToolData<TPrimary>>;
|
|
1277
1353
|
|
|
1278
1354
|
type AttributeTargetInput = {
|
|
1279
1355
|
kind: "contact";
|
|
@@ -1298,8 +1374,8 @@ type ManageAttributeToolInput = {
|
|
|
1298
1374
|
entries: AttributeEntry[];
|
|
1299
1375
|
};
|
|
1300
1376
|
type ManageAttributeToolResult = ToolResult<MutationToolData<AttributeRecord>>;
|
|
1301
|
-
declare function manageAttributeToolHandler(db: AffinityDb,
|
|
1302
|
-
declare const manageAttributeTool: AffinityToolDefinition<ManageAttributeToolInput
|
|
1377
|
+
declare function manageAttributeToolHandler(db: AffinityDb, rawInput: TimeInputs<ManageAttributeToolInput>): ManageAttributeToolResult;
|
|
1378
|
+
declare const manageAttributeTool: AffinityToolDefinition<TimeInputs<ManageAttributeToolInput>, ManageAttributeToolResult>;
|
|
1303
1379
|
|
|
1304
1380
|
type ManageCommitmentToolInput = {
|
|
1305
1381
|
action: "record";
|
|
@@ -1311,12 +1387,34 @@ type ManageCommitmentToolInput = {
|
|
|
1311
1387
|
options?: ResolveCommitmentOptions;
|
|
1312
1388
|
};
|
|
1313
1389
|
type ManageCommitmentToolResult = ToolResult<MutationToolData<EventRecord>>;
|
|
1314
|
-
declare function manageCommitmentToolHandler(db: AffinityDb,
|
|
1315
|
-
declare const manageCommitmentTool: AffinityToolDefinition<ManageCommitmentToolInput
|
|
1390
|
+
declare function manageCommitmentToolHandler(db: AffinityDb, rawInput: TimeInputs<ManageCommitmentToolInput>): ManageCommitmentToolResult;
|
|
1391
|
+
declare const manageCommitmentTool: AffinityToolDefinition<TimeInputs<ManageCommitmentToolInput>, ManageCommitmentToolResult>;
|
|
1392
|
+
|
|
1393
|
+
/** Permanently erase a contact and dependent records. The owner cannot be erased. */
|
|
1394
|
+
declare function deleteContact(db: AffinityDb, locatorId: number, options: {
|
|
1395
|
+
confirm?: boolean;
|
|
1396
|
+
}): {
|
|
1397
|
+
contactId: number;
|
|
1398
|
+
removed: {
|
|
1399
|
+
entity: string;
|
|
1400
|
+
count: number;
|
|
1401
|
+
ids: number[];
|
|
1402
|
+
}[];
|
|
1403
|
+
affectedLinks: number[];
|
|
1404
|
+
};
|
|
1316
1405
|
|
|
1317
1406
|
type ManageContactToolInput = {
|
|
1407
|
+
action: "export";
|
|
1408
|
+
contact?: ContactLocator;
|
|
1409
|
+
} | {
|
|
1410
|
+
action: "delete";
|
|
1411
|
+
contact: ContactLocator;
|
|
1412
|
+
confirm?: boolean;
|
|
1413
|
+
} | {
|
|
1318
1414
|
action: "create";
|
|
1319
|
-
input: CreateContactInput
|
|
1415
|
+
input: CreateContactInput & {
|
|
1416
|
+
identities?: AddIdentityInput[];
|
|
1417
|
+
};
|
|
1320
1418
|
} | {
|
|
1321
1419
|
action: "revise";
|
|
1322
1420
|
contact: ContactLocator;
|
|
@@ -1327,9 +1425,23 @@ type ManageContactToolInput = {
|
|
|
1327
1425
|
lifecycleState: ContactLifecycleState;
|
|
1328
1426
|
options?: SetContactLifecycleOptions;
|
|
1329
1427
|
};
|
|
1330
|
-
type ManageContactToolResult = ToolResult<MutationToolData<ContactListItem
|
|
1331
|
-
|
|
1332
|
-
|
|
1428
|
+
type ManageContactToolResult = ToolResult<MutationToolData<ContactListItem> | {
|
|
1429
|
+
action: "export";
|
|
1430
|
+
export: ReturnType<typeof exportContact> | ReturnType<typeof exportAffinity>;
|
|
1431
|
+
} | {
|
|
1432
|
+
action: "delete";
|
|
1433
|
+
deletion: ReturnType<typeof deleteContact>;
|
|
1434
|
+
changes: {
|
|
1435
|
+
entity: string;
|
|
1436
|
+
id: number;
|
|
1437
|
+
action: string;
|
|
1438
|
+
}[];
|
|
1439
|
+
}>;
|
|
1440
|
+
declare function manageContactToolHandler(db: AffinityDb, input: TimeInputs<Exclude<ManageContactToolInput, {
|
|
1441
|
+
action: "export" | "delete";
|
|
1442
|
+
}>>): ToolResult<MutationToolData<ContactListItem>>;
|
|
1443
|
+
declare function manageContactToolHandler(db: AffinityDb, input: TimeInputs<ManageContactToolInput>): ManageContactToolResult;
|
|
1444
|
+
declare const manageContactTool: AffinityToolDefinition<TimeInputs<ManageContactToolInput>, ManageContactToolResult>;
|
|
1333
1445
|
|
|
1334
1446
|
interface ManageDuplicateDismissalToolInput {
|
|
1335
1447
|
action: "dismiss" | "undismiss";
|
|
@@ -1337,13 +1449,36 @@ interface ManageDuplicateDismissalToolInput {
|
|
|
1337
1449
|
right: ContactLocator;
|
|
1338
1450
|
reason?: string | null;
|
|
1339
1451
|
}
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1452
|
+
type DismissalToolData = Omit<MutationToolData<DismissedPairRef>, "changes"> & {
|
|
1453
|
+
changes: {
|
|
1454
|
+
entity: "duplicate_dismissal";
|
|
1455
|
+
leftContactId: number;
|
|
1456
|
+
rightContactId: number;
|
|
1457
|
+
action: string;
|
|
1458
|
+
}[];
|
|
1459
|
+
};
|
|
1344
1460
|
type ManageDuplicateDismissalToolResult = ToolResult<DismissalToolData>;
|
|
1345
|
-
declare function manageDuplicateDismissalToolHandler(db: AffinityDb,
|
|
1346
|
-
declare const manageDuplicateDismissalTool: AffinityToolDefinition<
|
|
1461
|
+
declare function manageDuplicateDismissalToolHandler(db: AffinityDb, rawInput: TimeInputs<ManageDuplicateDismissalToolInput>): ManageDuplicateDismissalToolResult;
|
|
1462
|
+
declare const manageDuplicateDismissalTool: AffinityToolDefinition<{
|
|
1463
|
+
action: "dismiss" | "undismiss";
|
|
1464
|
+
left: {
|
|
1465
|
+
contactId: number;
|
|
1466
|
+
} | {
|
|
1467
|
+
identity: {
|
|
1468
|
+
type: string;
|
|
1469
|
+
value: string;
|
|
1470
|
+
};
|
|
1471
|
+
};
|
|
1472
|
+
right: {
|
|
1473
|
+
contactId: number;
|
|
1474
|
+
} | {
|
|
1475
|
+
identity: {
|
|
1476
|
+
type: string;
|
|
1477
|
+
value: string;
|
|
1478
|
+
};
|
|
1479
|
+
};
|
|
1480
|
+
reason?: string | null;
|
|
1481
|
+
}, ManageDuplicateDismissalToolResult>;
|
|
1347
1482
|
|
|
1348
1483
|
type DateAnchorTargetInput = {
|
|
1349
1484
|
kind: "contact";
|
|
@@ -1368,8 +1503,8 @@ type ManageDateAnchorToolInput = {
|
|
|
1368
1503
|
removedAt?: number;
|
|
1369
1504
|
};
|
|
1370
1505
|
type ManageDateAnchorToolResult = ToolResult<MutationToolData<EventRecord>>;
|
|
1371
|
-
declare function manageDateAnchorToolHandler(db: AffinityDb,
|
|
1372
|
-
declare const manageDateAnchorTool: AffinityToolDefinition<ManageDateAnchorToolInput
|
|
1506
|
+
declare function manageDateAnchorToolHandler(db: AffinityDb, rawInput: TimeInputs<ManageDateAnchorToolInput>): ManageDateAnchorToolResult;
|
|
1507
|
+
declare const manageDateAnchorTool: AffinityToolDefinition<TimeInputs<ManageDateAnchorToolInput>, ManageDateAnchorToolResult>;
|
|
1373
1508
|
|
|
1374
1509
|
type ManageIdentityToolInput = {
|
|
1375
1510
|
action: "add";
|
|
@@ -1389,8 +1524,8 @@ type ManageIdentityToolInput = {
|
|
|
1389
1524
|
removedAt?: number;
|
|
1390
1525
|
};
|
|
1391
1526
|
type ManageIdentityToolResult = ToolResult<MutationToolData<IdentityRecord>>;
|
|
1392
|
-
declare function manageIdentityToolHandler(db: AffinityDb,
|
|
1393
|
-
declare const manageIdentityTool: AffinityToolDefinition<ManageIdentityToolInput
|
|
1527
|
+
declare function manageIdentityToolHandler(db: AffinityDb, rawInput: TimeInputs<ManageIdentityToolInput>): ManageIdentityToolResult;
|
|
1528
|
+
declare const manageIdentityTool: AffinityToolDefinition<TimeInputs<ManageIdentityToolInput>, ManageIdentityToolResult>;
|
|
1394
1529
|
|
|
1395
1530
|
type ManageRelationshipToolInput = {
|
|
1396
1531
|
action: "seed_social_link";
|
|
@@ -1422,8 +1557,8 @@ type ManageRelationshipToolInput = {
|
|
|
1422
1557
|
removedAt?: number;
|
|
1423
1558
|
};
|
|
1424
1559
|
type ManageRelationshipToolResult = ToolResult<MutationToolData<LinkListItem>>;
|
|
1425
|
-
declare function manageRelationshipToolHandler(db: AffinityDb,
|
|
1426
|
-
declare const manageRelationshipTool: AffinityToolDefinition<ManageRelationshipToolInput
|
|
1560
|
+
declare function manageRelationshipToolHandler(db: AffinityDb, rawInput: TimeInputs<ManageRelationshipToolInput>): ManageRelationshipToolResult;
|
|
1561
|
+
declare const manageRelationshipTool: AffinityToolDefinition<TimeInputs<ManageRelationshipToolInput>, ManageRelationshipToolResult>;
|
|
1427
1562
|
|
|
1428
1563
|
interface MergeContactsToolInput {
|
|
1429
1564
|
winner: ContactLocator;
|
|
@@ -1432,8 +1567,27 @@ interface MergeContactsToolInput {
|
|
|
1432
1567
|
now?: number;
|
|
1433
1568
|
}
|
|
1434
1569
|
type MergeContactsToolResult = ToolResult<MutationToolData<MergePrimary>>;
|
|
1435
|
-
declare function mergeContactsToolHandler(db: AffinityDb,
|
|
1436
|
-
declare const mergeContactsTool: AffinityToolDefinition<
|
|
1570
|
+
declare function mergeContactsToolHandler(db: AffinityDb, rawInput: TimeInputs<MergeContactsToolInput>): MergeContactsToolResult;
|
|
1571
|
+
declare const mergeContactsTool: AffinityToolDefinition<{
|
|
1572
|
+
winner: {
|
|
1573
|
+
contactId: number;
|
|
1574
|
+
} | {
|
|
1575
|
+
identity: {
|
|
1576
|
+
type: string;
|
|
1577
|
+
value: string;
|
|
1578
|
+
};
|
|
1579
|
+
};
|
|
1580
|
+
loser: {
|
|
1581
|
+
contactId: number;
|
|
1582
|
+
} | {
|
|
1583
|
+
identity: {
|
|
1584
|
+
type: string;
|
|
1585
|
+
value: string;
|
|
1586
|
+
};
|
|
1587
|
+
};
|
|
1588
|
+
reasonSummary?: string | null;
|
|
1589
|
+
now?: string | number;
|
|
1590
|
+
}, MergeContactsToolResult>;
|
|
1437
1591
|
|
|
1438
1592
|
type RecordEventToolInput = {
|
|
1439
1593
|
kind: "interaction";
|
|
@@ -1449,18 +1603,22 @@ type RecordEventToolInput = {
|
|
|
1449
1603
|
input: RecordTransactionInput;
|
|
1450
1604
|
};
|
|
1451
1605
|
type RecordEventToolResult = ToolResult<MutationToolData<EventRecord>>;
|
|
1452
|
-
declare function recordEventToolHandler(db: AffinityDb,
|
|
1453
|
-
declare const recordEventTool: AffinityToolDefinition<RecordEventToolInput
|
|
1606
|
+
declare function recordEventToolHandler(db: AffinityDb, rawInput: TimeInputs<RecordEventToolInput>): RecordEventToolResult;
|
|
1607
|
+
declare const recordEventTool: AffinityToolDefinition<TimeInputs<RecordEventToolInput>, RecordEventToolResult>;
|
|
1454
1608
|
|
|
1455
1609
|
type ReviewAffinityToolView = "contacts.list" | "contacts.duplicates" | "events.contact_journal" | "events.link_timeline" | "events.moments" | "commitments.open" | "links.owner" | "links.observed" | "links.progression_readiness" | "links.radar" | "dates.upcoming" | "graph.chart" | "merges.history" | "merges.dismissed";
|
|
1456
1610
|
interface ReviewAffinityToolInput {
|
|
1457
1611
|
view: ReviewAffinityToolView;
|
|
1612
|
+
now?: number;
|
|
1458
1613
|
contact?: ContactLocator;
|
|
1459
1614
|
link?: LinkLocator;
|
|
1460
1615
|
contactIds?: number[];
|
|
1461
1616
|
kind?: ContactKind | LinkKind;
|
|
1462
1617
|
lifecycleState?: ContactLifecycleState;
|
|
1463
1618
|
linkState?: LinkState;
|
|
1619
|
+
attribute?: string | string[];
|
|
1620
|
+
tag?: string | string[];
|
|
1621
|
+
includeLost?: boolean;
|
|
1464
1622
|
includeOwner?: boolean;
|
|
1465
1623
|
includeDormant?: boolean;
|
|
1466
1624
|
includeArchived?: boolean;
|
|
@@ -1486,8 +1644,53 @@ interface ReviewAffinityToolData {
|
|
|
1486
1644
|
chart?: AffinityChartRecord | undefined;
|
|
1487
1645
|
}
|
|
1488
1646
|
type ReviewAffinityToolResult = ToolResult<ReviewAffinityToolData>;
|
|
1489
|
-
declare function reviewAffinityToolHandler(db: AffinityDb,
|
|
1490
|
-
declare const reviewAffinityTool: AffinityToolDefinition<
|
|
1647
|
+
declare function reviewAffinityToolHandler(db: AffinityDb, rawInput: TimeInputs<ReviewAffinityToolInput>): ReviewAffinityToolResult;
|
|
1648
|
+
declare const reviewAffinityTool: AffinityToolDefinition<{
|
|
1649
|
+
view: ReviewAffinityToolView;
|
|
1650
|
+
now?: string | number;
|
|
1651
|
+
contact?: {
|
|
1652
|
+
contactId: number;
|
|
1653
|
+
} | {
|
|
1654
|
+
identity: {
|
|
1655
|
+
type: string;
|
|
1656
|
+
value: string;
|
|
1657
|
+
};
|
|
1658
|
+
};
|
|
1659
|
+
link?: {
|
|
1660
|
+
linkId: number;
|
|
1661
|
+
} | {
|
|
1662
|
+
endpoints: {
|
|
1663
|
+
fromContactId: number;
|
|
1664
|
+
toContactId: number;
|
|
1665
|
+
kind?: string | undefined | undefined;
|
|
1666
|
+
role?: string | null | undefined | undefined;
|
|
1667
|
+
isStructural?: boolean | undefined | undefined;
|
|
1668
|
+
};
|
|
1669
|
+
};
|
|
1670
|
+
contactIds?: readonly number[];
|
|
1671
|
+
kind?: ContactKind | LinkKind;
|
|
1672
|
+
lifecycleState?: ContactLifecycleState;
|
|
1673
|
+
linkState?: LinkState;
|
|
1674
|
+
attribute?: string | readonly string[];
|
|
1675
|
+
tag?: string | readonly string[];
|
|
1676
|
+
includeLost?: boolean;
|
|
1677
|
+
includeOwner?: boolean;
|
|
1678
|
+
includeDormant?: boolean;
|
|
1679
|
+
includeArchived?: boolean;
|
|
1680
|
+
includeObserved?: boolean;
|
|
1681
|
+
eventTypes?: readonly EventType[];
|
|
1682
|
+
momentKind?: EventMomentKind;
|
|
1683
|
+
commitmentType?: "promise" | "agreement";
|
|
1684
|
+
recurrenceKind?: EventRecurrenceKind;
|
|
1685
|
+
horizonDays?: number;
|
|
1686
|
+
exactOnly?: boolean;
|
|
1687
|
+
minScore?: number;
|
|
1688
|
+
includeDismissed?: boolean;
|
|
1689
|
+
since?: string | number;
|
|
1690
|
+
until?: string | number;
|
|
1691
|
+
limit?: number;
|
|
1692
|
+
offset?: number;
|
|
1693
|
+
}, ReviewAffinityToolResult>;
|
|
1491
1694
|
|
|
1492
1695
|
declare function toContactEntityRef(value: ContactCore | ContactListItem | ContactRow): ToolEntityRef;
|
|
1493
1696
|
declare function toContactListToolItem(value: ContactCore | ContactListItem | ContactRow): ToolListItem;
|
|
@@ -1506,6 +1709,9 @@ interface SearchAffinityToolInput {
|
|
|
1506
1709
|
query: string;
|
|
1507
1710
|
kind?: ContactKind;
|
|
1508
1711
|
lifecycleState?: ContactLifecycleState;
|
|
1712
|
+
attribute?: string | string[];
|
|
1713
|
+
tag?: string | string[];
|
|
1714
|
+
includeLost?: boolean;
|
|
1509
1715
|
includeOwner?: boolean;
|
|
1510
1716
|
includeDormant?: boolean;
|
|
1511
1717
|
limit?: number;
|
|
@@ -1517,12 +1723,305 @@ interface SearchAffinityToolData {
|
|
|
1517
1723
|
count: number;
|
|
1518
1724
|
}
|
|
1519
1725
|
type SearchAffinityToolResult = ToolResult<SearchAffinityToolData>;
|
|
1520
|
-
declare function searchAffinityToolHandler(db: AffinityDb,
|
|
1521
|
-
declare const searchAffinityTool: AffinityToolDefinition<
|
|
1726
|
+
declare function searchAffinityToolHandler(db: AffinityDb, rawInput: TimeInputs<SearchAffinityToolInput>): SearchAffinityToolResult;
|
|
1727
|
+
declare const searchAffinityTool: AffinityToolDefinition<{
|
|
1728
|
+
query: string;
|
|
1729
|
+
kind?: ContactKind;
|
|
1730
|
+
lifecycleState?: ContactLifecycleState;
|
|
1731
|
+
attribute?: string | readonly string[];
|
|
1732
|
+
tag?: string | readonly string[];
|
|
1733
|
+
includeLost?: boolean;
|
|
1734
|
+
includeOwner?: boolean;
|
|
1735
|
+
includeDormant?: boolean;
|
|
1736
|
+
limit?: number;
|
|
1737
|
+
offset?: number;
|
|
1738
|
+
}, SearchAffinityToolResult>;
|
|
1522
1739
|
|
|
1523
|
-
declare const affinityTools: (AffinityToolDefinition<InspectAffinityItemToolInput
|
|
1524
|
-
|
|
1525
|
-
|
|
1740
|
+
declare const affinityTools: (AffinityToolDefinition<TimeInputs<InspectAffinityItemToolInput>, InspectAffinityItemToolResult> | AffinityToolDefinition<TimeInputs<ManageAttributeToolInput>, ManageAttributeToolResult> | AffinityToolDefinition<TimeInputs<ManageCommitmentToolInput>, ManageCommitmentToolResult> | AffinityToolDefinition<TimeInputs<ManageContactToolInput>, ManageContactToolResult> | AffinityToolDefinition<{
|
|
1741
|
+
action: "dismiss" | "undismiss";
|
|
1742
|
+
left: {
|
|
1743
|
+
contactId: number;
|
|
1744
|
+
} | {
|
|
1745
|
+
identity: {
|
|
1746
|
+
type: string;
|
|
1747
|
+
value: string;
|
|
1748
|
+
};
|
|
1749
|
+
};
|
|
1750
|
+
right: {
|
|
1751
|
+
contactId: number;
|
|
1752
|
+
} | {
|
|
1753
|
+
identity: {
|
|
1754
|
+
type: string;
|
|
1755
|
+
value: string;
|
|
1756
|
+
};
|
|
1757
|
+
};
|
|
1758
|
+
reason?: string | null;
|
|
1759
|
+
}, ManageDuplicateDismissalToolResult> | AffinityToolDefinition<TimeInputs<ManageDateAnchorToolInput>, ManageDateAnchorToolResult> | AffinityToolDefinition<TimeInputs<ManageIdentityToolInput>, ManageIdentityToolResult> | AffinityToolDefinition<TimeInputs<ManageRelationshipToolInput>, ManageRelationshipToolResult> | AffinityToolDefinition<{
|
|
1760
|
+
winner: {
|
|
1761
|
+
contactId: number;
|
|
1762
|
+
} | {
|
|
1763
|
+
identity: {
|
|
1764
|
+
type: string;
|
|
1765
|
+
value: string;
|
|
1766
|
+
};
|
|
1767
|
+
};
|
|
1768
|
+
loser: {
|
|
1769
|
+
contactId: number;
|
|
1770
|
+
} | {
|
|
1771
|
+
identity: {
|
|
1772
|
+
type: string;
|
|
1773
|
+
value: string;
|
|
1774
|
+
};
|
|
1775
|
+
};
|
|
1776
|
+
reasonSummary?: string | null;
|
|
1777
|
+
now?: string | number;
|
|
1778
|
+
}, MergeContactsToolResult> | AffinityToolDefinition<TimeInputs<RecordEventToolInput>, RecordEventToolResult> | AffinityToolDefinition<{
|
|
1779
|
+
view: ReviewAffinityToolView;
|
|
1780
|
+
now?: string | number;
|
|
1781
|
+
contact?: {
|
|
1782
|
+
contactId: number;
|
|
1783
|
+
} | {
|
|
1784
|
+
identity: {
|
|
1785
|
+
type: string;
|
|
1786
|
+
value: string;
|
|
1787
|
+
};
|
|
1788
|
+
};
|
|
1789
|
+
link?: {
|
|
1790
|
+
linkId: number;
|
|
1791
|
+
} | {
|
|
1792
|
+
endpoints: {
|
|
1793
|
+
fromContactId: number;
|
|
1794
|
+
toContactId: number;
|
|
1795
|
+
kind?: string | undefined | undefined;
|
|
1796
|
+
role?: string | null | undefined | undefined;
|
|
1797
|
+
isStructural?: boolean | undefined | undefined;
|
|
1798
|
+
};
|
|
1799
|
+
};
|
|
1800
|
+
contactIds?: readonly number[];
|
|
1801
|
+
kind?: ContactKind | LinkKind;
|
|
1802
|
+
lifecycleState?: ContactLifecycleState;
|
|
1803
|
+
linkState?: LinkState;
|
|
1804
|
+
attribute?: string | readonly string[];
|
|
1805
|
+
tag?: string | readonly string[];
|
|
1806
|
+
includeLost?: boolean;
|
|
1807
|
+
includeOwner?: boolean;
|
|
1808
|
+
includeDormant?: boolean;
|
|
1809
|
+
includeArchived?: boolean;
|
|
1810
|
+
includeObserved?: boolean;
|
|
1811
|
+
eventTypes?: readonly EventType[];
|
|
1812
|
+
momentKind?: EventMomentKind;
|
|
1813
|
+
commitmentType?: "promise" | "agreement";
|
|
1814
|
+
recurrenceKind?: EventRecurrenceKind;
|
|
1815
|
+
horizonDays?: number;
|
|
1816
|
+
exactOnly?: boolean;
|
|
1817
|
+
minScore?: number;
|
|
1818
|
+
includeDismissed?: boolean;
|
|
1819
|
+
since?: string | number;
|
|
1820
|
+
until?: string | number;
|
|
1821
|
+
limit?: number;
|
|
1822
|
+
offset?: number;
|
|
1823
|
+
}, ReviewAffinityToolResult> | AffinityToolDefinition<{
|
|
1824
|
+
query: string;
|
|
1825
|
+
kind?: ContactKind;
|
|
1826
|
+
lifecycleState?: ContactLifecycleState;
|
|
1827
|
+
attribute?: string | readonly string[];
|
|
1828
|
+
tag?: string | readonly string[];
|
|
1829
|
+
includeLost?: boolean;
|
|
1830
|
+
includeOwner?: boolean;
|
|
1831
|
+
includeDormant?: boolean;
|
|
1832
|
+
limit?: number;
|
|
1833
|
+
offset?: number;
|
|
1834
|
+
}, SearchAffinityToolResult>)[];
|
|
1835
|
+
declare function listAffinityToolDefinitions(): (AffinityToolDefinition<TimeInputs<InspectAffinityItemToolInput>, InspectAffinityItemToolResult> | AffinityToolDefinition<TimeInputs<ManageAttributeToolInput>, ManageAttributeToolResult> | AffinityToolDefinition<TimeInputs<ManageCommitmentToolInput>, ManageCommitmentToolResult> | AffinityToolDefinition<TimeInputs<ManageContactToolInput>, ManageContactToolResult> | AffinityToolDefinition<{
|
|
1836
|
+
action: "dismiss" | "undismiss";
|
|
1837
|
+
left: {
|
|
1838
|
+
contactId: number;
|
|
1839
|
+
} | {
|
|
1840
|
+
identity: {
|
|
1841
|
+
type: string;
|
|
1842
|
+
value: string;
|
|
1843
|
+
};
|
|
1844
|
+
};
|
|
1845
|
+
right: {
|
|
1846
|
+
contactId: number;
|
|
1847
|
+
} | {
|
|
1848
|
+
identity: {
|
|
1849
|
+
type: string;
|
|
1850
|
+
value: string;
|
|
1851
|
+
};
|
|
1852
|
+
};
|
|
1853
|
+
reason?: string | null;
|
|
1854
|
+
}, ManageDuplicateDismissalToolResult> | AffinityToolDefinition<TimeInputs<ManageDateAnchorToolInput>, ManageDateAnchorToolResult> | AffinityToolDefinition<TimeInputs<ManageIdentityToolInput>, ManageIdentityToolResult> | AffinityToolDefinition<TimeInputs<ManageRelationshipToolInput>, ManageRelationshipToolResult> | AffinityToolDefinition<{
|
|
1855
|
+
winner: {
|
|
1856
|
+
contactId: number;
|
|
1857
|
+
} | {
|
|
1858
|
+
identity: {
|
|
1859
|
+
type: string;
|
|
1860
|
+
value: string;
|
|
1861
|
+
};
|
|
1862
|
+
};
|
|
1863
|
+
loser: {
|
|
1864
|
+
contactId: number;
|
|
1865
|
+
} | {
|
|
1866
|
+
identity: {
|
|
1867
|
+
type: string;
|
|
1868
|
+
value: string;
|
|
1869
|
+
};
|
|
1870
|
+
};
|
|
1871
|
+
reasonSummary?: string | null;
|
|
1872
|
+
now?: string | number;
|
|
1873
|
+
}, MergeContactsToolResult> | AffinityToolDefinition<TimeInputs<RecordEventToolInput>, RecordEventToolResult> | AffinityToolDefinition<{
|
|
1874
|
+
view: ReviewAffinityToolView;
|
|
1875
|
+
now?: string | number;
|
|
1876
|
+
contact?: {
|
|
1877
|
+
contactId: number;
|
|
1878
|
+
} | {
|
|
1879
|
+
identity: {
|
|
1880
|
+
type: string;
|
|
1881
|
+
value: string;
|
|
1882
|
+
};
|
|
1883
|
+
};
|
|
1884
|
+
link?: {
|
|
1885
|
+
linkId: number;
|
|
1886
|
+
} | {
|
|
1887
|
+
endpoints: {
|
|
1888
|
+
fromContactId: number;
|
|
1889
|
+
toContactId: number;
|
|
1890
|
+
kind?: string | undefined | undefined;
|
|
1891
|
+
role?: string | null | undefined | undefined;
|
|
1892
|
+
isStructural?: boolean | undefined | undefined;
|
|
1893
|
+
};
|
|
1894
|
+
};
|
|
1895
|
+
contactIds?: readonly number[];
|
|
1896
|
+
kind?: ContactKind | LinkKind;
|
|
1897
|
+
lifecycleState?: ContactLifecycleState;
|
|
1898
|
+
linkState?: LinkState;
|
|
1899
|
+
attribute?: string | readonly string[];
|
|
1900
|
+
tag?: string | readonly string[];
|
|
1901
|
+
includeLost?: boolean;
|
|
1902
|
+
includeOwner?: boolean;
|
|
1903
|
+
includeDormant?: boolean;
|
|
1904
|
+
includeArchived?: boolean;
|
|
1905
|
+
includeObserved?: boolean;
|
|
1906
|
+
eventTypes?: readonly EventType[];
|
|
1907
|
+
momentKind?: EventMomentKind;
|
|
1908
|
+
commitmentType?: "promise" | "agreement";
|
|
1909
|
+
recurrenceKind?: EventRecurrenceKind;
|
|
1910
|
+
horizonDays?: number;
|
|
1911
|
+
exactOnly?: boolean;
|
|
1912
|
+
minScore?: number;
|
|
1913
|
+
includeDismissed?: boolean;
|
|
1914
|
+
since?: string | number;
|
|
1915
|
+
until?: string | number;
|
|
1916
|
+
limit?: number;
|
|
1917
|
+
offset?: number;
|
|
1918
|
+
}, ReviewAffinityToolResult> | AffinityToolDefinition<{
|
|
1919
|
+
query: string;
|
|
1920
|
+
kind?: ContactKind;
|
|
1921
|
+
lifecycleState?: ContactLifecycleState;
|
|
1922
|
+
attribute?: string | readonly string[];
|
|
1923
|
+
tag?: string | readonly string[];
|
|
1924
|
+
includeLost?: boolean;
|
|
1925
|
+
includeOwner?: boolean;
|
|
1926
|
+
includeDormant?: boolean;
|
|
1927
|
+
limit?: number;
|
|
1928
|
+
offset?: number;
|
|
1929
|
+
}, SearchAffinityToolResult>)[];
|
|
1930
|
+
declare function getAffinityToolByName(name: string): AffinityToolDefinition<TimeInputs<InspectAffinityItemToolInput>, InspectAffinityItemToolResult> | AffinityToolDefinition<TimeInputs<ManageAttributeToolInput>, ManageAttributeToolResult> | AffinityToolDefinition<TimeInputs<ManageCommitmentToolInput>, ManageCommitmentToolResult> | AffinityToolDefinition<TimeInputs<ManageContactToolInput>, ManageContactToolResult> | AffinityToolDefinition<{
|
|
1931
|
+
action: "dismiss" | "undismiss";
|
|
1932
|
+
left: {
|
|
1933
|
+
contactId: number;
|
|
1934
|
+
} | {
|
|
1935
|
+
identity: {
|
|
1936
|
+
type: string;
|
|
1937
|
+
value: string;
|
|
1938
|
+
};
|
|
1939
|
+
};
|
|
1940
|
+
right: {
|
|
1941
|
+
contactId: number;
|
|
1942
|
+
} | {
|
|
1943
|
+
identity: {
|
|
1944
|
+
type: string;
|
|
1945
|
+
value: string;
|
|
1946
|
+
};
|
|
1947
|
+
};
|
|
1948
|
+
reason?: string | null;
|
|
1949
|
+
}, ManageDuplicateDismissalToolResult> | AffinityToolDefinition<TimeInputs<ManageDateAnchorToolInput>, ManageDateAnchorToolResult> | AffinityToolDefinition<TimeInputs<ManageIdentityToolInput>, ManageIdentityToolResult> | AffinityToolDefinition<TimeInputs<ManageRelationshipToolInput>, ManageRelationshipToolResult> | AffinityToolDefinition<{
|
|
1950
|
+
winner: {
|
|
1951
|
+
contactId: number;
|
|
1952
|
+
} | {
|
|
1953
|
+
identity: {
|
|
1954
|
+
type: string;
|
|
1955
|
+
value: string;
|
|
1956
|
+
};
|
|
1957
|
+
};
|
|
1958
|
+
loser: {
|
|
1959
|
+
contactId: number;
|
|
1960
|
+
} | {
|
|
1961
|
+
identity: {
|
|
1962
|
+
type: string;
|
|
1963
|
+
value: string;
|
|
1964
|
+
};
|
|
1965
|
+
};
|
|
1966
|
+
reasonSummary?: string | null;
|
|
1967
|
+
now?: string | number;
|
|
1968
|
+
}, MergeContactsToolResult> | AffinityToolDefinition<TimeInputs<RecordEventToolInput>, RecordEventToolResult> | AffinityToolDefinition<{
|
|
1969
|
+
view: ReviewAffinityToolView;
|
|
1970
|
+
now?: string | number;
|
|
1971
|
+
contact?: {
|
|
1972
|
+
contactId: number;
|
|
1973
|
+
} | {
|
|
1974
|
+
identity: {
|
|
1975
|
+
type: string;
|
|
1976
|
+
value: string;
|
|
1977
|
+
};
|
|
1978
|
+
};
|
|
1979
|
+
link?: {
|
|
1980
|
+
linkId: number;
|
|
1981
|
+
} | {
|
|
1982
|
+
endpoints: {
|
|
1983
|
+
fromContactId: number;
|
|
1984
|
+
toContactId: number;
|
|
1985
|
+
kind?: string | undefined | undefined;
|
|
1986
|
+
role?: string | null | undefined | undefined;
|
|
1987
|
+
isStructural?: boolean | undefined | undefined;
|
|
1988
|
+
};
|
|
1989
|
+
};
|
|
1990
|
+
contactIds?: readonly number[];
|
|
1991
|
+
kind?: ContactKind | LinkKind;
|
|
1992
|
+
lifecycleState?: ContactLifecycleState;
|
|
1993
|
+
linkState?: LinkState;
|
|
1994
|
+
attribute?: string | readonly string[];
|
|
1995
|
+
tag?: string | readonly string[];
|
|
1996
|
+
includeLost?: boolean;
|
|
1997
|
+
includeOwner?: boolean;
|
|
1998
|
+
includeDormant?: boolean;
|
|
1999
|
+
includeArchived?: boolean;
|
|
2000
|
+
includeObserved?: boolean;
|
|
2001
|
+
eventTypes?: readonly EventType[];
|
|
2002
|
+
momentKind?: EventMomentKind;
|
|
2003
|
+
commitmentType?: "promise" | "agreement";
|
|
2004
|
+
recurrenceKind?: EventRecurrenceKind;
|
|
2005
|
+
horizonDays?: number;
|
|
2006
|
+
exactOnly?: boolean;
|
|
2007
|
+
minScore?: number;
|
|
2008
|
+
includeDismissed?: boolean;
|
|
2009
|
+
since?: string | number;
|
|
2010
|
+
until?: string | number;
|
|
2011
|
+
limit?: number;
|
|
2012
|
+
offset?: number;
|
|
2013
|
+
}, ReviewAffinityToolResult> | AffinityToolDefinition<{
|
|
2014
|
+
query: string;
|
|
2015
|
+
kind?: ContactKind;
|
|
2016
|
+
lifecycleState?: ContactLifecycleState;
|
|
2017
|
+
attribute?: string | readonly string[];
|
|
2018
|
+
tag?: string | readonly string[];
|
|
2019
|
+
includeLost?: boolean;
|
|
2020
|
+
includeOwner?: boolean;
|
|
2021
|
+
includeDormant?: boolean;
|
|
2022
|
+
limit?: number;
|
|
2023
|
+
offset?: number;
|
|
2024
|
+
}, SearchAffinityToolResult> | null;
|
|
1526
2025
|
|
|
1527
2026
|
interface AffinityToolMapping {
|
|
1528
2027
|
source: string;
|
|
@@ -1614,6 +2113,7 @@ declare const index_nullableStringSchema: typeof nullableStringSchema;
|
|
|
1614
2113
|
declare const index_numberSchema: typeof numberSchema;
|
|
1615
2114
|
declare const index_objectSchema: typeof objectSchema;
|
|
1616
2115
|
declare const index_oneOfSchema: typeof oneOfSchema;
|
|
2116
|
+
declare const index_parseTimeInput: typeof parseTimeInput;
|
|
1617
2117
|
declare const index_recordEventTool: typeof recordEventTool;
|
|
1618
2118
|
declare const index_recordEventToolHandler: typeof recordEventToolHandler;
|
|
1619
2119
|
declare const index_recordEventToolName: typeof recordEventToolName;
|
|
@@ -1646,7 +2146,7 @@ declare const index_toolSuccess: typeof toolSuccess;
|
|
|
1646
2146
|
declare const index_toolWarning: typeof toolWarning;
|
|
1647
2147
|
declare const index_withToolHandling: typeof withToolHandling;
|
|
1648
2148
|
declare namespace index {
|
|
1649
|
-
export { type index_AffinityToolDefinition as AffinityToolDefinition, type index_AffinityToolMapping as AffinityToolMapping, type index_ContactLocator as ContactLocator, type index_JsonSchema as JsonSchema, type index_JsonSchemaType as JsonSchemaType, type index_LinkLocator as LinkLocator, type index_MutationToolData as MutationToolData, type index_ResolvedTarget as ResolvedTarget, type index_ToolBaseResult as ToolBaseResult, type index_ToolDefinitionRegistry as ToolDefinitionRegistry, type index_ToolEntityKind as ToolEntityKind, type index_ToolEntityRef as ToolEntityRef, type index_ToolFailure as ToolFailure, type index_ToolInputDescriptions as ToolInputDescriptions, type index_ToolListItem as ToolListItem, type index_ToolNeedsClarification as ToolNeedsClarification, type index_ToolNextStepHint as ToolNextStepHint, type index_ToolOutcomeKind as ToolOutcomeKind, type index_ToolOutputDescription as ToolOutputDescription, type index_ToolResult as ToolResult, type index_ToolSideEffects as ToolSideEffects, type index_ToolSuccess as ToolSuccess, type index_ToolWarning as ToolWarning, index_affinityToolMappings as affinityToolMappings, index_affinityTools as affinityTools, index_arraySchema as arraySchema, index_booleanSchema as booleanSchema, index_defineAffinityTool as defineAffinityTool, index_enumSchema as enumSchema, index_getAffinityToolByName as getAffinityToolByName, index_inspectAffinityItemTool as inspectAffinityItemTool, index_inspectAffinityItemToolHandler as inspectAffinityItemToolHandler, index_inspectAffinityItemToolName as inspectAffinityItemToolName, index_integerSchema as integerSchema, index_listAffinityToolDefinitions as listAffinityToolDefinitions, index_literalSchema as literalSchema, index_manageAttributeTool as manageAttributeTool, index_manageAttributeToolHandler as manageAttributeToolHandler, index_manageAttributeToolName as manageAttributeToolName, index_manageCommitmentTool as manageCommitmentTool, index_manageCommitmentToolHandler as manageCommitmentToolHandler, index_manageCommitmentToolName as manageCommitmentToolName, index_manageContactTool as manageContactTool, index_manageContactToolHandler as manageContactToolHandler, index_manageContactToolName as manageContactToolName, index_manageDateAnchorTool as manageDateAnchorTool, index_manageDateAnchorToolHandler as manageDateAnchorToolHandler, index_manageDateAnchorToolName as manageDateAnchorToolName, index_manageDuplicateDismissalTool as manageDuplicateDismissalTool, index_manageDuplicateDismissalToolHandler as manageDuplicateDismissalToolHandler, index_manageDuplicateDismissalToolName as manageDuplicateDismissalToolName, index_manageIdentityTool as manageIdentityTool, index_manageIdentityToolHandler as manageIdentityToolHandler, index_manageIdentityToolName as manageIdentityToolName, index_manageRelationshipTool as manageRelationshipTool, index_manageRelationshipToolHandler as manageRelationshipToolHandler, index_manageRelationshipToolName as manageRelationshipToolName, index_mapErrorToToolFailure as mapErrorToToolFailure, index_mergeContactsTool as mergeContactsTool, index_mergeContactsToolHandler as mergeContactsToolHandler, index_mergeContactsToolName as mergeContactsToolName, index_mutationToolResult as mutationToolResult, index_nullableStringSchema as nullableStringSchema, index_numberSchema as numberSchema, index_objectSchema as objectSchema, index_oneOfSchema as oneOfSchema, index_recordEventTool as recordEventTool, index_recordEventToolHandler as recordEventToolHandler, index_recordEventToolName as recordEventToolName, index_resolveContactLocator as resolveContactLocator, index_resolveLinkLocator as resolveLinkLocator, index_reviewAffinityTool as reviewAffinityTool, index_reviewAffinityToolHandler as reviewAffinityToolHandler, index_reviewAffinityToolName as reviewAffinityToolName, index_searchAffinityTool as searchAffinityTool, index_searchAffinityToolHandler as searchAffinityToolHandler, index_searchAffinityToolName as searchAffinityToolName, index_stringSchema as stringSchema, index_summarizeCount as summarizeCount, index_toAttributeEntityRef as toAttributeEntityRef, index_toAttributeListToolItem as toAttributeListToolItem, index_toContactEntityRef as toContactEntityRef, index_toContactListToolItem as toContactListToolItem, index_toEventEntityRef as toEventEntityRef, index_toEventListToolItem as toEventListToolItem, index_toIdentityEntityRef as toIdentityEntityRef, index_toIdentityListToolItem as toIdentityListToolItem, index_toLinkEntityRef as toLinkEntityRef, index_toLinkListToolItem as toLinkListToolItem, index_toMutationRefEntity as toMutationRefEntity, index_toReceiptEntityRefs as toReceiptEntityRefs, index_toolFailure as toolFailure, index_toolNeedsClarification as toolNeedsClarification, index_toolNoOp as toolNoOp, index_toolSuccess as toolSuccess, index_toolWarning as toolWarning, index_withToolHandling as withToolHandling };
|
|
2149
|
+
export { type index_AffinityToolDefinition as AffinityToolDefinition, type index_AffinityToolMapping as AffinityToolMapping, type index_ContactLocator as ContactLocator, type index_JsonSchema as JsonSchema, type index_JsonSchemaType as JsonSchemaType, type index_LinkLocator as LinkLocator, type index_MutationToolData as MutationToolData, type index_ResolvedTarget as ResolvedTarget, type index_ToolBaseResult as ToolBaseResult, type index_ToolDefinitionRegistry as ToolDefinitionRegistry, type index_ToolEntityKind as ToolEntityKind, type index_ToolEntityRef as ToolEntityRef, type index_ToolFailure as ToolFailure, type index_ToolInputDescriptions as ToolInputDescriptions, type index_ToolListItem as ToolListItem, type index_ToolNeedsClarification as ToolNeedsClarification, type index_ToolNextStepHint as ToolNextStepHint, type index_ToolOutcomeKind as ToolOutcomeKind, type index_ToolOutputDescription as ToolOutputDescription, type index_ToolResult as ToolResult, type index_ToolSideEffects as ToolSideEffects, type index_ToolSuccess as ToolSuccess, type index_ToolWarning as ToolWarning, index_affinityToolMappings as affinityToolMappings, index_affinityTools as affinityTools, index_arraySchema as arraySchema, index_booleanSchema as booleanSchema, index_defineAffinityTool as defineAffinityTool, index_enumSchema as enumSchema, index_getAffinityToolByName as getAffinityToolByName, index_inspectAffinityItemTool as inspectAffinityItemTool, index_inspectAffinityItemToolHandler as inspectAffinityItemToolHandler, index_inspectAffinityItemToolName as inspectAffinityItemToolName, index_integerSchema as integerSchema, index_listAffinityToolDefinitions as listAffinityToolDefinitions, index_literalSchema as literalSchema, index_manageAttributeTool as manageAttributeTool, index_manageAttributeToolHandler as manageAttributeToolHandler, index_manageAttributeToolName as manageAttributeToolName, index_manageCommitmentTool as manageCommitmentTool, index_manageCommitmentToolHandler as manageCommitmentToolHandler, index_manageCommitmentToolName as manageCommitmentToolName, index_manageContactTool as manageContactTool, index_manageContactToolHandler as manageContactToolHandler, index_manageContactToolName as manageContactToolName, index_manageDateAnchorTool as manageDateAnchorTool, index_manageDateAnchorToolHandler as manageDateAnchorToolHandler, index_manageDateAnchorToolName as manageDateAnchorToolName, index_manageDuplicateDismissalTool as manageDuplicateDismissalTool, index_manageDuplicateDismissalToolHandler as manageDuplicateDismissalToolHandler, index_manageDuplicateDismissalToolName as manageDuplicateDismissalToolName, index_manageIdentityTool as manageIdentityTool, index_manageIdentityToolHandler as manageIdentityToolHandler, index_manageIdentityToolName as manageIdentityToolName, index_manageRelationshipTool as manageRelationshipTool, index_manageRelationshipToolHandler as manageRelationshipToolHandler, index_manageRelationshipToolName as manageRelationshipToolName, index_mapErrorToToolFailure as mapErrorToToolFailure, index_mergeContactsTool as mergeContactsTool, index_mergeContactsToolHandler as mergeContactsToolHandler, index_mergeContactsToolName as mergeContactsToolName, index_mutationToolResult as mutationToolResult, index_nullableStringSchema as nullableStringSchema, index_numberSchema as numberSchema, index_objectSchema as objectSchema, index_oneOfSchema as oneOfSchema, index_parseTimeInput as parseTimeInput, index_recordEventTool as recordEventTool, index_recordEventToolHandler as recordEventToolHandler, index_recordEventToolName as recordEventToolName, index_resolveContactLocator as resolveContactLocator, index_resolveLinkLocator as resolveLinkLocator, index_reviewAffinityTool as reviewAffinityTool, index_reviewAffinityToolHandler as reviewAffinityToolHandler, index_reviewAffinityToolName as reviewAffinityToolName, index_searchAffinityTool as searchAffinityTool, index_searchAffinityToolHandler as searchAffinityToolHandler, index_searchAffinityToolName as searchAffinityToolName, index_stringSchema as stringSchema, index_summarizeCount as summarizeCount, index_toAttributeEntityRef as toAttributeEntityRef, index_toAttributeListToolItem as toAttributeListToolItem, index_toContactEntityRef as toContactEntityRef, index_toContactListToolItem as toContactListToolItem, index_toEventEntityRef as toEventEntityRef, index_toEventListToolItem as toEventListToolItem, index_toIdentityEntityRef as toIdentityEntityRef, index_toIdentityListToolItem as toIdentityListToolItem, index_toLinkEntityRef as toLinkEntityRef, index_toLinkListToolItem as toLinkListToolItem, index_toMutationRefEntity as toMutationRefEntity, index_toReceiptEntityRefs as toReceiptEntityRefs, index_toolFailure as toolFailure, index_toolNeedsClarification as toolNeedsClarification, index_toolNoOp as toolNoOp, index_toolSuccess as toolSuccess, index_toolWarning as toolWarning, index_withToolHandling as withToolHandling };
|
|
1650
2150
|
}
|
|
1651
2151
|
|
|
1652
2152
|
declare function addIdentity(db: AffinityDb, contactId: number, input: AddIdentityInput): IdentityMutationReceipt;
|
|
@@ -1666,6 +2166,7 @@ declare function unsetAttribute(db: AffinityDb, target: AttributeTarget, name: s
|
|
|
1666
2166
|
declare const write_addDateAnchor: typeof addDateAnchor;
|
|
1667
2167
|
declare const write_addIdentity: typeof addIdentity;
|
|
1668
2168
|
declare const write_createContact: typeof createContact;
|
|
2169
|
+
declare const write_deleteContact: typeof deleteContact;
|
|
1669
2170
|
declare const write_dismissDuplicate: typeof dismissDuplicate;
|
|
1670
2171
|
declare const write_mergeContacts: typeof mergeContacts;
|
|
1671
2172
|
declare const write_overrideLinkState: typeof overrideLinkState;
|
|
@@ -1691,7 +2192,7 @@ declare const write_undismissDuplicate: typeof undismissDuplicate;
|
|
|
1691
2192
|
declare const write_unsetAttribute: typeof unsetAttribute;
|
|
1692
2193
|
declare const write_verifyIdentity: typeof verifyIdentity;
|
|
1693
2194
|
declare namespace write {
|
|
1694
|
-
export { write_addDateAnchor as addDateAnchor, write_addIdentity as addIdentity, write_createContact as createContact, write_dismissDuplicate as dismissDuplicate, write_mergeContacts as mergeContacts, write_overrideLinkState as overrideLinkState, write_recordCommitment as recordCommitment, write_recordInteraction as recordInteraction, write_recordMilestone as recordMilestone, write_recordObservation as recordObservation, write_recordTransaction as recordTransaction, write_removeDateAnchor as removeDateAnchor, write_removeIdentity as removeIdentity, write_removeStructuralTie as removeStructuralTie, write_replaceAttributes as replaceAttributes, write_resolveCommitment as resolveCommitment, write_reviseBond as reviseBond, write_reviseContact as reviseContact, write_reviseDateAnchor as reviseDateAnchor, write_reviseIdentity as reviseIdentity, write_seedSocialLink as seedSocialLink, write_setAttribute as setAttribute, write_setContactLifecycle as setContactLifecycle, write_setStructuralTie as setStructuralTie, write_undismissDuplicate as undismissDuplicate, write_unsetAttribute as unsetAttribute, write_verifyIdentity as verifyIdentity };
|
|
2195
|
+
export { write_addDateAnchor as addDateAnchor, write_addIdentity as addIdentity, write_createContact as createContact, write_deleteContact as deleteContact, write_dismissDuplicate as dismissDuplicate, write_mergeContacts as mergeContacts, write_overrideLinkState as overrideLinkState, write_recordCommitment as recordCommitment, write_recordInteraction as recordInteraction, write_recordMilestone as recordMilestone, write_recordObservation as recordObservation, write_recordTransaction as recordTransaction, write_removeDateAnchor as removeDateAnchor, write_removeIdentity as removeIdentity, write_removeStructuralTie as removeStructuralTie, write_replaceAttributes as replaceAttributes, write_resolveCommitment as resolveCommitment, write_reviseBond as reviseBond, write_reviseContact as reviseContact, write_reviseDateAnchor as reviseDateAnchor, write_reviseIdentity as reviseIdentity, write_seedSocialLink as seedSocialLink, write_setAttribute as setAttribute, write_setContactLifecycle as setContactLifecycle, write_setStructuralTie as setStructuralTie, write_undismissDuplicate as undismissDuplicate, write_unsetAttribute as unsetAttribute, write_verifyIdentity as verifyIdentity };
|
|
1695
2196
|
}
|
|
1696
2197
|
|
|
1697
2198
|
export { AffinityConflictError, AffinityError, type AffinityErrorCode, AffinityInvariantError, AffinityMergeError, AffinityNotFoundError, type AffinitySkill, type AffinitySkillRegistry, type AffinitySoul, type AffinitySoulTrait, AffinityStateError, AffinityValidationError, affinitySkills, affinitySoul, affinitySoulEssence, affinitySoulTraits, bootstrapAndColdStartSkill, captureTransactionsAndCommercialEventsSkill, defineAffinitySkill, errors, getAffinitySkillByName, identifyAndLocateContactsSkill, importHistoryWithoutFakingEvidenceSkill, initAffinityTables, isAffinityError, listAffinitySkills, managePromisesAndAgreementsSkill, manageRecurringDatesAndRemindersSkill, modelStructureOrgsAndHouseholdsSkill, read, reconcileDuplicatesAndMergeSafelySkill, recordDirectEvidenceWellSkill, recordObservationsAndReferralsSkill, renderAffinitySoulPromptFoundation, reviewRadarProgressionAndGraphSkill, index$1 as skills, soul, index as tools, types, write };
|