@integrity-labs/agt-cli 0.27.9-test.13 → 0.27.9-test.14
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/bin/agt.js +4 -4
- package/dist/chunk-354FAVQR.js +173 -0
- package/dist/chunk-354FAVQR.js.map +1 -0
- package/dist/{chunk-MQJ5DMPT.js → chunk-7GKJZBTB.js} +111 -204
- package/dist/chunk-7GKJZBTB.js.map +1 -0
- package/dist/{chunk-HR5T2RQF.js → chunk-I3YS5WFV.js} +3 -1
- package/dist/chunk-I3YS5WFV.js.map +1 -0
- package/dist/{chunk-VNIHFGA2.js → chunk-R7NKCGWN.js} +341 -46
- package/dist/chunk-R7NKCGWN.js.map +1 -0
- package/dist/{chunk-I2OTQJH3.js → chunk-WOOYOAPG.js} +2644 -2142
- package/dist/chunk-WOOYOAPG.js.map +1 -0
- package/dist/{claude-pair-runtime-F6USL3EW.js → claude-pair-runtime-GIUCD7IG.js} +2 -2
- package/dist/{claude-scheduler-EM24LTGV.js → claude-scheduler-FATCLHDM.js} +2 -2
- package/dist/daily-session-PNQX5URX.js +27 -0
- package/dist/lib/manager-worker.js +1125 -149
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/augmented-admin.js +21335 -0
- package/dist/mcp/index.js +121 -4
- package/dist/mcp/slack-channel.js +845 -208
- package/dist/mcp/teams-channel.js +73 -29
- package/dist/mcp/telegram-channel.js +579 -157
- package/dist/{persistent-session-OL5EDYB4.js → persistent-session-35PWSTLO.js} +10 -3
- package/dist/persistent-session-35PWSTLO.js.map +1 -0
- package/dist/responsiveness-probe-MA4M2QM4.js +158 -0
- package/dist/responsiveness-probe-MA4M2QM4.js.map +1 -0
- package/package.json +3 -2
- package/dist/chunk-HR5T2RQF.js.map +0 -1
- package/dist/chunk-I2OTQJH3.js.map +0 -1
- package/dist/chunk-MQJ5DMPT.js.map +0 -1
- package/dist/chunk-VNIHFGA2.js.map +0 -1
- package/dist/responsiveness-probe-B6LJJRUD.js +0 -74
- package/dist/responsiveness-probe-B6LJJRUD.js.map +0 -1
- /package/dist/{claude-pair-runtime-F6USL3EW.js.map → claude-pair-runtime-GIUCD7IG.js.map} +0 -0
- /package/dist/{claude-scheduler-EM24LTGV.js.map → claude-scheduler-FATCLHDM.js.map} +0 -0
- /package/dist/{persistent-session-OL5EDYB4.js.map → daily-session-PNQX5URX.js.map} +0 -0
|
@@ -14430,6 +14430,45 @@ function readDeclineCooldownMs(envVarName, defaultSeconds = 1800) {
|
|
|
14430
14430
|
return parsed * 1e3;
|
|
14431
14431
|
}
|
|
14432
14432
|
|
|
14433
|
+
// src/inbound-access.ts
|
|
14434
|
+
function decideInboundAccess(input) {
|
|
14435
|
+
if (!input.content.forward) {
|
|
14436
|
+
return { kind: "drop", reason: `content:${input.content.reason}` };
|
|
14437
|
+
}
|
|
14438
|
+
if (input.isSelf) {
|
|
14439
|
+
return { kind: "drop", reason: "self" };
|
|
14440
|
+
}
|
|
14441
|
+
if (input.orgBoundary && !input.orgBoundary.forward) {
|
|
14442
|
+
return { kind: "drop", reason: "org_boundary" };
|
|
14443
|
+
}
|
|
14444
|
+
if (input.senderPolicy && !input.senderPolicy.forward) {
|
|
14445
|
+
const reason = input.senderPolicy.reason;
|
|
14446
|
+
const declineWorthy = input.sameOrg && reason !== "internal_only";
|
|
14447
|
+
return {
|
|
14448
|
+
kind: "drop",
|
|
14449
|
+
reason: `sender_policy:${reason}`,
|
|
14450
|
+
decline: declineWorthy ? politeDeclineCopy(reason) : void 0
|
|
14451
|
+
};
|
|
14452
|
+
}
|
|
14453
|
+
if (input.command && !input.isBot) {
|
|
14454
|
+
return {
|
|
14455
|
+
kind: "command",
|
|
14456
|
+
command: input.command.command,
|
|
14457
|
+
authorized: input.command.authorized
|
|
14458
|
+
};
|
|
14459
|
+
}
|
|
14460
|
+
if (input.isBot) {
|
|
14461
|
+
const peer = input.peer;
|
|
14462
|
+
if (!peer || peer.kind === "self") {
|
|
14463
|
+
return { kind: "drop", reason: peer?.kind === "self" ? "self" : "peer:unclassified" };
|
|
14464
|
+
}
|
|
14465
|
+
if (peer.kind === "drop") {
|
|
14466
|
+
return { kind: "drop", reason: `peer:${peer.reason ?? "unspecified"}` };
|
|
14467
|
+
}
|
|
14468
|
+
}
|
|
14469
|
+
return { kind: "admit" };
|
|
14470
|
+
}
|
|
14471
|
+
|
|
14433
14472
|
// src/teams-peer-classifier.ts
|
|
14434
14473
|
function classifyTeamsPeerMessage(input) {
|
|
14435
14474
|
const { activity, config: config2 } = input;
|
|
@@ -14901,34 +14940,8 @@ async function processPendingFile(filename) {
|
|
|
14901
14940
|
} catch {
|
|
14902
14941
|
return;
|
|
14903
14942
|
}
|
|
14904
|
-
if (!decision.forward) {
|
|
14905
|
-
process.stderr.write(
|
|
14906
|
-
`teams-channel: dropped activity id=${activity.id ?? "?"} reason=${decision.reason}
|
|
14907
|
-
`
|
|
14908
|
-
);
|
|
14909
|
-
return;
|
|
14910
|
-
}
|
|
14911
14943
|
const senderPolicyDecision = decideSenderPolicyForwardTeams(activity, MSTEAMS_SENDER_POLICY);
|
|
14912
|
-
|
|
14913
|
-
const subReason = classifyTeamsPolicyBlock(activity, MSTEAMS_SENDER_POLICY);
|
|
14914
|
-
process.stderr.write(
|
|
14915
|
-
`teams-channel: dropped activity id=${activity.id ?? "?"} reason=sender_policy sub=${subReason} mode=${MSTEAMS_SENDER_POLICY.mode}
|
|
14916
|
-
`
|
|
14917
|
-
);
|
|
14918
|
-
await maybeSendTeamsSenderPolicyDecline({
|
|
14919
|
-
serviceUrl: activity.serviceUrl,
|
|
14920
|
-
conversationId: activity.conversation?.id,
|
|
14921
|
-
replyToId: activity.id,
|
|
14922
|
-
senderId: activity.from?.aadObjectId ?? activity.from?.id,
|
|
14923
|
-
subReason
|
|
14924
|
-
}).catch((err) => {
|
|
14925
|
-
process.stderr.write(
|
|
14926
|
-
`teams-channel: decline reply failed: ${err.message}
|
|
14927
|
-
`
|
|
14928
|
-
);
|
|
14929
|
-
});
|
|
14930
|
-
return;
|
|
14931
|
-
}
|
|
14944
|
+
const policyBlockReason = senderPolicyDecision.forward ? void 0 : classifyTeamsPolicyBlock(activity, MSTEAMS_SENDER_POLICY);
|
|
14932
14945
|
const peerDecision = classifyTeamsPeerMessage({
|
|
14933
14946
|
activity,
|
|
14934
14947
|
config: {
|
|
@@ -14937,11 +14950,42 @@ async function processPendingFile(filename) {
|
|
|
14937
14950
|
mode: PEER_AGENT_MODE
|
|
14938
14951
|
}
|
|
14939
14952
|
});
|
|
14940
|
-
|
|
14953
|
+
const peerKind = peerDecision.classification === "peer_agent" && peerDecision.action === "drop" ? "drop" : peerDecision.classification === "peer_agent" ? "peer-ingress" : "human";
|
|
14954
|
+
const senderTenantId = activity.channelData?.tenant?.id ?? activity.conversation?.tenantId;
|
|
14955
|
+
const homeTenantId = process.env.MSTEAMS_HOME_TENANT_ID;
|
|
14956
|
+
const sameOrg = !!homeTenantId && homeTenantId !== "common" && senderTenantId === homeTenantId;
|
|
14957
|
+
const access = decideInboundAccess({
|
|
14958
|
+
content: decision.forward ? { forward: true } : { forward: false, reason: decision.reason },
|
|
14959
|
+
isSelf: false,
|
|
14960
|
+
// self-drop handled inside decideTeamsActivityForward
|
|
14961
|
+
isBot: true,
|
|
14962
|
+
// the peer classifier ran for every activity; 'human' falls through
|
|
14963
|
+
peer: {
|
|
14964
|
+
kind: peerKind,
|
|
14965
|
+
reason: "reason" in peerDecision ? peerDecision.reason : void 0
|
|
14966
|
+
},
|
|
14967
|
+
senderPolicy: senderPolicyDecision.forward ? { forward: true } : { forward: false, reason: policyBlockReason },
|
|
14968
|
+
sameOrg
|
|
14969
|
+
});
|
|
14970
|
+
if (access.kind === "drop") {
|
|
14941
14971
|
process.stderr.write(
|
|
14942
|
-
`teams-channel:
|
|
14972
|
+
`teams-channel: inbound drop id=${activity.id ?? "?"} reason=${access.reason}
|
|
14943
14973
|
`
|
|
14944
14974
|
);
|
|
14975
|
+
if (access.decline !== void 0 && policyBlockReason) {
|
|
14976
|
+
await maybeSendTeamsSenderPolicyDecline({
|
|
14977
|
+
serviceUrl: activity.serviceUrl,
|
|
14978
|
+
conversationId: activity.conversation?.id,
|
|
14979
|
+
replyToId: activity.id,
|
|
14980
|
+
senderId: activity.from?.aadObjectId ?? activity.from?.id,
|
|
14981
|
+
subReason: policyBlockReason
|
|
14982
|
+
}).catch((err) => {
|
|
14983
|
+
process.stderr.write(
|
|
14984
|
+
`teams-channel: decline reply failed: ${err.message}
|
|
14985
|
+
`
|
|
14986
|
+
);
|
|
14987
|
+
});
|
|
14988
|
+
}
|
|
14945
14989
|
return;
|
|
14946
14990
|
}
|
|
14947
14991
|
if (activity.serviceUrl && activity.conversation?.id) {
|