@@ -419,7 +419,7 @@ describe("ManifestCompiler", () => {
419419 required : true ,
420420 value : {
421421 manager : "hermes-uv-pip" ,
422- spec : "microsoft-teams-apps" ,
422+ spec : "microsoft-teams-apps==2.0.13.4 " ,
423423 } ,
424424 } ,
425425 {
@@ -429,7 +429,7 @@ describe("ManifestCompiler", () => {
429429 required : true ,
430430 value : {
431431 manager : "hermes-uv-pip" ,
432- spec : "aiohttp" ,
432+ spec : "aiohttp==3.14.1 " ,
433433 } ,
434434 } ,
435435 ] ) ;
@@ -507,6 +507,7 @@ describe("ManifestCompiler", () => {
507507 {
508508 MSTEAMS_APP_ID : "test-teams-app-id" ,
509509 MSTEAMS_TENANT_ID : "test-teams-tenant-id" ,
510+ TEAMS_ALLOWED_USERS : "00000000-0000-0000-0000-000000000001" ,
510511 MSTEAMS_PORT : undefined ,
511512 TEAMS_PORT : undefined ,
512513 TEAMS_REQUIRE_MENTION : undefined ,
@@ -550,6 +551,34 @@ describe("ManifestCompiler", () => {
550551 expect ( JSON . stringify ( plan . agentRender ) ) . toContain ( '"requireMention":true' ) ;
551552 } ) ;
552553
554+ it ( "keeps Microsoft Teams disabled when no explicit user allowlist is provided" , async ( ) => {
555+ const plan = await withEnv (
556+ {
557+ MSTEAMS_APP_ID : "test-teams-app-id" ,
558+ MSTEAMS_TENANT_ID : "test-teams-tenant-id" ,
559+ TEAMS_ALLOWED_USERS : undefined ,
560+ } ,
561+ ( ) =>
562+ compiler ( ) . compile ( {
563+ sandboxName : "demo" ,
564+ agent : "openclaw" ,
565+ workflow : "rebuild" ,
566+ isInteractive : false ,
567+ configuredChannels : [ "teams" ] ,
568+ credentialAvailability : {
569+ MSTEAMS_APP_PASSWORD : true ,
570+ } ,
571+ } ) ,
572+ ) ;
573+
574+ expect ( plan . channels . find ( ( channel ) => channel . channelId === "teams" ) ) . toMatchObject ( {
575+ active : false ,
576+ configured : true ,
577+ disabled : true ,
578+ } ) ;
579+ expect ( JSON . stringify ( plan . agentRender ) ) . not . toContain ( "channels.msteams" ) ;
580+ } ) ;
581+
553582 it ( "uses the configured Microsoft Teams webhook port for host forwarding" , async ( ) => {
554583 const plan = await withEnv (
555584 {
@@ -681,8 +710,9 @@ describe("ManifestCompiler", () => {
681710 } ) ;
682711 expect ( plan . disabledChannels ) . toEqual ( [ "wechat" ] ) ;
683712 expect ( plan . networkPolicy . entries . map ( ( entry ) => entry . channelId ) ) . toEqual ( [ "wechat" ] ) ;
684- expect ( plan . agentRender . map ( ( render ) => render . channelId ) ) . toEqual ( [ "wechat" , "wechat" ] ) ;
685- expect ( plan . healthChecks . map ( ( entry ) => entry . channelId ) ) . toEqual ( [ "wechat" ] ) ;
713+ expect ( plan . agentRender ) . toEqual ( [ ] ) ;
714+ expect ( plan . buildSteps ) . toEqual ( [ ] ) ;
715+ expect ( plan . healthChecks ) . toEqual ( [ ] ) ;
686716 } ) ;
687717
688718 it ( "runs enrollment hooks before returning the final channel input plan" , async ( ) => {
@@ -762,7 +792,7 @@ describe("ManifestCompiler", () => {
762792 expect ( plan . runtimeSetup ) . toEqual ( { nodePreloads : [ ] , envAliases : [ ] , secretScans : [ ] } ) ;
763793 expect ( plan . credentialBindings . map ( ( binding ) => binding . channelId ) ) . toEqual ( [ "telegram" ] ) ;
764794 expect ( plan . networkPolicy . entries . map ( ( entry ) => entry . channelId ) ) . toEqual ( [ "telegram" ] ) ;
765- expect ( plan . agentRender . map ( ( render ) => render . channelId ) ) . toEqual ( [ "telegram" , "telegram" ] ) ;
795+ expect ( plan . agentRender ) . toEqual ( [ ] ) ;
766796 expect ( plan . buildSteps ) . toEqual ( [ ] ) ;
767797 expect ( plan . stateUpdates . map ( ( entry ) => entry . channelId ) ) . toEqual ( [
768798 "telegram" ,
@@ -771,7 +801,7 @@ describe("ManifestCompiler", () => {
771801 "telegram" ,
772802 "telegram" ,
773803 ] ) ;
774- expect ( plan . healthChecks . map ( ( entry ) => entry . channelId ) ) . toEqual ( [ "telegram" ] ) ;
804+ expect ( plan . healthChecks ) . toEqual ( [ ] ) ;
775805 } ) ;
776806
777807 it ( "runs non-interactive enrollment hooks to validate and feed reachability checks" , async ( ) => {
@@ -1179,7 +1209,7 @@ describe("ManifestCompiler", () => {
11791209 ] satisfies Array < keyof SandboxMessagingPlan > ) ;
11801210 } ) ;
11811211
1182- it ( "records disabled configured channels and leaves applier exclusion to disabledChannels " , async ( ) => {
1212+ it ( "records disabled configured channels without side-effect plans " , async ( ) => {
11831213 const plan = await compiler ( ) . compile ( {
11841214 sandboxName : "demo" ,
11851215 agent : "openclaw" ,
@@ -1199,11 +1229,7 @@ describe("ManifestCompiler", () => {
11991229 expect ( plan . disabledChannels ) . toEqual ( [ "telegram" ] ) ;
12001230 expect ( plan . credentialBindings . map ( ( binding ) => binding . channelId ) ) . toEqual ( [ "telegram" ] ) ;
12011231 expect ( plan . networkPolicy . entries . map ( ( entry ) => entry . channelId ) ) . toEqual ( [ "telegram" ] ) ;
1202- expect ( plan . agentRender . map ( ( render ) => render . channelId ) ) . toEqual ( [
1203- "telegram" ,
1204- "telegram" ,
1205- "telegram" ,
1206- ] ) ;
1232+ expect ( plan . agentRender ) . toEqual ( [ ] ) ;
12071233 expect ( plan . buildSteps ) . toEqual ( [ ] ) ;
12081234 expect ( plan . stateUpdates . map ( ( entry ) => entry . channelId ) ) . toEqual ( [
12091235 "telegram" ,
@@ -1212,7 +1238,7 @@ describe("ManifestCompiler", () => {
12121238 "telegram" ,
12131239 "telegram" ,
12141240 ] ) ;
1215- expect ( plan . healthChecks . map ( ( entry ) => entry . channelId ) ) . toEqual ( [ "telegram" ] ) ;
1241+ expect ( plan . healthChecks ) . toEqual ( [ ] ) ;
12161242 expect ( plan . channels [ 0 ] ?. hooks . map ( ( hook ) => hook . id ) ) . toEqual ( [
12171243 "telegram-token-paste" ,
12181244 "telegram-allowlist-aliases" ,
0 commit comments