synomem 0.6.11 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +92 -0
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +22 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +164 -3
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +2 -0
- package/dist/errors.js.map +1 -1
- package/dist/import.d.ts +83 -0
- package/dist/import.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +110 -2
- package/dist/mcp/index.js.map +1 -1
- package/dist/ports/repository.d.ts +10 -1
- package/dist/ports/repository.d.ts.map +1 -1
- package/dist/projections.d.ts.map +1 -1
- package/dist/projections.js +6 -0
- package/dist/projections.js.map +1 -1
- package/dist/remote.d.ts +10 -1
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +9 -0
- package/dist/remote.js.map +1 -1
- package/dist/schemas.d.ts +130 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +77 -0
- package/dist/schemas.js.map +1 -1
- package/dist/service.d.ts +14 -1
- package/dist/service.d.ts.map +1 -1
- package/dist/storage.d.ts +12 -1
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +136 -19
- package/dist/storage.js.map +1 -1
- package/dist/types.d.ts +72 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli.ts +153 -0
- package/src/client.ts +184 -2
- package/src/errors.ts +2 -0
- package/src/index.ts +8 -0
- package/src/mcp/index.ts +140 -1
- package/src/ports/repository.ts +8 -0
- package/src/projections.ts +6 -0
- package/src/remote.ts +45 -0
- package/src/schemas.ts +85 -0
- package/src/service.ts +18 -0
- package/src/storage.ts +167 -13
- package/src/types.ts +82 -2
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,OAAO,EAA0B,MAAM,WAAW,CAAC;AAkB5D,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AAOvB,OAAO,EAA2B,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAA0C,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIhG,OAAO,EAA4C,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE9F,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AASrB,OAAO,KAAK,EACV,aAAa,EASd,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAkB,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,eAAe;IAC9B,yEAAyE;IACzE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,sBAAsB,CAAC,EAAE,CAAC,OAAO,EAAE;QACjC,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,aAAa,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;QAClB,eA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gD,EAChE,YAAY,GAAE,eAAoB,EAClC,IAAI,GAAE,MAAM,EAAiB,GAC5B,OAAO,CAkyFT;AAED,wBAAsB,MAAM,CAC1B,IAAI,WAAe,EACnB,EAAE,GAAE,KAAiB,EACrB,cAAc,GAAE,qBAAgD,EAChE,YAAY,GAAE,eAAoB,GACjC,OAAO,CAAC,MAAM,CAAC,CAqBjB"}
|
package/dist/cli.js
CHANGED
|
@@ -125,6 +125,7 @@ function itemListInput(options) {
|
|
|
125
125
|
...(typeof options.actor === 'string' ? { actorId: options.actor } : {}),
|
|
126
126
|
...(typeof options.status === 'string' ? { status: options.status } : {}),
|
|
127
127
|
...(typeof options.tag === 'string' ? { tag: options.tag } : {}),
|
|
128
|
+
...(typeof options.topic === 'string' ? { topicId: options.topic } : {}),
|
|
128
129
|
...(typeof options.visibility === 'string'
|
|
129
130
|
? { visibility: options.visibility }
|
|
130
131
|
: {}),
|
|
@@ -200,6 +201,7 @@ function addListOptions(command) {
|
|
|
200
201
|
.option('--actor <id>')
|
|
201
202
|
.option('--actor-kind <kind>', 'human, agent, or system')
|
|
202
203
|
.option('--tag <tag>')
|
|
204
|
+
.option('--topic <id>', 'only records carrying this topic')
|
|
203
205
|
.option('--status <status>', 'acknowledged or unacknowledged')
|
|
204
206
|
.option('--visibility <visibility>', 'private, local, or public')
|
|
205
207
|
.addOption(new Option('--revoked <state>').choices(['include', 'only', 'exclude']).default('include'))
|
|
@@ -215,6 +217,7 @@ function listInput(options) {
|
|
|
215
217
|
...(options.actor ? { actorId: options.actor } : {}),
|
|
216
218
|
...(options.actorKind ? { actorKind: options.actorKind } : {}),
|
|
217
219
|
...(options.tag ? { tag: options.tag } : {}),
|
|
220
|
+
...(options.topic ? { topicId: options.topic } : {}),
|
|
218
221
|
...(options.status ? { status: options.status } : {}),
|
|
219
222
|
...(options.visibility
|
|
220
223
|
? { visibility: options.visibility }
|
|
@@ -1081,6 +1084,82 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1081
1084
|
const profile = await withClient(global.home, defaultActor(env, 'system', 'cli', global.actor), (client) => client.agents.restore(agent));
|
|
1082
1085
|
output(io, global.json, profile, `Restored ${profile.handle} (${profile.id})`);
|
|
1083
1086
|
});
|
|
1087
|
+
const topicCommand = program
|
|
1088
|
+
.command('topic')
|
|
1089
|
+
.description('Create and manage topics — a stable, reusable subject any record can carry');
|
|
1090
|
+
topicCommand
|
|
1091
|
+
.command('create <display-name>')
|
|
1092
|
+
.description('Create a topic. Any actor may create one.')
|
|
1093
|
+
.option('--alias <name>', 'alias (repeatable)', collect, [])
|
|
1094
|
+
.action(async (displayName, options, command) => {
|
|
1095
|
+
const global = globals(command);
|
|
1096
|
+
const topic = await withClient(global.home, defaultActor(env, 'system', 'cli', global.actor), (client) => client.topics.create({
|
|
1097
|
+
displayName,
|
|
1098
|
+
...(options.alias.length ? { aliases: options.alias } : {}),
|
|
1099
|
+
}));
|
|
1100
|
+
output(io, global.json, topic, `Created ${topic.displayName}\n\nTopic ID: ${topic.id}`);
|
|
1101
|
+
});
|
|
1102
|
+
topicCommand
|
|
1103
|
+
.command('list')
|
|
1104
|
+
.description('List known topics')
|
|
1105
|
+
.option('--status <status>', 'active or archived')
|
|
1106
|
+
.action(async (options, command) => {
|
|
1107
|
+
const global = globals(command);
|
|
1108
|
+
const topics = await withClient(global.home, defaultActor(env, 'system', 'cli', global.actor), (client) => client.topics.list(options.status ? { status: options.status } : {}));
|
|
1109
|
+
const human = topics.length
|
|
1110
|
+
? topics
|
|
1111
|
+
.map((topic) => `${topic.displayName}${topic.status === 'archived' ? ' [archived]' : ''}${topic.aliases?.length ? ` aliases: ${topic.aliases.join(', ')}` : ''}\n ${topic.id}`)
|
|
1112
|
+
.join('\n')
|
|
1113
|
+
: 'No topics yet.';
|
|
1114
|
+
output(io, global.json, { topics }, human);
|
|
1115
|
+
});
|
|
1116
|
+
topicCommand
|
|
1117
|
+
.command('show <id>')
|
|
1118
|
+
.description('Show one topic, resolving aliases')
|
|
1119
|
+
.action(async (id, _options, command) => {
|
|
1120
|
+
const global = globals(command);
|
|
1121
|
+
const topic = await withClient(global.home, defaultActor(env, 'system', 'cli', global.actor), (client) => client.topics.get(id));
|
|
1122
|
+
output(io, global.json, topic, `${topic.displayName}\n\nTopic ID: ${topic.id}\nStatus: ${topic.status}\nAliases: ${topic.aliases?.join(', ') ?? 'none'}`);
|
|
1123
|
+
});
|
|
1124
|
+
topicCommand
|
|
1125
|
+
.command('resolve <name>')
|
|
1126
|
+
.description('Resolve a name or alias to one topic, or list the candidates')
|
|
1127
|
+
.action(async (name, _options, command) => {
|
|
1128
|
+
const global = globals(command);
|
|
1129
|
+
const resolution = await withClient(global.home, defaultActor(env, 'system', 'cli', global.actor), (client) => client.topics.resolve(name));
|
|
1130
|
+
const human = resolution.match
|
|
1131
|
+
? `${resolution.match.displayName} (${resolution.match.id})`
|
|
1132
|
+
: resolution.candidates.length
|
|
1133
|
+
? `"${resolution.query}" is ambiguous. Candidates:\n${resolution.candidates
|
|
1134
|
+
.map((topic) => ` ${topic.id} ${topic.displayName}`)
|
|
1135
|
+
.join('\n')}`
|
|
1136
|
+
: `No topic answers to "${resolution.query}".`;
|
|
1137
|
+
output(io, global.json, resolution, human);
|
|
1138
|
+
});
|
|
1139
|
+
topicCommand
|
|
1140
|
+
.command('rename <id> <display-name>')
|
|
1141
|
+
.description("Change a topic's display name. Its ID never changes.")
|
|
1142
|
+
.action(async (id, displayName, _options, command) => {
|
|
1143
|
+
const global = globals(command);
|
|
1144
|
+
const topic = await withClient(global.home, defaultActor(env, 'system', 'cli', global.actor), (client) => client.topics.update(id, { displayName }));
|
|
1145
|
+
output(io, global.json, topic, `Renamed to ${topic.displayName}\nTopic ID: ${topic.id} (unchanged)`);
|
|
1146
|
+
});
|
|
1147
|
+
topicCommand
|
|
1148
|
+
.command('archive <id>')
|
|
1149
|
+
.description('Stop a topic being attached to new records, keeping the ones it already has')
|
|
1150
|
+
.action(async (id, _options, command) => {
|
|
1151
|
+
const global = globals(command);
|
|
1152
|
+
const topic = await withClient(global.home, defaultActor(env, 'system', 'cli', global.actor), (client) => client.topics.archive(id));
|
|
1153
|
+
output(io, global.json, topic, `Archived ${topic.displayName} (${topic.id})`);
|
|
1154
|
+
});
|
|
1155
|
+
topicCommand
|
|
1156
|
+
.command('restore <id>')
|
|
1157
|
+
.description('Let an archived topic be attached to new records again')
|
|
1158
|
+
.action(async (id, _options, command) => {
|
|
1159
|
+
const global = globals(command);
|
|
1160
|
+
const topic = await withClient(global.home, defaultActor(env, 'system', 'cli', global.actor), (client) => client.topics.restore(id));
|
|
1161
|
+
output(io, global.json, topic, `Restored ${topic.displayName} (${topic.id})`);
|
|
1162
|
+
});
|
|
1084
1163
|
const skillCommand = program
|
|
1085
1164
|
.command('skill')
|
|
1086
1165
|
.description('Install and maintain the packaged agent skill');
|
|
@@ -1321,6 +1400,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1321
1400
|
.requiredOption('--title <title>')
|
|
1322
1401
|
.requiredOption('--body <body>')
|
|
1323
1402
|
.option('--tag <tag>', 'repeatable', collect, [])
|
|
1403
|
+
.option('--topic <id>', 'topic ID (repeatable)', collect, [])
|
|
1324
1404
|
.option('--reply-to <post-id>')
|
|
1325
1405
|
.action(async (options, command) => {
|
|
1326
1406
|
const global = globals(command);
|
|
@@ -1328,6 +1408,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1328
1408
|
title: options.title,
|
|
1329
1409
|
body: options.body,
|
|
1330
1410
|
...(options.tag.length ? { tags: options.tag } : {}),
|
|
1411
|
+
...(options.topic.length ? { topicIds: options.topic } : {}),
|
|
1331
1412
|
...(options.replyTo ? { replyTo: options.replyTo } : {}),
|
|
1332
1413
|
}));
|
|
1333
1414
|
output(io, global.json, result, `Published ${result.record.event.id}`);
|
|
@@ -1421,6 +1502,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1421
1502
|
.requiredOption('--title <title>')
|
|
1422
1503
|
.requiredOption('--reason <reason>')
|
|
1423
1504
|
.option('--tag <tag>', 'tag (repeatable)', collect, [])
|
|
1505
|
+
.option('--topic <id>', 'topic ID (repeatable)', collect, [])
|
|
1424
1506
|
.option('--evidence <kind:value>', 'sanitized evidence (repeatable)', collect, [])
|
|
1425
1507
|
.option('--visibility <visibility>', 'private, local, or public', 'workspace')
|
|
1426
1508
|
.option('--idempotency-key <key>')
|
|
@@ -1432,6 +1514,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1432
1514
|
reason: options.reason,
|
|
1433
1515
|
visibility: options.visibility,
|
|
1434
1516
|
...(options.tag.length ? { tags: options.tag } : {}),
|
|
1517
|
+
...(options.topic.length ? { topicIds: options.topic } : {}),
|
|
1435
1518
|
...(options.evidence.length ? { evidence: options.evidence.map(parseEvidence) } : {}),
|
|
1436
1519
|
...(options.idempotencyKey ? { idempotencyKey: options.idempotencyKey } : {}),
|
|
1437
1520
|
}));
|
|
@@ -1473,6 +1556,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1473
1556
|
.option('--participant <agent>')
|
|
1474
1557
|
.option('--actor <id>')
|
|
1475
1558
|
.option('--tag <tag>')
|
|
1559
|
+
.option('--topic <id>', 'only records carrying this topic')
|
|
1476
1560
|
.option('--status <status>')
|
|
1477
1561
|
.option('--visibility <visibility>', 'private, workspace, or public')
|
|
1478
1562
|
.option('--limit <number>', 'maximum results (default 10, maximum 50)', '10')
|
|
@@ -1514,6 +1598,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1514
1598
|
.requiredOption('--subject <subject>')
|
|
1515
1599
|
.requiredOption('--body <body>')
|
|
1516
1600
|
.option('--tag <tag>', 'tag (repeatable)', collect, [])
|
|
1601
|
+
.option('--topic <id>', 'topic ID (repeatable)', collect, [])
|
|
1517
1602
|
.option('--visibility <visibility>', 'private, workspace, or public', 'workspace')
|
|
1518
1603
|
.option('--idempotency-key <key>')
|
|
1519
1604
|
.action(async (recipient, options, command) => {
|
|
@@ -1524,6 +1609,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1524
1609
|
body: options.body,
|
|
1525
1610
|
visibility: options.visibility,
|
|
1526
1611
|
...(options.tag.length ? { tags: options.tag } : {}),
|
|
1612
|
+
...(options.topic.length ? { topicIds: options.topic } : {}),
|
|
1527
1613
|
...(options.idempotencyKey ? { idempotencyKey: options.idempotencyKey } : {}),
|
|
1528
1614
|
}));
|
|
1529
1615
|
output(io, global.json, result, `${result.deduplicated ? 'Found existing' : 'Sent'} memo to ${result.record.event.recipientDisplayName}\nSubject: ${result.record.event.subject}\nID: ${result.record.event.id}`);
|
|
@@ -1575,6 +1661,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1575
1661
|
.requiredOption('--title <title>')
|
|
1576
1662
|
.requiredOption('--body <body>')
|
|
1577
1663
|
.option('--tag <tag>', 'tag (repeatable)', collect, [])
|
|
1664
|
+
.option('--topic <id>', 'topic ID (repeatable)', collect, [])
|
|
1578
1665
|
.option('--idempotency-key <key>')
|
|
1579
1666
|
.action(async (options, command) => {
|
|
1580
1667
|
const global = globals(command);
|
|
@@ -1583,6 +1670,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1583
1670
|
title: options.title,
|
|
1584
1671
|
body: options.body,
|
|
1585
1672
|
...(options.tag.length ? { tags: options.tag } : {}),
|
|
1673
|
+
...(options.topic.length ? { topicIds: options.topic } : {}),
|
|
1586
1674
|
...(options.idempotencyKey ? { idempotencyKey: options.idempotencyKey } : {}),
|
|
1587
1675
|
}));
|
|
1588
1676
|
output(io, global.json, result, `${result.deduplicated ? 'Found existing' : 'Created'} note\nTitle: ${result.record.current.title}\nID: ${result.record.event.id}`);
|
|
@@ -1654,6 +1742,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1654
1742
|
.option('--due-at <datetime>')
|
|
1655
1743
|
.option('--time-zone <iana-zone>')
|
|
1656
1744
|
.option('--tag <tag>', 'tag (repeatable)', collect, [])
|
|
1745
|
+
.option('--topic <id>', 'topic ID (repeatable)', collect, [])
|
|
1657
1746
|
.option('--idempotency-key <key>')
|
|
1658
1747
|
.action(async (options, command) => {
|
|
1659
1748
|
const global = globals(command);
|
|
@@ -1663,6 +1752,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1663
1752
|
priority: Number(options.priority),
|
|
1664
1753
|
...((due) => (due ? { due } : {}))(taskDue(options)),
|
|
1665
1754
|
...(options.tag.length ? { tags: options.tag } : {}),
|
|
1755
|
+
...(options.topic.length ? { topicIds: options.topic } : {}),
|
|
1666
1756
|
...(options.idempotencyKey ? { idempotencyKey: options.idempotencyKey } : {}),
|
|
1667
1757
|
}));
|
|
1668
1758
|
output(io, global.json, result, `${result.deduplicated ? 'Found existing' : 'Created'} private todo\nTitle: ${result.record.current.title}\nID: ${result.record.event.id}`);
|
|
@@ -1744,6 +1834,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1744
1834
|
.option('--due-at <datetime>')
|
|
1745
1835
|
.option('--time-zone <iana-zone>')
|
|
1746
1836
|
.option('--tag <tag>', 'tag (repeatable)', collect, [])
|
|
1837
|
+
.option('--topic <id>', 'topic ID (repeatable)', collect, [])
|
|
1747
1838
|
.option('--visibility <visibility>', 'private, workspace, or public', 'workspace')
|
|
1748
1839
|
.option('--idempotency-key <key>')
|
|
1749
1840
|
.action(async (assignee, options, command) => {
|
|
@@ -1755,6 +1846,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
|
|
|
1755
1846
|
priority: Number(options.priority),
|
|
1756
1847
|
...((due) => (due ? { due } : {}))(taskDue(options)),
|
|
1757
1848
|
...(options.tag.length ? { tags: options.tag } : {}),
|
|
1849
|
+
...(options.topic.length ? { topicIds: options.topic } : {}),
|
|
1758
1850
|
visibility: options.visibility,
|
|
1759
1851
|
...(options.idempotencyKey ? { idempotencyKey: options.idempotencyKey } : {}),
|
|
1760
1852
|
}));
|