@aopslabs/aops 0.3.8 → 0.3.10
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/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/SKILL.md +3 -4
- package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/references/agentspace/SKILL.md +4 -4
- package/agent-assets-release/agent-assets/core/070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5/files/references/chatv3/SKILL.md +59 -0
- package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/references/collaborative-work/SKILL.md +10 -13
- package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/references/discuss/SKILL.md +2 -2
- package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/references/docman/SKILL.md +6 -0
- package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/references/projectman/SKILL.md +6 -0
- package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/references/working-disciplines/SKILL.md +1 -1
- package/agent-assets-release/agent-assets/core/070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5/files/user-guides/agentspace.md +198 -0
- package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/user-guides/aops-cli.md +25 -24
- package/agent-assets-release/agent-assets/core/070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5/files/user-guides/chatv3.md +98 -0
- package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/user-guides/docman.md +16 -0
- package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/user-guides/projectman.md +7 -0
- package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/user-guides/working-disciplines.md +2 -2
- package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/manifest.json +31 -36
- package/agent-assets-release/agent-assets/inventory.json +5 -5
- package/agent-assets-release/agent-assets/projection.json +1 -1
- package/agent-assets-release/agent-assets-release.json +64 -69
- package/agent-assets-release/agent-assets-release.sigstore.json +26 -25
- package/assets/agent-assets/core/SKILL.md +3 -4
- package/assets/agent-assets/core/references/agentspace/SKILL.md +4 -4
- package/assets/agent-assets/core/references/chatv3/SKILL.md +36 -26
- package/assets/agent-assets/core/references/collaborative-work/SKILL.md +10 -13
- package/assets/agent-assets/core/references/discuss/SKILL.md +2 -2
- package/assets/agent-assets/core/references/docman/SKILL.md +6 -0
- package/assets/agent-assets/core/references/projectman/SKILL.md +6 -0
- package/assets/agent-assets/core/references/working-disciplines/SKILL.md +1 -1
- package/assets/agent-assets/core/user-guides/agentspace.md +135 -1035
- package/assets/agent-assets/core/user-guides/aops-cli.md +25 -24
- package/assets/agent-assets/core/user-guides/chatv3.md +82 -97
- package/assets/agent-assets/core/user-guides/docman.md +16 -0
- package/assets/agent-assets/core/user-guides/projectman.md +7 -0
- package/assets/agent-assets/core/user-guides/working-disciplines.md +2 -2
- package/dist/commands/chatv3.js +81 -46
- package/dist/commands/doc.js +4 -4
- package/dist/commands/pm/index.js +2 -5
- package/dist/commands/pm/projectman.js +36 -95
- package/dist/lib/agent-assets/native-fs.js +2 -2
- package/dist/lib/agent-assets/release-input.js +7 -1
- package/dist/lib/setup-official-catalog-bridge.js +14 -4
- package/dist/main.js +2 -3
- package/dist/seeds/agents-md.js +1 -1
- package/dist/utils/chatv3-cursor.js +41 -0
- package/dist/utils/chatv3-session-store.js +166 -36
- package/launchers/aops-cockpit.sh +0 -0
- package/launchers/aops-server.sh +0 -0
- package/native/bin/darwin-arm64/aops-agent-assets-fs +0 -0
- package/native/bin/darwin-x64/aops-agent-assets-fs +0 -0
- package/native/bin/linux-arm64/aops-agent-assets-fs +0 -0
- package/native/bin/linux-x64/aops-agent-assets-fs +0 -0
- package/native/bin/win32-x64/aops-agent-assets-fs.exe +0 -0
- package/native/manifest.json +49 -0
- package/native/qualifications/win32-x64.json +23 -0
- package/native/tui/darwin-arm64/aops-tui +0 -0
- package/native/tui/win32-x64/aops-tui.exe +0 -0
- package/package.json +6 -4
- package/agent-assets-release/agent-assets/core/0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706/files/references/chatv3/SKILL.md +0 -49
- package/agent-assets-release/agent-assets/core/0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706/files/references/hosted-chat/SKILL.md +0 -64
- package/agent-assets-release/agent-assets/core/0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706/files/user-guides/agentspace.md +0 -1098
- package/agent-assets-release/agent-assets/core/0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706/files/user-guides/chatv3.md +0 -113
- package/assets/agent-assets/core/references/hosted-chat/SKILL.md +0 -64
- package/dist/commands/chat.js +0 -1363
- /package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/references/aops-cli-core/SKILL.md +0 -0
- /package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/references/mission/SKILL.md +0 -0
- /package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/references/sys/SKILL.md +0 -0
- /package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/references/view/SKILL.md +0 -0
- /package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/user-guides/agent-assets.md +0 -0
- /package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/user-guides/aops-system.md +0 -0
- /package/agent-assets-release/agent-assets/core/{0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706 → 070b0d3126c645890845791b67157fdd9f43a482fda66583e84fb159b30689a5}/files/user-guides/sys.md +0 -0
package/dist/commands/chatv3.js
CHANGED
|
@@ -3,9 +3,10 @@ import { Command } from 'commander';
|
|
|
3
3
|
import { logSuccess } from '@aopslabs/xf-cli-ui';
|
|
4
4
|
import { Chatv3Client, deriveKek, importEpochKey, MemoryKeyStore, parseInvite, unwrapEpochKey, } from '@aopslabs/domain-product-client-chatv3';
|
|
5
5
|
import { resolveCliApiBaseUrl } from '../utils/api.js';
|
|
6
|
+
import { planChatv3SendCursorAdvance } from '../utils/chatv3-cursor.js';
|
|
6
7
|
import { applyCommonOptions, compactPayload, normalizeNonEmpty } from '../utils/command.js';
|
|
7
8
|
import { buildOperatorCookbook } from '../utils/hosted-sugar.js';
|
|
8
|
-
import { deleteChatv3Session, getChatv3SessionRecord, listChatv3SessionRecords, loadChatv3Session, resolveChatv3SessionStorePath, saveChatv3Session, summarizeChatv3Session, } from '../utils/chatv3-session-store.js';
|
|
9
|
+
import { deleteChatv3Session, getChatv3SessionRecord, listChatv3SessionRecords, loadChatv3Session, resolveChatv3SessionStorePath, resolveChatv3SessionOwner, saveChatv3Session, summarizeChatv3Session, } from '../utils/chatv3-session-store.js';
|
|
9
10
|
const AGENT_BOOTSTRAP_STEPS = [
|
|
10
11
|
'Read channel and active-room rules before acting.',
|
|
11
12
|
'Use chat for coordination and wake; use PM for task/review truth.',
|
|
@@ -58,15 +59,16 @@ function sleep(ms) {
|
|
|
58
59
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
59
60
|
}
|
|
60
61
|
export function guardChatv3UnknownSubcommand(argv) {
|
|
61
|
-
const index = argv.
|
|
62
|
+
const index = argv.findIndex((value) => value === 'chat' || value === 'chatv3');
|
|
62
63
|
if (index < 0)
|
|
63
64
|
return;
|
|
65
|
+
const commandName = argv[index];
|
|
64
66
|
const top = argv[index + 1];
|
|
65
67
|
if (!top || top.startsWith('-'))
|
|
66
68
|
return;
|
|
67
69
|
const nested = CHATV3_COMMAND_TREE[top];
|
|
68
70
|
if (nested === undefined) {
|
|
69
|
-
throw new Error(`unknown
|
|
71
|
+
throw new Error(`unknown ${commandName} command '${top}'. Run aops ${commandName} --help.`);
|
|
70
72
|
}
|
|
71
73
|
if (nested === null)
|
|
72
74
|
return;
|
|
@@ -76,7 +78,7 @@ export function guardChatv3UnknownSubcommand(argv) {
|
|
|
76
78
|
if (child === 'help')
|
|
77
79
|
return;
|
|
78
80
|
if (!nested.has(child)) {
|
|
79
|
-
throw new Error(`unknown
|
|
81
|
+
throw new Error(`unknown ${commandName} ${top} command '${child}'. Run aops ${commandName} ${top} --help.`);
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
84
|
function readTextInput(value, label) {
|
|
@@ -415,7 +417,8 @@ function summarizeChannelDeleteTarget(channel) {
|
|
|
415
417
|
function buildEnvelope(params) {
|
|
416
418
|
const resolvedContext = compactPayload({
|
|
417
419
|
serverBaseUrl: params.serverBaseUrl,
|
|
418
|
-
storePath: resolveChatv3SessionStorePath(params.options.storePath),
|
|
420
|
+
storePath: resolveChatv3SessionStorePath(params.options.storePath, params.options.sessionOwner),
|
|
421
|
+
sessionOwner: resolveChatv3SessionOwner(params.options.sessionOwner),
|
|
419
422
|
});
|
|
420
423
|
if (params.options.json) {
|
|
421
424
|
console.log(JSON.stringify(compactPayload({
|
|
@@ -494,11 +497,17 @@ async function persistRuntimeSnapshot(runtime, activeRoomId) {
|
|
|
494
497
|
rooms: runtime.rooms.map(roomToSessionRoom),
|
|
495
498
|
createdAt: runtime.record.createdAt,
|
|
496
499
|
};
|
|
497
|
-
runtime.record = await saveChatv3Session(plain, runtime.secrets, {
|
|
500
|
+
runtime.record = await saveChatv3Session(plain, runtime.secrets, {
|
|
501
|
+
storePath: runtime.storePath,
|
|
502
|
+
owner: runtime.sessionOwner,
|
|
503
|
+
});
|
|
498
504
|
}
|
|
499
505
|
async function loadRuntime(options, sessionId) {
|
|
500
|
-
const storePath = resolveChatv3SessionStorePath(options.storePath);
|
|
501
|
-
const loaded = await loadChatv3Session(sessionId, {
|
|
506
|
+
const storePath = resolveChatv3SessionStorePath(options.storePath, options.sessionOwner);
|
|
507
|
+
const loaded = await loadChatv3Session(sessionId, {
|
|
508
|
+
storePath: options.storePath,
|
|
509
|
+
owner: options.sessionOwner,
|
|
510
|
+
});
|
|
502
511
|
const serverBaseUrl = normalizeNonEmpty(options.apiBaseUrl) ?? loaded.record.serverBaseUrl;
|
|
503
512
|
const keyStore = new MemoryKeyStore();
|
|
504
513
|
if (loaded.secrets.wrapSecret) {
|
|
@@ -532,6 +541,7 @@ async function loadRuntime(options, sessionId) {
|
|
|
532
541
|
channel,
|
|
533
542
|
rooms,
|
|
534
543
|
storePath,
|
|
544
|
+
sessionOwner: options.sessionOwner,
|
|
535
545
|
};
|
|
536
546
|
await hydrateStoredServerEpochKeys(runtime);
|
|
537
547
|
if (channel.encryptionMode === 'server-encrypted') {
|
|
@@ -580,8 +590,8 @@ async function loadRuntimeForChannelGuard(options) {
|
|
|
580
590
|
}
|
|
581
591
|
if (!channelSelector)
|
|
582
592
|
throw new Error('Provide --session <id> or --channel <channel-id-or-slug>.');
|
|
583
|
-
const storePath = resolveChatv3SessionStorePath(options.storePath);
|
|
584
|
-
const matches = (await listChatv3SessionRecords({ storePath }))
|
|
593
|
+
const storePath = resolveChatv3SessionStorePath(options.storePath, options.sessionOwner);
|
|
594
|
+
const matches = (await listChatv3SessionRecords({ storePath, owner: options.sessionOwner }))
|
|
585
595
|
.filter((record) => channelMatchesSelector(record.channel, channelSelector));
|
|
586
596
|
if (matches.length === 0)
|
|
587
597
|
throw new Error(`No local ChatV3 session found for channel ${channelSelector}. Provide --session <id>.`);
|
|
@@ -656,10 +666,10 @@ export async function runChatv3ChannelCreate(options = {}) {
|
|
|
656
666
|
const spaceSlug = resolveSpaceSlug(options.space);
|
|
657
667
|
const mode = normalizeChannelMode(options.mode);
|
|
658
668
|
const serverBaseUrl = resolveChatv3ServerBaseUrl(options);
|
|
659
|
-
const storePath = resolveChatv3SessionStorePath(options.storePath);
|
|
669
|
+
const storePath = resolveChatv3SessionStorePath(options.storePath, options.sessionOwner);
|
|
660
670
|
const explicitSessionId = normalizeNonEmpty(options.session);
|
|
661
671
|
if (options.saveSession && explicitSessionId && options.force !== true) {
|
|
662
|
-
const existing = await getChatv3SessionRecord(explicitSessionId, { storePath });
|
|
672
|
+
const existing = await getChatv3SessionRecord(explicitSessionId, { storePath, owner: options.sessionOwner });
|
|
663
673
|
if (existing) {
|
|
664
674
|
throw new Error(`Refusing to overwrite existing ChatV3 session "${explicitSessionId}" bound to channel ${existing.channel.slug} (${existing.channel.id}). Rerun with --force to replace it.`);
|
|
665
675
|
}
|
|
@@ -683,7 +693,7 @@ export async function runChatv3ChannelCreate(options = {}) {
|
|
|
683
693
|
let record = null;
|
|
684
694
|
if (options.saveSession) {
|
|
685
695
|
if (options.force !== true) {
|
|
686
|
-
const existing = await getChatv3SessionRecord(sessionId, { storePath });
|
|
696
|
+
const existing = await getChatv3SessionRecord(sessionId, { storePath, owner: options.sessionOwner });
|
|
687
697
|
if (existing) {
|
|
688
698
|
throw new Error(`Refusing to overwrite ChatV3 session "${sessionId}" bound to channel ${existing.channel.slug} (${existing.channel.id}). Rerun with --force to replace it.`);
|
|
689
699
|
}
|
|
@@ -712,7 +722,7 @@ export async function runChatv3ChannelCreate(options = {}) {
|
|
|
712
722
|
memberToken,
|
|
713
723
|
wrapSecret: parsedInvite.mode === 'server-encrypted' ? undefined : parsedInvite.wrapSecret,
|
|
714
724
|
epochKeys,
|
|
715
|
-
}, { storePath });
|
|
725
|
+
}, { storePath, owner: options.sessionOwner });
|
|
716
726
|
record = summarizeChatv3Session(saved);
|
|
717
727
|
}
|
|
718
728
|
const channelForGuidance = {
|
|
@@ -850,9 +860,9 @@ export async function runChatv3Join(invite, options = {}) {
|
|
|
850
860
|
throw new Error('Provide --handle <agent-handle>.');
|
|
851
861
|
const serverBaseUrl = normalizeNonEmpty(options.apiBaseUrl) ?? parsed.serverBaseUrl;
|
|
852
862
|
const sessionId = sessionIdFor(handle, parsed.channelId, options.session);
|
|
853
|
-
const storePath = resolveChatv3SessionStorePath(options.storePath);
|
|
863
|
+
const storePath = resolveChatv3SessionStorePath(options.storePath, options.sessionOwner);
|
|
854
864
|
if (options.saveSession && options.force !== true) {
|
|
855
|
-
const existing = await getChatv3SessionRecord(sessionId, { storePath });
|
|
865
|
+
const existing = await getChatv3SessionRecord(sessionId, { storePath, owner: options.sessionOwner });
|
|
856
866
|
if (existing?.channel.id === parsed.channelId) {
|
|
857
867
|
buildEnvelope({
|
|
858
868
|
options,
|
|
@@ -928,7 +938,7 @@ export async function runChatv3Join(invite, options = {}) {
|
|
|
928
938
|
memberToken,
|
|
929
939
|
wrapSecret: parsed.mode === 'server-encrypted' ? undefined : parsed.wrapSecret,
|
|
930
940
|
epochKeys,
|
|
931
|
-
}, { storePath });
|
|
941
|
+
}, { storePath, owner: options.sessionOwner });
|
|
932
942
|
record = summarizeChatv3Session(saved);
|
|
933
943
|
}
|
|
934
944
|
buildEnvelope({
|
|
@@ -960,12 +970,22 @@ export async function runChatv3Send(messageArg, options = {}) {
|
|
|
960
970
|
const text = readTextInput(normalizeNonEmpty(options.text) ?? messageArg, '<message> or --text');
|
|
961
971
|
const runtime = await loadRuntime(options, sessionId);
|
|
962
972
|
const room = resolveRoom(runtime, options.room);
|
|
973
|
+
const receiptMatches = options.markDelivered || options.markRead
|
|
974
|
+
? (await runtime.client.getReceipts(room.id).catch(() => [])).filter((receipt) => receipt.handle === runtime.record.handle)
|
|
975
|
+
: [];
|
|
976
|
+
const receiptBeforeSend = receiptMatches.length === 1 ? receiptMatches[0] : undefined;
|
|
963
977
|
const sent = await runtime.client.sendText(room, text, normalizeNonEmpty(options.kind) ?? 'message');
|
|
978
|
+
const cursorAdvance = planChatv3SendCursorAdvance({
|
|
979
|
+
sentSeq: sent.seq,
|
|
980
|
+
snapshot: receiptBeforeSend,
|
|
981
|
+
markDelivered: options.markDelivered === true,
|
|
982
|
+
markRead: options.markRead === true,
|
|
983
|
+
});
|
|
964
984
|
let delivered = null;
|
|
965
985
|
let read = null;
|
|
966
|
-
if (
|
|
986
|
+
if (cursorAdvance.delivered.safe)
|
|
967
987
|
delivered = await runtime.client.markDelivered(room.id, sent.seq);
|
|
968
|
-
if (
|
|
988
|
+
if (cursorAdvance.read.safe)
|
|
969
989
|
read = await runtime.client.markRead(room.id, sent.seq);
|
|
970
990
|
await persistRuntimeSnapshot(runtime, room.id);
|
|
971
991
|
buildEnvelope({
|
|
@@ -985,6 +1005,7 @@ export async function runChatv3Send(messageArg, options = {}) {
|
|
|
985
1005
|
message: sent,
|
|
986
1006
|
delivered,
|
|
987
1007
|
read,
|
|
1008
|
+
cursorAdvance,
|
|
988
1009
|
guidance: buildAgentGuidance({ channel: runtime.channel, rooms: runtime.rooms }),
|
|
989
1010
|
}),
|
|
990
1011
|
});
|
|
@@ -1412,7 +1433,10 @@ export async function runChatv3Leave(options = {}) {
|
|
|
1412
1433
|
if (!self)
|
|
1413
1434
|
throw new Error(`Active member for handle ${runtime.record.handle} not found.`);
|
|
1414
1435
|
const member = await runtime.client.updateMember(self.id, { status: 'removed' });
|
|
1415
|
-
const forgotten = options.keepSession === true ? false : await deleteChatv3Session(sessionId, {
|
|
1436
|
+
const forgotten = options.keepSession === true ? false : await deleteChatv3Session(sessionId, {
|
|
1437
|
+
storePath: runtime.storePath,
|
|
1438
|
+
owner: runtime.sessionOwner,
|
|
1439
|
+
});
|
|
1416
1440
|
buildEnvelope({
|
|
1417
1441
|
options,
|
|
1418
1442
|
command: 'chatv3.leave',
|
|
@@ -1427,7 +1451,10 @@ export async function runChatv3Leave(options = {}) {
|
|
|
1427
1451
|
});
|
|
1428
1452
|
}
|
|
1429
1453
|
export async function runChatv3SessionList(options = {}) {
|
|
1430
|
-
const sessions = await listChatv3SessionRecords({
|
|
1454
|
+
const sessions = await listChatv3SessionRecords({
|
|
1455
|
+
storePath: options.storePath,
|
|
1456
|
+
owner: options.sessionOwner,
|
|
1457
|
+
});
|
|
1431
1458
|
buildEnvelope({
|
|
1432
1459
|
options,
|
|
1433
1460
|
command: 'chatv3.session.list',
|
|
@@ -1442,7 +1469,10 @@ export async function runChatv3SessionGet(options = {}) {
|
|
|
1442
1469
|
const sessionId = normalizeNonEmpty(options.session);
|
|
1443
1470
|
if (!sessionId)
|
|
1444
1471
|
throw new Error('Provide --session <id>.');
|
|
1445
|
-
const record = await getChatv3SessionRecord(sessionId, {
|
|
1472
|
+
const record = await getChatv3SessionRecord(sessionId, {
|
|
1473
|
+
storePath: options.storePath,
|
|
1474
|
+
owner: options.sessionOwner,
|
|
1475
|
+
});
|
|
1446
1476
|
if (!record)
|
|
1447
1477
|
throw new Error(`ChatV3 session not found: ${sessionId}`);
|
|
1448
1478
|
buildEnvelope({
|
|
@@ -1470,7 +1500,10 @@ export async function runChatv3SessionForget(options = {}) {
|
|
|
1470
1500
|
const sessionId = normalizeNonEmpty(options.session);
|
|
1471
1501
|
if (!sessionId)
|
|
1472
1502
|
throw new Error('Provide --session <id>.');
|
|
1473
|
-
const deleted = await deleteChatv3Session(sessionId, {
|
|
1503
|
+
const deleted = await deleteChatv3Session(sessionId, {
|
|
1504
|
+
storePath: options.storePath,
|
|
1505
|
+
owner: options.sessionOwner,
|
|
1506
|
+
});
|
|
1474
1507
|
buildEnvelope({
|
|
1475
1508
|
options,
|
|
1476
1509
|
command: 'chatv3.session.forget',
|
|
@@ -1480,11 +1513,13 @@ export async function runChatv3SessionForget(options = {}) {
|
|
|
1480
1513
|
});
|
|
1481
1514
|
}
|
|
1482
1515
|
function applyChatv3Options(cmd) {
|
|
1483
|
-
return applyCommonOptions(cmd
|
|
1516
|
+
return applyCommonOptions(cmd
|
|
1517
|
+
.option('--store-path <path>', 'Session store path override (default: agent-owned path under ~/.aops/chatv3/)')
|
|
1518
|
+
.option('--session-owner <id>', 'Explicit local agent owner id (default: AOPS_CHATV3_SESSION_OWNER or detected agent session)'), { withAuth: false });
|
|
1484
1519
|
}
|
|
1485
|
-
export function makeChatv3Command() {
|
|
1486
|
-
const cmd = new Command(
|
|
1487
|
-
.description('ChatV3 encrypted
|
|
1520
|
+
export function makeChatv3Command(commandName = 'chat') {
|
|
1521
|
+
const cmd = new Command(commandName)
|
|
1522
|
+
.description('ChatV3 encrypted channels, rooms, agent sessions, coordination, and foreground listening');
|
|
1488
1523
|
applyChatv3Options(cmd.command('join')
|
|
1489
1524
|
.argument('<invite>', 'chv3://join/... invite string')
|
|
1490
1525
|
.requiredOption('--handle <handle>', 'Agent handle to join with')
|
|
@@ -1646,27 +1681,27 @@ export function makeChatv3Command() {
|
|
|
1646
1681
|
});
|
|
1647
1682
|
cmd.addHelpText('afterAll', buildOperatorCookbook({
|
|
1648
1683
|
examples: [
|
|
1649
|
-
'aops
|
|
1650
|
-
'aops
|
|
1651
|
-
'aops
|
|
1652
|
-
'aops
|
|
1653
|
-
'aops
|
|
1654
|
-
'aops
|
|
1655
|
-
'aops
|
|
1656
|
-
'aops
|
|
1657
|
-
'aops
|
|
1658
|
-
'aops
|
|
1659
|
-
'aops
|
|
1660
|
-
'aops
|
|
1661
|
-
'aops
|
|
1662
|
-
'aops
|
|
1663
|
-
'aops
|
|
1664
|
-
'aops
|
|
1665
|
-
'aops
|
|
1666
|
-
'aops
|
|
1684
|
+
'aops chat channel create --title "Round 2" --handle codex --space default --mode server-encrypted --save-session --json',
|
|
1685
|
+
'aops chat channel delete --channel <id-or-slug> --confirm-slug <slug> --json',
|
|
1686
|
+
'aops chat channel purge-before --before 2026-07-01T00:00:00.000Z --json',
|
|
1687
|
+
'aops chat channel purge-before --before 2026-07-01T00:00:00.000Z --confirm --json',
|
|
1688
|
+
'aops chat channels --space default --status active --json',
|
|
1689
|
+
'aops chat join "<invite>" --handle codex --session codex --save-session --json',
|
|
1690
|
+
'aops chat send --session codex --room general "Hazirim." --mark-delivered --mark-read --json',
|
|
1691
|
+
'aops chat read --session codex --room general --after-seq 0 --mark-delivered --mark-read --json',
|
|
1692
|
+
'aops chat listen --session codex --room general --after-seq 12 --timeout-sec 60 --json',
|
|
1693
|
+
'aops chat binding add --session codex --room general --binding-type projectman.review-request --ref-id <rr-id> --title "Slice review" --json',
|
|
1694
|
+
'aops chat binding list --session codex --room general --json',
|
|
1695
|
+
'aops chat room brief --session codex --room general --for claude --json',
|
|
1696
|
+
'aops chat room summary --session codex --room general --after-seq 40 --json',
|
|
1697
|
+
'aops chat member list --session codex --json',
|
|
1698
|
+
'aops chat member remove --session codex --channel <channel-id> --member <member-id> --json',
|
|
1699
|
+
'aops chat presence set --session codex --room general --state working --note "reviewing RR" --json',
|
|
1700
|
+
'aops chat leave --session codex --json',
|
|
1701
|
+
'aops chat session list --json',
|
|
1667
1702
|
],
|
|
1668
1703
|
notes: [
|
|
1669
|
-
'`aops
|
|
1704
|
+
'`aops chat` is the canonical ChatV3 channel/room surface; `aops chatv3` remains a compatibility alias.',
|
|
1670
1705
|
'Join/send/read/session JSON includes result.guidance with channel/room rules plus agent bootstrap steps from the dedicated guidanceMarkdown field.',
|
|
1671
1706
|
'listen exits 0 when messages are found and 22 on timeout. read/listen always include messages:[], messageCount, latestSeq, and caughtUp.',
|
|
1672
1707
|
'binding add/list/remove stores loose channel/room refs only; room brief includes refs and cursors.',
|
package/dist/commands/doc.js
CHANGED
|
@@ -79,12 +79,12 @@ function resolveTextField(explicit, seed, key) {
|
|
|
79
79
|
const seeded = seed[key];
|
|
80
80
|
return typeof seeded === 'string' ? seeded : undefined;
|
|
81
81
|
}
|
|
82
|
-
function validatePageVersionStatus(value) {
|
|
82
|
+
export function validatePageVersionStatus(value) {
|
|
83
83
|
const normalized = normalizeNonEmpty(value)?.toLowerCase();
|
|
84
|
-
if (normalized === 'draft' || normalized === '
|
|
84
|
+
if (normalized === 'draft' || normalized === 'published' || normalized === 'archived') {
|
|
85
85
|
return normalized;
|
|
86
86
|
}
|
|
87
|
-
throw new Error('Page version status must be draft,
|
|
87
|
+
throw new Error('Page version status must be draft, published, or archived.');
|
|
88
88
|
}
|
|
89
89
|
function extractId(value) {
|
|
90
90
|
return normalizeNonEmpty(value);
|
|
@@ -5144,7 +5144,7 @@ export function makeDocCommand() {
|
|
|
5144
5144
|
.description('Update page-version metadata; content changes must use doc page draft-save')
|
|
5145
5145
|
.option('--id <id>', 'Page version id')
|
|
5146
5146
|
.option('--input <json>', 'JSON object or @file.json with update fields')
|
|
5147
|
-
.option('--status <value>', 'Page version status: draft,
|
|
5147
|
+
.option('--status <value>', 'Page version status: draft, published, archived')).action(async (options) => {
|
|
5148
5148
|
await runDocPageVersionUpdate(options);
|
|
5149
5149
|
}));
|
|
5150
5150
|
const link = cmd.command('link').description('Docman structure linking commands');
|
|
@@ -533,9 +533,7 @@ function addReviewRequestCommands(cmd) {
|
|
|
533
533
|
.option('--requested-by <id>', 'Requesting agent/operator id')
|
|
534
534
|
.option('--target-agent <id>', 'Target reviewer agent id')
|
|
535
535
|
.option('--target-slot <slot>', 'Target reviewer role slot')
|
|
536
|
-
.option('--tag <value>', 'Repeatable review-request tag', collectRepeatedOption, [])
|
|
537
|
-
.option('--notify-room <room-id>', 'Best-effort: after the RR is created (--apply only), post a "REVIEW READY" wake into this hosted chat room. Requires --ping-from. Failure does not fail the command.')
|
|
538
|
-
.option('--ping-from <agent-id>', 'Agent id the --notify-room wake message is posted as (required when --notify-room is set)'), { destructive: false }).action(async (options) => {
|
|
536
|
+
.option('--tag <value>', 'Repeatable review-request tag', collectRepeatedOption, []), { destructive: false }).action(async (options) => {
|
|
539
537
|
await runPmReviewRequestCreate(options);
|
|
540
538
|
}));
|
|
541
539
|
applyPmContextOptions(applyWriteOptions(rr
|
|
@@ -584,10 +582,9 @@ function addReviewRequestCommands(cmd) {
|
|
|
584
582
|
function addHandoffCommands(cmd) {
|
|
585
583
|
applyPmContextOptions(cmd
|
|
586
584
|
.command('resume')
|
|
587
|
-
.description('Composed paste-ready resume brief: active sprint windows, review queue for an agent, open issues/feedback, durable memory
|
|
585
|
+
.description('Composed paste-ready resume brief: active sprint windows, review queue for an agent, open issues/feedback, and durable memory')
|
|
588
586
|
.requiredOption('--for <agent-id>', 'Agent the brief is for')
|
|
589
587
|
.option('--limit <count>', 'Max rows per section', (value) => Number.parseInt(String(value), 10))
|
|
590
|
-
.option('--with-chat', 'Include hosted chat unread summary (single hosted call; degrades gracefully when the server is unavailable)')
|
|
591
588
|
.action(async (options) => {
|
|
592
589
|
await runPmResumeBrief(options);
|
|
593
590
|
}));
|
|
@@ -5537,11 +5537,6 @@ export async function runPmReviewRequestCreate(options = {}) {
|
|
|
5537
5537
|
const title = normalizeNonEmpty(options.title);
|
|
5538
5538
|
if (!title)
|
|
5539
5539
|
throw new Error('Missing required --title.');
|
|
5540
|
-
const notifyRoom = normalizeNonEmpty(options.notifyRoom);
|
|
5541
|
-
const pingFrom = normalizeNonEmpty(options.pingFrom);
|
|
5542
|
-
if (notifyRoom && !pingFrom) {
|
|
5543
|
-
throw new Error('--notify-room requires --ping-from <agent-id> (the agent the wake message is posted as).');
|
|
5544
|
-
}
|
|
5545
5540
|
const execution = await prepareExecution(options);
|
|
5546
5541
|
if (!execution)
|
|
5547
5542
|
return;
|
|
@@ -5616,57 +5611,12 @@ export async function runPmReviewRequestCreate(options = {}) {
|
|
|
5616
5611
|
toolId: 'projectman.review-request.create',
|
|
5617
5612
|
input,
|
|
5618
5613
|
});
|
|
5619
|
-
let reviewPing;
|
|
5620
|
-
if (notifyRoom) {
|
|
5621
|
-
const created = unwrapResultData(unwrapHostedToolResult(payload)) ?? {};
|
|
5622
|
-
const rrId = normalizeNonEmpty(created.id) ?? normalizeNonEmpty(created.localId);
|
|
5623
|
-
const rrTitle = normalizeNonEmpty(created.title) ?? title;
|
|
5624
|
-
const rrScope = normalizeNonEmpty(created.reviewScope) ?? normalizeNonEmpty(options.reviewScope) ?? '—';
|
|
5625
|
-
const scopeId = resolveOwnerScopeIdFromBinding(execution.resolvedContext);
|
|
5626
|
-
const wakeText = `REVIEW READY — RR ${rrId ?? '(unknown)'}: ${rrTitle}. Scope: ${rrScope}. ` +
|
|
5627
|
-
`Read: aops-cli pm review-request get --id ${rrId ?? '<rr-id>'} --json`;
|
|
5628
|
-
try {
|
|
5629
|
-
const apiState = await requireApiState(options);
|
|
5630
|
-
if (!apiState) {
|
|
5631
|
-
reviewPing = { roomId: notifyRoom, status: 'failed', error: 'No API state (authenticate / configure host first).' };
|
|
5632
|
-
}
|
|
5633
|
-
else if (!scopeId) {
|
|
5634
|
-
reviewPing = { roomId: notifyRoom, status: 'failed', error: 'No scopeId resolved for the chat message; bind project context or pass --project-id.' };
|
|
5635
|
-
}
|
|
5636
|
-
else {
|
|
5637
|
-
const pingPayload = await invokeHostedToolWithApiState(apiState, {
|
|
5638
|
-
...execution.gatewayOptions,
|
|
5639
|
-
toolId: 'agentspace.chat-message.send',
|
|
5640
|
-
input: {
|
|
5641
|
-
data: compactPayload({
|
|
5642
|
-
scopeId,
|
|
5643
|
-
roomId: notifyRoom,
|
|
5644
|
-
authorAgentId: pingFrom,
|
|
5645
|
-
text: wakeText,
|
|
5646
|
-
}),
|
|
5647
|
-
},
|
|
5648
|
-
apply: true,
|
|
5649
|
-
});
|
|
5650
|
-
const sent = unwrapResultData(unwrapHostedToolResult(pingPayload)) ?? {};
|
|
5651
|
-
const messageSeq = typeof sent.seq === 'number' ? sent.seq : undefined;
|
|
5652
|
-
reviewPing = compactPayload({ roomId: notifyRoom, status: 'sent', messageSeq });
|
|
5653
|
-
}
|
|
5654
|
-
}
|
|
5655
|
-
catch (error) {
|
|
5656
|
-
const pingMessage = error instanceof Error ? error.message : String(error);
|
|
5657
|
-
reviewPing = { roomId: notifyRoom, status: 'failed', error: pingMessage };
|
|
5658
|
-
}
|
|
5659
|
-
if (reviewPing.status === 'failed') {
|
|
5660
|
-
logWarn(`Review ping to room ${notifyRoom} failed (RR was still created): ${String(reviewPing.error)}`);
|
|
5661
|
-
}
|
|
5662
|
-
}
|
|
5663
5614
|
emitCommandResult(options, {
|
|
5664
5615
|
command: 'pm.review-request.create',
|
|
5665
5616
|
toolId: 'projectman.review-request.create',
|
|
5666
5617
|
resolvedContext: buildResolvedContextEnvelope(execution.resolvedContext),
|
|
5667
5618
|
input,
|
|
5668
5619
|
payload,
|
|
5669
|
-
sideEffects: reviewPing ? { reviewPing } : undefined,
|
|
5670
5620
|
});
|
|
5671
5621
|
}
|
|
5672
5622
|
catch (error) {
|
|
@@ -5842,40 +5792,6 @@ export async function runPmResumeBrief(options = {}) {
|
|
|
5842
5792
|
summary: briefLine(entry.content),
|
|
5843
5793
|
nextAction: normalizeNonEmpty(entry.nextAction),
|
|
5844
5794
|
}));
|
|
5845
|
-
let chat;
|
|
5846
|
-
if (options.withChat === true) {
|
|
5847
|
-
try {
|
|
5848
|
-
const apiState = await requireApiState(options);
|
|
5849
|
-
if (apiState) {
|
|
5850
|
-
const payload = await invokeHostedToolWithApiState(apiState, {
|
|
5851
|
-
...execution.gatewayOptions,
|
|
5852
|
-
toolId: 'agentspace.chat.catchup',
|
|
5853
|
-
input: { data: { agentId } },
|
|
5854
|
-
});
|
|
5855
|
-
const result = unwrapHostedToolResult(payload);
|
|
5856
|
-
const data = unwrapResultData(result);
|
|
5857
|
-
const rooms = Array.isArray(data?.rooms) ? data.rooms : [];
|
|
5858
|
-
chat = compactPayload({
|
|
5859
|
-
unreadCount: data?.unreadCount ?? 0,
|
|
5860
|
-
rooms: rooms
|
|
5861
|
-
.filter((entry) => Number(entry.unreadCount ?? 0) > 0)
|
|
5862
|
-
.map((entry) => {
|
|
5863
|
-
const room = isRecord(entry.room) ? entry.room : {};
|
|
5864
|
-
return compactPayload({
|
|
5865
|
-
roomId: room.id,
|
|
5866
|
-
slug: room.slug,
|
|
5867
|
-
title: room.title,
|
|
5868
|
-
unreadCount: entry.unreadCount,
|
|
5869
|
-
});
|
|
5870
|
-
}),
|
|
5871
|
-
hint: `aops-cli chat catchup --for ${agentId} --peek --summary --json`,
|
|
5872
|
-
});
|
|
5873
|
-
}
|
|
5874
|
-
}
|
|
5875
|
-
catch (error) {
|
|
5876
|
-
chat = { status: 'unavailable', message: briefLine(error instanceof Error ? error.message : String(error), 200) };
|
|
5877
|
-
}
|
|
5878
|
-
}
|
|
5879
5795
|
const markdownLines = [
|
|
5880
5796
|
`# AOPS Resume Brief — ${resolvedContext.projectName ?? resolvedContext.projectId ?? 'project'} (for ${agentId})`,
|
|
5881
5797
|
'',
|
|
@@ -5903,19 +5819,13 @@ export async function runPmResumeBrief(options = {}) {
|
|
|
5903
5819
|
...(durableMemories.length > 0
|
|
5904
5820
|
? durableMemories.map((entry) => `- [${String(entry.createdAt ?? '').slice(0, 10)}] ${entry.summary}${entry.nextAction ? ` — next: ${briefLine(entry.nextAction, 100)}` : ''}`)
|
|
5905
5821
|
: ['- (none)']),
|
|
5906
|
-
...(chat
|
|
5907
|
-
? ['', `## Hosted chat unread${chat.status === 'unavailable' ? ' (unavailable)' : ` (${chat.unreadCount ?? 0})`}`,
|
|
5908
|
-
...(Array.isArray(chat.rooms) && chat.rooms.length > 0
|
|
5909
|
-
? chat.rooms.map((room) => `- ${room.slug ?? room.roomId}: ${room.unreadCount} unread`)
|
|
5910
|
-
: [chat.status === 'unavailable' ? `- ${chat.message}` : '- (none)'])]
|
|
5911
|
-
: []),
|
|
5912
5822
|
'',
|
|
5913
5823
|
'## Resume prompt',
|
|
5914
5824
|
'```text',
|
|
5915
5825
|
`You are ${agentId}, resuming work on project ${resolvedContext.projectName ?? resolvedContext.projectId ?? ''} (repo ${resolvedContext.repoRoot}).`,
|
|
5916
5826
|
`1. Review queue first: aops-cli pm review-request list --target-agent ${agentId} --json`,
|
|
5917
5827
|
`2. Memory: aops-cli mem resume --subject project --json`,
|
|
5918
|
-
`3. Chat: aops
|
|
5828
|
+
`3. Chat: aops chat session list --json, then read/listen with ${agentId}'s own ChatV3 session`,
|
|
5919
5829
|
'```',
|
|
5920
5830
|
];
|
|
5921
5831
|
const markdown = markdownLines.join('\n');
|
|
@@ -5939,7 +5849,6 @@ export async function runPmResumeBrief(options = {}) {
|
|
|
5939
5849
|
id: entry.localId ?? entry.id, severity: entry.severity, title: entry.title,
|
|
5940
5850
|
})),
|
|
5941
5851
|
durableMemories,
|
|
5942
|
-
chat,
|
|
5943
5852
|
markdown,
|
|
5944
5853
|
});
|
|
5945
5854
|
if (options.json) {
|
|
@@ -5947,7 +5856,7 @@ export async function runPmResumeBrief(options = {}) {
|
|
|
5947
5856
|
command: 'pm.resume-brief',
|
|
5948
5857
|
toolId: 'projectman.resume-brief',
|
|
5949
5858
|
resolvedContext: buildResolvedContextEnvelope(resolvedContext),
|
|
5950
|
-
input: compactPayload({ for: agentId, limit
|
|
5859
|
+
input: compactPayload({ for: agentId, limit }),
|
|
5951
5860
|
payload: { ok: true, data: brief },
|
|
5952
5861
|
});
|
|
5953
5862
|
return;
|
|
@@ -5978,15 +5887,29 @@ export async function runPmReviewRequestResult(options = {}) {
|
|
|
5978
5887
|
const execution = await prepareExecution(options, { requireProject: true });
|
|
5979
5888
|
if (!execution)
|
|
5980
5889
|
return;
|
|
5890
|
+
const resolvedId = isUuidLike(id)
|
|
5891
|
+
? id
|
|
5892
|
+
: await resolveReviewRequestId(execution, options, id);
|
|
5893
|
+
const resultReferences = normalizeArrayValues(options.reference) ?? [];
|
|
5894
|
+
if (outcome.toLowerCase() === 'approved') {
|
|
5895
|
+
const requestPayload = await invokeProjectmanReadTool(execution, options, {
|
|
5896
|
+
toolId: 'projectman.review-request.get',
|
|
5897
|
+
input: { id: resolvedId },
|
|
5898
|
+
});
|
|
5899
|
+
const request = unwrapResultData(unwrapHostedToolResult(requestPayload));
|
|
5900
|
+
if (!request)
|
|
5901
|
+
throw new Error(`Review request "${resolvedId}" was not found.`);
|
|
5902
|
+
assertApprovedReviewEvidenceReferences(outcome, Array.isArray(request.references) ? request.references : [], resultReferences);
|
|
5903
|
+
}
|
|
5981
5904
|
const input = compactPayload({
|
|
5982
|
-
id,
|
|
5905
|
+
id: resolvedId,
|
|
5983
5906
|
reviewer,
|
|
5984
5907
|
outcome,
|
|
5985
5908
|
summary,
|
|
5986
5909
|
positives: normalizeArrayValues(options.positive),
|
|
5987
5910
|
concerns: normalizeArrayValues(options.concern),
|
|
5988
5911
|
objections: normalizeArrayValues(options.objection),
|
|
5989
|
-
references:
|
|
5912
|
+
references: resultReferences,
|
|
5990
5913
|
issueIds: normalizeArrayValues(options.issue),
|
|
5991
5914
|
basedOnSeqRange: parseJsonObjectOption(options.basedOnSeqRange, '--based-on-seq-range'),
|
|
5992
5915
|
idempotencyKey: normalizeNonEmpty(options.idempotencyKey),
|
|
@@ -6029,6 +5952,24 @@ export async function runPmReviewRequestResult(options = {}) {
|
|
|
6029
5952
|
process.exitCode = 1;
|
|
6030
5953
|
}
|
|
6031
5954
|
}
|
|
5955
|
+
const IMMUTABLE_SHA256_REFERENCE = /sha256:[a-f0-9]{64}/i;
|
|
5956
|
+
export function assertApprovedReviewEvidenceReferences(outcome, requestReferences, resultReferences) {
|
|
5957
|
+
if (outcome.trim().toLowerCase() !== 'approved')
|
|
5958
|
+
return;
|
|
5959
|
+
const required = requestReferences
|
|
5960
|
+
.filter((value) => typeof value === 'string')
|
|
5961
|
+
.map((value) => value.trim())
|
|
5962
|
+
.filter((value) => value.length > 0 && IMMUTABLE_SHA256_REFERENCE.test(value));
|
|
5963
|
+
if (required.length === 0)
|
|
5964
|
+
return;
|
|
5965
|
+
const recorded = new Set(resultReferences
|
|
5966
|
+
.filter((value) => typeof value === 'string')
|
|
5967
|
+
.map((value) => value.trim()));
|
|
5968
|
+
const missing = [...new Set(required)].filter((reference) => !recorded.has(reference));
|
|
5969
|
+
if (missing.length > 0) {
|
|
5970
|
+
throw new Error(`Approved review results must repeat every immutable SHA-256 evidence reference from the request exactly. Missing: ${missing.join(', ')}`);
|
|
5971
|
+
}
|
|
5972
|
+
}
|
|
6032
5973
|
export async function runPmReviewRequestDelete(options = {}) {
|
|
6033
5974
|
try {
|
|
6034
5975
|
ensureWriteFlags('delete', options);
|
|
@@ -543,9 +543,9 @@ function defaultNativeRoot() {
|
|
|
543
543
|
return moduleDirectory.endsWith(`${path.sep}dist`) ? bundled : compiledOrSource;
|
|
544
544
|
}
|
|
545
545
|
function injectedNativeManifestSha256() {
|
|
546
|
-
return typeof
|
|
546
|
+
return typeof "b97413fd3d4d2568a5a37483a7bcea62ceb48cadbbb76dbabb9109e7cf1ca161" === 'undefined'
|
|
547
547
|
? undefined
|
|
548
|
-
:
|
|
548
|
+
: "b97413fd3d4d2568a5a37483a7bcea62ceb48cadbbb76dbabb9109e7cf1ca161";
|
|
549
549
|
}
|
|
550
550
|
function sha256(bytes) {
|
|
551
551
|
return createHash('sha256').update(bytes).digest('hex');
|
|
@@ -184,6 +184,12 @@ export async function verifyAndLoadCommunityCoreReleaseInput(options) {
|
|
|
184
184
|
return loadVerifiedCommunityCoreReleaseInput(bundle);
|
|
185
185
|
}
|
|
186
186
|
export async function verifyAndLoadCommunityCatalogReleaseInputs(options) {
|
|
187
|
+
return (await verifyAndLoadCommunityCatalogRelease(options)).packages;
|
|
188
|
+
}
|
|
189
|
+
export async function verifyAndLoadCommunityCatalogRelease(options) {
|
|
187
190
|
const bundle = await verifyCommunityRelease(options);
|
|
188
|
-
return
|
|
191
|
+
return Object.freeze({
|
|
192
|
+
releaseSetSha256: bundle.agentAssets.setSha256,
|
|
193
|
+
packages: loadVerifiedCommunityCatalogReleaseInputs(bundle),
|
|
194
|
+
});
|
|
189
195
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { lstatSync, realpathSync } from 'node:fs';
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import {
|
|
4
|
+
import { verifyAndLoadCommunityCatalogRelease } from './agent-assets/release-input.js';
|
|
5
5
|
import { inspectCommunityInstall } from './community-lifecycle.js';
|
|
6
6
|
import { inspectCommunityNativeInstall } from './community-native-lifecycle.js';
|
|
7
7
|
import { resolveCommunityRepo } from './community-repo-discovery.js';
|
|
@@ -101,18 +101,28 @@ export async function resolveSetupOfficialCatalogReleaseV1(options = {}, depende
|
|
|
101
101
|
throw new Error('setup_init_catalog_verified_release_unavailable:reinstall_the_official_aops_cli_or_run_from_a_signed_community_release_or_use_--catalog-release_<path>_or_--no-catalog');
|
|
102
102
|
}
|
|
103
103
|
export function createSetupOfficialCatalogProviderV1(dependencies = {}) {
|
|
104
|
-
const loadRelease = dependencies.loadRelease ??
|
|
104
|
+
const loadRelease = dependencies.loadRelease ?? verifyAndLoadCommunityCatalogRelease;
|
|
105
105
|
const createAdapter = dependencies.createAdapter ?? createHostedOfficialCatalogAdapterV1;
|
|
106
106
|
return Object.freeze({
|
|
107
107
|
async resolveRelease(options) {
|
|
108
108
|
return resolveSetupOfficialCatalogReleaseV1(options, dependencies);
|
|
109
109
|
},
|
|
110
110
|
async reconcile(options) {
|
|
111
|
-
const
|
|
111
|
+
const release = await loadRelease({
|
|
112
112
|
releaseRoot: options.fromRelease,
|
|
113
113
|
verificationMode: 'offline',
|
|
114
114
|
});
|
|
115
|
-
const packages = buildOfficialCatalogPackageImports(
|
|
115
|
+
const packages = buildOfficialCatalogPackageImports(release.packages);
|
|
116
|
+
if (packages.length === 0) {
|
|
117
|
+
return Object.freeze({
|
|
118
|
+
state: 'current',
|
|
119
|
+
scopeSlug: OFFICIAL_CATALOG_SCOPE_V1.slug,
|
|
120
|
+
releaseSetSha256: release.releaseSetSha256,
|
|
121
|
+
mutation: 'not-required',
|
|
122
|
+
historyDeleteCount: 0,
|
|
123
|
+
activationEffects: OFFICIAL_CATALOG_NO_ACTIVATION_EFFECTS_V1,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
116
126
|
const adapter = await createAdapter({
|
|
117
127
|
apiBaseUrl: options.apiBaseUrl,
|
|
118
128
|
timeoutMs: options.timeoutMs,
|
package/dist/main.js
CHANGED
|
@@ -20,7 +20,6 @@ import { makeMemoryCommand } from './commands/memory.js';
|
|
|
20
20
|
import { makeCheckpointCommand } from './commands/checkpoint.js';
|
|
21
21
|
import { makeExperienceCommand } from './commands/experience.js';
|
|
22
22
|
import { makeDiscussCommand } from './commands/discuss.js';
|
|
23
|
-
import { makeChatCommand } from './commands/chat.js';
|
|
24
23
|
import { guardChatv3UnknownSubcommand, makeChatv3Command } from './commands/chatv3.js';
|
|
25
24
|
import { makeAgentProfileCommand } from './commands/agent-profile.js';
|
|
26
25
|
import { makePromptCommand } from './commands/prompt.js';
|
|
@@ -134,8 +133,8 @@ export function buildCommunityProgram() {
|
|
|
134
133
|
program.addCommand(makeCheckpointCommand());
|
|
135
134
|
program.addCommand(makeExperienceCommand());
|
|
136
135
|
program.addCommand(makeDiscussCommand());
|
|
137
|
-
program.addCommand(
|
|
138
|
-
program.addCommand(makeChatv3Command());
|
|
136
|
+
program.addCommand(makeChatv3Command('chat'));
|
|
137
|
+
program.addCommand(makeChatv3Command('chatv3'));
|
|
139
138
|
program.addCommand(makeAgentProfileCommand());
|
|
140
139
|
program.addCommand(makePromptCommand());
|
|
141
140
|
program.addCommand(makeProjectCommand());
|
package/dist/seeds/agents-md.js
CHANGED
|
@@ -44,7 +44,7 @@ export const AOPS_AGENTS_MD_TEMPLATE_SEEDS = [
|
|
|
44
44
|
'Run a standalone discuss topic for material design decisions; give every peer enough independent context to research and form its own stance.',
|
|
45
45
|
'Drive at least four substantive non-final turns, then each agent files a kind=final-stance turn before concluding.',
|
|
46
46
|
'Confirm completeness from JSON (lifecycleState / missingTurnFinalStances), then conclude and finalize the outputs with no _TBD_ placeholders.',
|
|
47
|
-
'Surface decisions explicitly: there is no auto bridge — carry the discussion-topic ref into a PM review-request/issue and ping the
|
|
47
|
+
'Surface decisions explicitly: there is no auto bridge — carry the discussion-topic ref into a PM review-request/issue and ping the ChatV3 room with the current agent-owned session.',
|
|
48
48
|
'Coordination/wake lives in aops-cli-chat; review + execution truth lives in aops-cli-projectman.',
|
|
49
49
|
'Conclude only after final stances are recorded; session/board closeout stays operator-only.',
|
|
50
50
|
],
|